Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Converting disparity map to 3D points

I have a disparity map of an image .I need to convert it to a set of 3D points and normals.How can I do this and is there any such existing implementation which can do this

like image 593
Manish Avatar asked Feb 01 '11 03:02

Manish


2 Answers

Have a look at this OpenCV function: http://docs.opencv.org/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html#reprojectimageto3d

like image 194
Martin Beckett Avatar answered Oct 26 '22 07:10

Martin Beckett


The Gnu Triangulated Surface library?

When I've did this before I had a depth-map (or disparity map if you prefer) and - knowing the original camera calibration - was able to perform the re-projection back into R3 for the points.

Knowing the neighbourhood of each point (by their original neighbouring pixels) it's quite trivial to then create a basic triangulation to connect them up.

(If you didn't know this you would have to attempt some form of Delaunay triangulation or other more advanced algorithm...)

Make sure you get the vertex order correct for each triangle to ensure all the normals point the correct way/consistently.

Meshlab is quite handy for any additional post processing.

like image 29
timlukins Avatar answered Oct 26 '22 07:10

timlukins