Stereo Vision-Estimation of Disparity: Advanced Computer Vision Course MEC - 301/2
Stereo Vision-Estimation of Disparity: Advanced Computer Vision Course MEC - 301/2
Stereo Vision-Estimation of Disparity: Advanced Computer Vision Course MEC - 301/2
of Disparity
Advanced Computer Vision
Course MEC- 301/2
Guided by,
Presented by,
Dr. S. Majumder, Lakshmi Prabha N S
Head- SR Lab, Aman Arora
CMERI- Durgapur. Rekha Jayaprakash
PGRPE’09 Mechatronics
Overview
Basic concepts behind stereo vision
Epipolar geometry and contraints
Feature extraction
Feature matching
Rectification process
Disparity map
Experimental results
Introduction to stereo vision
Stereo vision refers to the ability to infer information on the
3-D structure and distance of a scene from two or more
images taken from different viewpoints.
Terms in stereo vision:
Depth of a pixel is the distance between the camera and the object
containing the pixel.
Disparity is the shifted distance between two matching pixels in the left and
right images.
Disparity Map is the output image of stereo vision. The colour of each pixel
in an image corresponds to the disparity of the corresponding pixel in the
input image. It is often a gray-scale image, using brighter colour for smaller
disparity.
Challenges
The first problem is correspondence, consists in determining which item in
world is due to the interpretation that the brain gives of the computed
difference in retinal position, named disparity, between corresponding items.
The disparity of all the image points forms the so called disparity map,
The derivatives of intensity function f(x,y) are first calculated at each point using Prewitt derivative
filter.
The entries of matrix (f2x ,fxfy, f2y) are obtained.
Training Set
Mean Face
1 M
n
M n1
Mean subtracted n n
image
Difference Matrix
Covariance MatrixM
1
C n n
M n1
T
AAT
So that the epipolar lines are parallel and horizontal and
Multiply TL (3x3) and TR with corners of the left and right image to get
corner_x matrix. Find minx , maxx, miny, maxy of corner_x and assign it to bb1
&bb2 (1x4).
Take min of bb1 , bb2 and max of bb1 , bb2 and assign it to q1 & q2.
Hence bounding box is given by bb =[q1(1:2),q2(3:4)].
Steps for rectification
Since the input image is colored one, copy each plane (R, G, B)
from left image to I.
Calculate I2 with interp2 function using the method as bilinear.
With isnan function, calculate alpha which is a logical matrix,
contains 1 where I2 is not equal to 0.
Repeat the above steps for other two plane of left image and for
right image and calculate JL, bbL, alphaL, JR, bbR, alphaR.
Calculate mlx by multiplying TL with ml.
Calculate mrx by multiplying TR with mr.
Plot JL and JR which gives the rectified image of left and right
image.
Right image with epipolar lines through the
Output of Rectification process
matched corner points
Disparity Map generation
Rectification of the left and right image pair simplifies
the correspondence problem. Now the search for the
corresponding pixel in right image can be carried out in
1-D instead of 2-D.
Algorithm
For any pixel in the left image, a window is
considered with appropriate size centering that pixel.
Since the images are rectified another window is taken
in the right image centering any pixel in the same row
as in left image.
Disparity map
The window is shifted horizontally by one pixel in the right image and Sum
of Squared Difference (SSD) is calculated for each move.
Minimum value of SSD gives the matching pixel and its position in the
right images corresponding to left image pixel.
The window is then shifted horizontally in the left image by one pixel and
the corresponding pixel in right image is found as explained in steps above.
The process is repeated for all pixels in the left and right image.
The relative position of corresponding pixels in left and right image gives
disparity. Disparity map is generated by plotting disparity of all pixels with
different gray levels
output
Reference
[1] Edwin Olson, Melissa Hao, “An Introduction to Stereo Vision and Disparity
Computation”.
[2] Bailu Ding, “A Survey: Stereo Vision via Belief Propagation”, December 27, 2009
[3] Prof. V. M. Gadre “Tangible Images”, Digital Signal Processing Application Assignment
Report,IIT Bombay
[4] Konstantinos G. Derpanis , “The Harris Corner Detector” October 27, 2004.
[5] Dmitrij Csetverikov, “Basic Algorithms for Digital image Analysis”, Eotvos Lorand
University Budapest, Hungary.
[6] M. Turk and A. Pentland, “Eigenfaces for recognition,” J. Cognitive Neuroscience, vol. 3,
pp. 71-86, 1991.
[7] A. Fusiello and L. Irsara, “Quasi-Euclidean Uncalibrated Epipolar Rectification,”.
Books
[8] Emanuele.T, Alessandro.V, “Introductory Techniques for 3D computer vision”.
Thank you