How can I estimate inf values in point cloud

  3d-reconstruction, c++, opencv, point-clouds, python

I am creating point cloud using cv::reprojectImageTo3D() from disparity map. Due to bad matches on stereo images, there are [inf, inf, inf] valued points in point cloud. Is there any way to estimate these points? (Blue parts of image correspond to inf point in point cloud.)

A part from disparity map:

Disparity map

Code snippet that I obtain point cloud:

cv::Mat pointCloud; 
disparityMap.convertTo(disparityMap, CV_32FC1);
cv::reprojectImageTo3D(disparityMap, pointCloud, Q, true, -1);

Source: Windows Questions C++

LEAVE A COMMENT