Search code examples
opencvpoint-cloud-librarystereo-3d3d-reconstructionstereoscopy

Distorted 3D reconstruction OPENCV + PCL (Martin Peris code)


I am using Martin Peris code for 3D reconstruction using OpenCV and PCL (link below):

http://blog.martinperis.com/2012/01/3d-reconstruction-with-opencv-and-point.html

Trouble point:

I am having trouble with the final step in viewing the 3D reconstruction in the "3D viewer" window. I am getting a perfect disparity image as shown in the blog but my final reconstruction image looks like this:

https://drive.google.com/file/d/0Bx1aNPhwJU4kMmt1cUVHVXBOLWM/edit?usp=sharing

You can compare this with the one which is shown in the video link given in that blog.

Things that I have tried:

  1. Checked if all the required libraries are installed. I believe otherwise the code wouldn't compile and give me any results.
  2. Checked if I have a graphics support on my machine:

$lspci | grep VGA

09:00.0 VGA compatible controller: NVIDIA Corporation G71GL [Quadro FX 3500] (rev a1)

My doubts:

  1. If there is some library missing for OpenGL or OpenCV or PCL which is making the 3D reconstruction window suffer.
  2. The controversial reprojectImageTo3D() function in OpenCV which is also used in the code by Martin Peris.
  3. Some other reason that one of you could help me with ;-)

Other details:

Ubuntu Version : 12.04

OpenCV Version : 2.3.1-7

Any suggestions would really be helpful!

Thanks,

Pratul


Solution

  • RESOLVED!

    It was actually a driver issue with my graphics card. To solve it I wiped off the currently installed driver and then re-installed an updated one and that worked like a charm.

    Details of this solution I have posted on the PCL mailing list as I didn't wanted to repeat myself here.

    enter link description here

    I hope this helps.