Search code examples
matlabcomputer-visionstereo-3dmatlab-cvst3d-reconstruction

Matlab plot3 not working in Stereo Calibration and Scene Reconstruction example


I am trying to implement the example given on this page link All parts of the codes are working nicely , but

    plot3(hAxes, x, y, z, '.', 'MarkerEdgeColor', reducedColorMap(i, :));
    hold on;

part of the code, which are the last lines of the code is not working , and the 3d reconstructed image is not coming. Its showing a blank white 3d plot, whih no values inside.


Solution

  • Are you running the example code as is, or are you using your own images? If you are using your own images, and z's are negative, that would indicate that your camera1 is to the right of camera2. If you switch the images so that camera1 is on the left, the z's should come out positive. Alternatively, you can keep things as they are, and find the appropriate negative limits for z.

    Edit: As of R2015b release there is a function called pcshow for visualizing point clouds.