Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Opencv Stereo match Point cloud visualization

Scenario : I am trying to generate depth map using stereo image pair and visualize the depthmap.

The following steps I have done.

  1. Calibrated the stereo pair using OpenCV stereo calibration

    Source : https://github.com/opencv/opencv/blob/master/samples/cpp/stereo_calib.cpp

    Input : checker board stereo pair

    Output : intrinsic.yml and extrinsic.yml is generated

  2. Depth map generation

    Source : https://github.com/opencv/opencv/blob/master/samples/cpp/stereo_match.cpp

    Input : stereo calibrations generated and stereo pair images (Left and Right)

    Output : Disparity map generated . Point cloud generated

Problem : I got point cloud generated but I could not able to visualize it. My image has a resolution 1280*854 = 1093120 and I got the disparity map also with the same resolution.The point generated has number of lines 904701 which is not equivalent to number of pixels. Why there is less xyz points in my point cloud generated.How I can visualize the point cloud generated.

0.340317 0.242687 0.464209
0.340887 0.242687 0.464209
0.341456 0.242687 0.464209
0.342026 0.242687 0.464209
0.342596 0.242687 0.464209
0.343166 0.242687 0.464209
0.343735 0.242687 0.464209
0.344305 0.242687 0.464209
0.344875 0.242687 0.464209
0.345444 0.242687 0.464209
0.346014 0.242687 0.464209
0.346584 0.242687 0.464209
0.347153 0.242687 0.464209
0.347723 0.242687 0.464209
0.348293 0.242687 0.464209
0.348863 0.242687 0.464209
0.349432 0.242687 0.464209
0.350002 0.242687 0.464209
0.350572 0.242687 0.464209


     Thanks in advance