PLAYING WITH STEREO IMAGES AND DEPTH MAP

Hello friends,

Computer stereo vision is the extraction of 3D information from digital images, such as obtained by a CCD camera. By comparing information about a scene from two vantage points, 3D information can be extracted by examination of the relative positions of objects in the two panels. This is similar to the biological process Stereopsis.

Stereo means solid and opsis means sight. Left and right images are shifted by some amount,this shift is disparity. This best disparity is used to obtain distances of object from camera,via depth maps.

Before finding the disparity, a matching is done between the two images, so that the similarities are found out, then the left out differences are nothing but disparities.

Well I present to you the code to find depth map using Stereo_BM through OpenCV.

Download the code here: https://github.com/abhi-kumar/OPENCV_MISC/blob/master/stereoBM.cpp

Compilation and usage:
open and terminal,move to the downloaded file’s location and type
a)chmod +x stereoBM.cpp
b)g++ -ggdb `pkg-config –cflags opencv` -o `basename stereoBM.cpp .cpp` stereoBM.cpp `pkg-config –libs opencv`
c)./stereoBM
You can adjust the parameters in the image window.
You will get three windows like this :
Screenshot from 2014-07-09 21:45:43

Thank you šŸ™‚

Advertisements

One thought on “PLAYING WITH STEREO IMAGES AND DEPTH MAP”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s