3D scanning possible with OpenCV?

Elmi picture Elmi · Sep 2, 2014 · Viewed 9.5k times · Source

this is a general question where I'm just looking for a starting point, not for a complete solution.

I plan to do some 3D-scanning, means checking a surface and generationg a 3D model out of it. AFAIK there are two methods for it: one with a laser raster-scanning the whole surface and one with a camera where a grid is projected over the surface (not sure if one picture with this grid is enough or if more of it have to be done).

My question: does OpenCV support the second method using the camera? If yes: which classes/functions are involved?

All hints are welcome :-)

Answer

rs_ picture rs_ · Aug 15, 2015

The second method would need a projector and a camera. There is a third class of algorithms called structure-from-motion that allows you to capture 3D (sparse point clouds) from multiple images. The sparse point cloud can later be converted to a dense surface using multi-view stereo and a mesh model can be reconstructed using Poisson Surface Reconstruction. Though you can implement the above things using OpenCV, I would recommend existing softwares.

Sparse 3D Reconstruction

Bundler : http://www.cs.cornell.edu/~snavely/bundler/

VisualSFM : http://ccwu.me/vsfm/

Multiview Stereo (MVS)

CMVS : http://www.di.ens.fr/cmvs/

Fusion : http://www.gris.informatik.tu-darmstadt.de/projects/multiscale-depthmap-fusion/

If you have access to a machine with a GPU, I would highly recommend VisualSFM, as it integrates Sparse Reconstruction with MVS.