sobel normalization added
This commit is contained in:
parent
07f4927128
commit
1b29047451
@ -701,7 +701,11 @@ bool Feature::VisualizeKernel(
|
|||||||
cv::Mat xderImage2(anchorImage.rows, anchorImage.cols, anchorImage_blurred.type());
|
cv::Mat xderImage2(anchorImage.rows, anchorImage.cols, anchorImage_blurred.type());
|
||||||
cv::Mat yderImage2(anchorImage.rows, anchorImage.cols, anchorImage_blurred.type());
|
cv::Mat yderImage2(anchorImage.rows, anchorImage.cols, anchorImage_blurred.type());
|
||||||
|
|
||||||
cv::imshow("xder", abs_xderImage);
|
|
||||||
|
cv::Mat norm_abs_xderImage;
|
||||||
|
cv::normalize(abs_xderImage, norm_abs_xderImage, 0, 255, cv::NORM_MINMAX, CV_8UC1);
|
||||||
|
|
||||||
|
cv::imshow("xder", norm_abs_xderImage);
|
||||||
cv::imshow("yder", abs_yderImage);
|
cv::imshow("yder", abs_yderImage);
|
||||||
|
|
||||||
for(int i = 1; i < anchorImage.rows-1; i++)
|
for(int i = 1; i < anchorImage.rows-1; i++)
|
||||||
@ -1028,6 +1032,9 @@ bool Feature::initializeAnchor(const CameraCalibration& cam, int N)
|
|||||||
cv::Sobel(anchorImage_deeper, xderImage, -1, 1, 0, 3);
|
cv::Sobel(anchorImage_deeper, xderImage, -1, 1, 0, 3);
|
||||||
cv::Sobel(anchorImage_deeper, yderImage, -1, 0, 1, 3);
|
cv::Sobel(anchorImage_deeper, yderImage, -1, 0, 1, 3);
|
||||||
|
|
||||||
|
xderImage/=8;
|
||||||
|
yderImage/=8;
|
||||||
|
|
||||||
cv::convertScaleAbs(xderImage, abs_xderImage);
|
cv::convertScaleAbs(xderImage, abs_xderImage);
|
||||||
cv::convertScaleAbs(yderImage, abs_yderImage);
|
cv::convertScaleAbs(yderImage, abs_yderImage);
|
||||||
|
|
||||||
|
@ -1320,8 +1320,8 @@ void MsckfVio::PhotometricMeasurementJacobian(
|
|||||||
// dx = feature.PixelIrradiance(cv::Point2f(p_in_anchor.x+1, p_in_anchor.y), anchor_frame) - feature.PixelIrradiance(cv::Point2f(p_in_anchor.x-1, p_in_anchor.y), anchor_frame);
|
// dx = feature.PixelIrradiance(cv::Point2f(p_in_anchor.x+1, p_in_anchor.y), anchor_frame) - feature.PixelIrradiance(cv::Point2f(p_in_anchor.x-1, p_in_anchor.y), anchor_frame);
|
||||||
// dy = feature.PixelIrradiance(cv::Point2f(p_in_anchor.x, p_in_anchor.y+1), anchor_frame) - feature.PixelIrradiance(cv::Point2f(p_in_anchor.x, p_in_anchor.y-1), anchor_frame);
|
// dy = feature.PixelIrradiance(cv::Point2f(p_in_anchor.x, p_in_anchor.y+1), anchor_frame) - feature.PixelIrradiance(cv::Point2f(p_in_anchor.x, p_in_anchor.y-1), anchor_frame);
|
||||||
|
|
||||||
dI_dhj(0, 0) = dx/(pixelDistance.x);
|
dI_dhj(0, 0) = dx;// /(pixelDistance.x);
|
||||||
dI_dhj(0, 1) = dy/(pixelDistance.y);
|
dI_dhj(0, 1) = dy;// /(pixelDistance.y);
|
||||||
|
|
||||||
gradientVector.x += dx;
|
gradientVector.x += dx;
|
||||||
gradientVector.y += dy;
|
gradientVector.y += dy;
|
||||||
@ -1424,7 +1424,7 @@ void MsckfVio::PhotometricMeasurementJacobian(
|
|||||||
{
|
{
|
||||||
feature.MarkerGeneration(marker_pub, state_server.cam_states);
|
feature.MarkerGeneration(marker_pub, state_server.cam_states);
|
||||||
feature.VisualizePatch(cam_state, cam_state_id, cam0, r_photo, ss, gradientVector, residualVector);
|
feature.VisualizePatch(cam_state, cam_state_id, cam0, r_photo, ss, gradientVector, residualVector);
|
||||||
// feature.VisualizeKernel(cam_state, cam_state_id, cam0);
|
feature.VisualizeKernel(cam_state, cam_state_id, cam0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user