Question

I need your help. I have implemented stereo calibration, rectification using my stereo pair. I have got a disparity image which is quite reasonable. The problem that I face is with cvReprojectImageTo3D.I have used stereobM. And rectified in a correct way. Declaration is as follows

 CvMat* disp = cvCreateMat( imageSize.height, imageSize.width, CV_16S );
 CvMat* vdisp = cvCreateMat( imageSize.height,imageSize.width, CV_8U );
 CvMat* Image3D = cvCreateMat(imageSize.height, imageSize.width, CV_32FC3);   

disp is disparity image obtained for the stereo pair.And when I run the command of showimage of Image3D I obtain colorful divisions. My doubt is why this is so. I attach the link of my result
photo is given below

https://plus.google.com/photos/110965556771924534380/albums/5745356738809417329/5748680803335389906

Another doubt I have is how this image3D is stored. Does CV_32FC3 mean that first channel gives x value second gives y and third gives z or sort of or Is there any other representation..?

Was it helpful?

Solution

Yes, " Output 3-channel floating-point image of the same size as disparity . Each element of _3dImage(x,y) contains 3D coordinates of the point (x,y) computed from the disparity map."

So it's the floating pointing x,y,z at each pixel coordinate

see http://docs.opencv.org/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html

OTHER TIPS

did you try something like

cvSave("depthmeasure.txt", Image3D);

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top