Ask Your Question

3d point cloud generation

asked 2013-02-19 16:07:59 -0500

Hi all,

Im working on a project, that identifies the X,Y,Z position of an apple from the tree.

I calibrated a pair of webcameras as a stereo camera and then using the rectified images from each of the camera, i did some thresholding, filtering and finally have extracted the apple region alone in both of the images. So now i have two images with each of the image holding only the apple region in grayscale, leaving the rest of the region with black color. Now having extracted the apple region from both the images, i want to compare these 2 images and identify the x,y,z positions of the border of the apples. Im running this on ROS using C++. Could you please suggest me how to identify the x,y,z locations from these pair of extracted images, since i am new to Opencv.

Thanks in advance

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-02-20 12:09:59 -0500

The sample '''' in OpenCV samples is writing a 3D points cloud in ply format. If you already have the disparity, you have done most of the work, just reproject the disparity with cv2.reprojectImageTo3D. You can find prototypes of C++ function in the doc.

edit flag offensive delete link more


Thank you so much for answering. I am assuming that this would be the point cloud map. And would this function return the x,yz coordinates for each of the points?

mhariharasudan3 gravatar imagemhariharasudan3 ( 2013-02-23 00:41:47 -0500 )edit
Login/Signup to Answer

Question Tools


Asked: 2013-02-19 16:07:59 -0500

Seen: 1,188 times

Last updated: Feb 20 '13