OpenCV with stereo 3D reconstruction

2020-06-12 05:44发布

问题:

Say I plan to use OpenCV for 3D reconstruction using a stereo approach...and I do not have any special stereo camera but only webcams.

1.)How do I build a cheap stereo setup using a set of web cams? 2.)Is it possible to snap two images using web cams and convert them to stereo using openCV API?

I will use the stereo algorithm from the link below Stereo vision with OpenCV

Using this approach I want to create a detailed mapping of an indoor environment. (I would not like to use any projects like Insight3D which cannot be used for commercial purposes without distributing the source code)

回答1:

You can find here a lot of resources including tutorials and stereo vision cameras



回答2:

Firstly, ensure that your web cams don't have any inbuilt autofocus technology. As the cameras should have fixed focal length.

1) Align the cameras in canonical configuration with varying baseline distance. Then calibrate them using opencv's stereo_calib.cpp program. Usually, the distance will be 20-60cms. For some web cameras even 10cm will give you better results. If rms error and reprojection error are less than 0.5 then you could consider that the stereo setup is ready.

2) Yes, it is possible to capture stereo images from the setup which I just mentioned. Check out this link for capturing images from cameras.

OpenCV provides better algorithms from which one can do wonders with 3D vision.

Stereo is better suited for indoor environment as it is very sensitive to lighting variations.