fixed non 0 filling of new state covariance

This commit is contained in:
2019-04-25 19:13:22 +02:00
parent de07296d31
commit e2e936ff01
3 changed files with 65 additions and 35 deletions

View File

@ -441,7 +441,7 @@ bool Feature::VisualizePatch(
float Feature::PixelIrradiance(cv::Point2f pose, cv::Mat image) const
{
return (float)(image.at<uint8_t>(pose.x, pose.y));
return ((float)image.at<uint8_t>(pose.x, pose.y))/256;
}
cv::Point2f Feature::projectPositionToCamera(
@ -496,7 +496,7 @@ bool Feature::initializeAnchor(
//initialize patch Size
//TODO make N size a ros parameter
int N = 9;
int N = 3;
int n = (int)(N-1)/2;
auto anchor = observations.begin();
@ -551,7 +551,7 @@ bool Feature::initializeAnchor(
return false;
}
for(auto point : vec)
anchorPatch.push_back((double)anchorImage.at<uint8_t>((int)point.x,(int)point.y));
anchorPatch.push_back(PixelIrradiance(point, anchorImage));
// project patch pixel to 3D space
for(auto point : und_v)