Ignoring black pixels when creating clouds (recfification artifacts). Slightly improved depth retification speed.

This commit is contained in:
matlabbe
2016-09-13 12:10:14 -04:00
parent 44caa12fa5
commit e5977d6157
3 changed files with 22 additions and 11 deletions
+2 -2
View File
@@ -485,8 +485,8 @@ cv::Mat CameraModel::rectifyDepth(const cv::Mat & raw) const
//http://stackoverflow.com/questions/13299409/how-to-get-the-image-pixel-at-real-locations-in-opencv
rectified.at<unsigned short>(y,x) =
(raw.at<unsigned short>(yL, xL) * (1.f - a) + raw.at<unsigned short>(yL, xH) * a) * (1.f - c) +
(raw.at<unsigned short>(yH, xL) * (1.f - a) + raw.at<unsigned short>(yH, xH) * a) * c;
(pLT * (1.f - a) + pRT * a) * (1.f - c) +
(pLB * (1.f - a) + pRB * a) * c;
}
}
}