Fixed mask when there are inf values in depth image

This commit is contained in:
matlabbe
2019-08-16 16:38:25 -04:00
parent 2a1b737470
commit 38044040a6

View File

@@ -541,7 +541,8 @@ std::vector<cv::KeyPoint> Feature2D::generateKeypoints(const cv::Mat & image, co
}
if(value>_minDepth &&
(_maxDepth == 0.0f || value <= _maxDepth))
(_maxDepth == 0.0f || value <= _maxDepth) &&
uIsFinite(value))
{
((unsigned char*)mask.data)[i] = 255; // ORB uses 255 to handle pyramids
}