OpenCV with stereo 3D reconstruction
Asked Answered
A

2

9

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)

Abdomen answered 16/11, 2011 at 4:23 Comment(2)
[Just realized how old this thread is...] One can't really give a concise definitive answer here. But I will point out one thing you have to watch out for. You need to ensure that you can capture images from both of your webcams at exactly the same time. Otherwise, if your rig is moving, you will not get proper stereo images. That is, if the images are captured at different times, you won't have a "stereo" camera anymore, just two separate cameras.Olmsted
One of the way using findHomography and features from both streams to make pictures similarity. And using stereo calib from opencv to avoid distortion. I've tryed it when i works with stereo. My results are not good but are satisfactorily PS Sorry for my writing mistakes. English in not my native languageDoomsday
K
5

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

Khajeh answered 29/8, 2013 at 9:3 Comment(0)
L
1

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.

Lawlor answered 29/4, 2014 at 19:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.