SlideShare a Scribd company logo
STEREO VISION
Computer Vision
Farah Al-Tufaili
Stereo Vision
 Two Seeing Eyes = Two Views!
 Two Views Used and Fused in the Brain = Stereovision!
 Human Beings with Two Eyes that Work Together Have Stere
5/30/2015
2
Computer stereo vision
 Computer stereo vision is the extraction of 3D
information from digital images. 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.
5/30/2015
3
Inferring 3D From 2D
 Model based pose estimation :If we have single camera that’s
calibrated and we have a model we know the geometry of the
model so we can determine the pose of the camera with respect
to the model called Model based pose estimation
Known model
single
(calibrated)
camera
-> Can
determine the
pose of the
model
5/30/2015
4
Inferring 3D From 2D
 Stereo vision: if we have two cameras and we know the relative
pose between them we can find 3D information from an arbitrary
seen we don’t have to know model in the seen and we can
determine the position in that scene from those two cameras
Arbitrary
scene
two
(calibrated)
camera
-> Can
determine the
positions of
points in the
scene
Relative pose between
cameras is also known
5/30/2015
5
Outline
 In traditional stereo vision, two cameras, displaced horizontally
from one another are used to obtain two differing views on a
scene, in a manner similar to human binocular vision. By
comparing these two images, the relative depth information can
be obtained, in the form of disparities, which are inversely
proportional to the differences in distance to the objects.
 To compare the images, the two views must be superimposed in
a stereoscopic device, the image from the right camera being
shown to the observer's right eye and from the left one to the left
eye.
5/30/2015
6
5/30/2015
7
 A way of getting depth (3-D)
information about a scene from
two (or more) 2-D images
- Used by humans and animals, now
computers
5/30/2015
8
Left image Right image
Reconstructed surface
with image texture
Iright = im2double(imread('pentagonRight.png'));
Ileft = im2double(imread('pentagonLeft.png'));
% Disparity is d = xleft-xright
% So Ileft(x,y) = Iright(x+d,y)
for d=-20:20
d
Idiff = abs(Ileft(:, 21:end-20) - Iright(:, d+21:d+end-20));
imshow(Idiff, []);
pause
end
5/30/2015
9
Stereo Principle
 If you know
• intrinsic parameters of each camera
• the relative pose between the cameras
 If you measure
• An image point in the left camera
• The corresponding point in the right camera
 Each image point corresponds to a ray emanating from that
camera
 You can intersect the rays (triangulate) to find the absolute point
position
5/30/2015
10
Stereo Geometry – Simple Case
 Assume image planes are coplanar.
 There is only a translation in the X direction between the two
coordinate frames.
 b is the baseline distance between the cameras.
5/30/2015
11
XL
ZRZL
XR
xR
P(XL,YL,ZL)
Right camera
 disparity: the difference in image location of
the same 3D point when projected under
perspective to two different cameras
d = xleft-xright
xL
Left camera
f
b
5/30/2015
12
Stereo Geometry – Simple Case
 f is the focal lenth, b is the baseline distance between the
cameras.
d=𝑥 𝐿 − 𝑥 𝑅 ,𝑥 𝐿 = 𝑓
𝑋 𝐿
𝑍 𝐿
, 𝑥 𝑅 = 𝑓
𝑋 𝑅
𝑍 𝑅
∵ 𝑍 𝑅= 𝑍 𝐿 = 𝑍 and 𝑋 𝐿=𝑋 𝑅 + 𝑏
∴ 𝑑 = 𝑥 𝐿 − 𝑥 𝑅= 𝑓
𝑋 𝑅+𝑏
𝑍
− 𝑋 𝑅= 𝑓
𝑋 𝑅+𝑏−𝑋 𝑅
𝑍
= 𝑓
𝑏
𝑍
𝒅 = 𝒇
𝒃
𝒁
𝒁 = 𝒇
𝒃
𝒅
5/30/2015
13
• We can see as the
disparity increases
the Z value is smaller.
• And as disparity
decreases the point
goes further way
XL
ZRZL
XR
xR
P(XL,YL,ZL)
Right camera
xL
Left camera
f
b
Geometry for parallel cameras
 Let us consider the optical setting in the figure, that is also
called standard model.
1. L and R are two cameras with parallel optical axes.
Let f be the focal length of both cameras.
2. The baseline (that is the line connecting the two lens
centers) is perpendicular to the optical axes. Let b
be the distance between the two lens centers.
3. XZ is the plane where the optical axes lie, XY plane is
parallel to the image plane of both cameras, X axis
equals the baseline and the origin O of (X,Y,Z) world
reference system is the lens center of the left
camera.
5/30/2015
14
Simple Model: Optic axes of 2
cameras are parallel

𝑧
𝑓
=
𝑥
𝑥 𝑙
,
𝑧
𝑓
=
𝑥−𝑏
𝑥 𝑟
,
𝑧
𝑓
=
𝑦
𝑦 𝑙
=
𝑦
𝑦 𝑟
(from similar triangles)
5/30/2015
15
Y-axis is
perpendicular
to the page.
3D from Stereo Images: Triangulati
 For stereo cameras with parallel optical axes, focal length f,
 baseline b, corresponding image points (xl,yl) and (xr,yr), the
location of the 3D point can be derived from previous slide’s
equations:
 Depth z = 𝑓
𝑏
𝑥 𝐿−𝑥 𝑅
= 𝑓
𝑏
𝑑
X = 𝑥 𝐿 ∗
𝑧
𝑓
or 𝑏 + 𝑥 𝐿 ∗
𝑧
𝑓
Y = 𝑦 𝐿 ∗
𝑧
𝑓
or 𝑦 𝑅 ∗
𝑧
𝑓
5/30/2015
16
This method of
determining depth
from disparity d is
called triangulation.
 Disparity is higher for points closer to the camera
5/30/2015
17
5/30/2015
18
Goal: a complete disparity
5/30/2015
19
 Disparity is the difference in position of corresponding points between the
left and right images .
Reconstruction Error
 Given the uncertainty in pixel projection of the
point, what is the error in depth?
 Obviously the error in depth (∆Z) will depend on:
 Z, b, f
 ∆xL, ∆ xR
 Let’s find the expected value of the error, and the
variance of the error
5/30/2015
20
Reconstruction Error
 First, find the error in disparity Dd, from the error of
locating the feature in each image, ∆ XL and ∆ XR
d=𝑥 𝐿 − 𝑥 𝑅
 Taking the total derivative of each side
 d(d)=d(𝑥 𝐿) − d(𝑥 𝑅)
 ∆ d=∆𝑥 𝐿 − ∆𝑥 𝑅
 Assuming ∆xL, ∆xR are independent and zero mean
 𝜇 = 𝐸 ∆𝑑 = 𝐸 ∆𝑥 𝐿 − 𝐸 ∆𝑥 𝑅 = 0
 𝑉𝑎𝑟 ∆𝑑 = 𝐸 ∆𝑑 − 𝜇 2 = 𝐸 ∆𝑑 2 5/30/2015
21
Reconstruction Error
 And
 𝑉𝑎𝑟 ∆𝑑 = 𝐸 ∆𝑥 𝐿 − ∆𝑥 𝑅
2
= 𝐸 ∆𝑥 𝐿
2
− 2∆𝑥 𝐿∆𝑥 𝑅 + ∆𝑥 𝑅
2
=𝐸 ∆𝑥 𝐿
2
− 2𝐸 ∆𝑥 𝐿∆𝑥 𝑅 + 𝐸 ∆𝑥 𝑅
2
=𝐸 ∆𝑥 𝐿
2
+ 𝐸 ∆𝑥 𝑅
2
 So:
𝜎 𝑑
2
=𝜎L
2
+𝜎R
2
5/30/2015
22
2𝐸 ∆𝑥 𝐿∆𝑥 𝑅 =0
Because ∆xL, ∆xR are independent
and zero mean
Reconstruction Error
 Next, we take the total derivative of Z=𝑓
𝑏
𝑍
 If the only uncertainty is in the disparity d
∆Z=𝑓
𝑏
𝑑2 (−∆d)
 The mean error is 𝜇 𝑍= E[∆ Z]
𝜇 𝑍=0
 The variance of the error is 𝜎Z
2
= E [(∆ Z- 𝜇 𝑍)2]
E [(∆ Z- 𝜇 𝑍)2] =𝐸 ∆𝑍2
= 𝑓
𝑏
𝑑2
2
𝐸 −∆𝑑 2
𝜎Z
2
= 𝑓
𝑏
𝑑2
2
𝜎d
2
𝜎 𝑍 = 𝑓
𝑏
𝑑2 𝜎 𝑑 = Z
𝜎 𝑑
𝑑 5/30/2015
23
Example
 A stereo vision system estimates the disparity of a point
as d=10 pixels
 What is the depth (Z) of the point, if f = 500 pixels and b = 10
cm?
Z=𝑓
𝑏
𝑑
=(500 pix)
10𝑐𝑚
10𝑝𝑖𝑥
= 500 𝑐𝑚
 What is the uncertainty (standard deviation) of the depth, if
the standard deviation of locating a feature in each image =
1 pixel?
𝜎 𝑑
2
=𝜎L
2
+𝜎R
2
=2 𝜎 𝑑 = 2
𝜎 𝑍 = Z
𝜎 𝑑
𝑑
=(500 cm)
2𝑝𝑖𝑥
10𝑝𝑖𝑥
≅ 70𝑐𝑚
5/30/2015
24
Example – continues
 Find 3D point corresponding to 2 point P1 and P2 in from right and
left camera respectively ,where P1(88,90) ,P2 (100,90). f=500 cm ,
b=10 bix.
 z = 𝑓
𝑏
𝑥 𝐿−𝑥 𝑅
= 500 𝑐𝑚
10 𝑏𝑖𝑥
100−88
= 417
X = 𝑥 𝐿 ∗
𝑧
𝑓
= 100 ∗
417
500
= 83
Y = 𝑦 𝐿 ∗
𝑧
𝑓
= 90 ∗
417
500
= 75
 So P which is 3D point is :
𝑿
𝒀
𝒁
=
𝟖𝟑
𝟕𝟓
𝟒𝟏𝟕
5/30/2015
25

More Related Content

What's hot

Image enhancement
Image enhancementImage enhancement
Image enhancement
Ayaelshiwi
 
Geometric correction
Geometric correctionGeometric correction
Geometric correction
DocumentStory
 

What's hot (20)

Lec14 multiview stereo
Lec14 multiview stereoLec14 multiview stereo
Lec14 multiview stereo
 
Photogrammetry
PhotogrammetryPhotogrammetry
Photogrammetry
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
Grey-level Co-occurence features for salt texture classification
Grey-level Co-occurence features for salt texture classificationGrey-level Co-occurence features for salt texture classification
Grey-level Co-occurence features for salt texture classification
 
Object recognition
Object recognitionObject recognition
Object recognition
 
Satellite image processing
Satellite image processingSatellite image processing
Satellite image processing
 
Fourier descriptors & moments
Fourier descriptors & momentsFourier descriptors & moments
Fourier descriptors & moments
 
Computer Vision
Computer VisionComputer Vision
Computer Vision
 
Geometric correction
Geometric correctionGeometric correction
Geometric correction
 
Image Classification Techniques in GIS
Image Classification Techniques in GISImage Classification Techniques in GIS
Image Classification Techniques in GIS
 
Digital image processing
Digital image processingDigital image processing
Digital image processing
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
A review of change detection techniques
A review of change detection techniques A review of change detection techniques
A review of change detection techniques
 
introduction to Digital Image Processing
introduction to Digital Image Processingintroduction to Digital Image Processing
introduction to Digital Image Processing
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentation
 
Digital image classification
Digital image classificationDigital image classification
Digital image classification
 
Digital photogrammetry software.pptx
Digital photogrammetry software.pptxDigital photogrammetry software.pptx
Digital photogrammetry software.pptx
 
Fundamental Steps of Digital Image Processing & Image Components
Fundamental Steps of Digital Image Processing & Image ComponentsFundamental Steps of Digital Image Processing & Image Components
Fundamental Steps of Digital Image Processing & Image Components
 
Remote sensing for change detection (presentation) - Prepared by A F M Fakhru...
Remote sensing for change detection (presentation) - Prepared by A F M Fakhru...Remote sensing for change detection (presentation) - Prepared by A F M Fakhru...
Remote sensing for change detection (presentation) - Prepared by A F M Fakhru...
 
MOSAICING IMAGES_sjec
MOSAICING IMAGES_sjecMOSAICING IMAGES_sjec
MOSAICING IMAGES_sjec
 

Similar to Stereo vision

Reconstructing and Watermarking Stereo Vision Systems-PhD Presentation
Reconstructing and Watermarking Stereo Vision Systems-PhD Presentation Reconstructing and Watermarking Stereo Vision Systems-PhD Presentation
Reconstructing and Watermarking Stereo Vision Systems-PhD Presentation
Osama Hosam
 
Stereo Correspondence Algorithms for Robotic Applications Under Ideal And Non...
Stereo Correspondence Algorithms for Robotic Applications Under Ideal And Non...Stereo Correspondence Algorithms for Robotic Applications Under Ideal And Non...
Stereo Correspondence Algorithms for Robotic Applications Under Ideal And Non...
CSCJournals
 
Localization of free 3 d surfaces by the mean of photometric
Localization of free 3 d surfaces by the mean of photometricLocalization of free 3 d surfaces by the mean of photometric
Localization of free 3 d surfaces by the mean of photometric
IAEME Publication
 

Similar to Stereo vision (20)

Dense Visual Odometry Using Genetic Algorithm
Dense Visual Odometry Using Genetic AlgorithmDense Visual Odometry Using Genetic Algorithm
Dense Visual Odometry Using Genetic Algorithm
 
Keynote at Tracking Workshop during ISMAR 2014
Keynote at Tracking Workshop during ISMAR 2014Keynote at Tracking Workshop during ISMAR 2014
Keynote at Tracking Workshop during ISMAR 2014
 
Depth estimation from stereo image pairs using block-matching
Depth estimation from stereo image pairs using block-matchingDepth estimation from stereo image pairs using block-matching
Depth estimation from stereo image pairs using block-matching
 
Reconstructing and Watermarking Stereo Vision Systems-PhD Presentation
Reconstructing and Watermarking Stereo Vision Systems-PhD Presentation Reconstructing and Watermarking Stereo Vision Systems-PhD Presentation
Reconstructing and Watermarking Stereo Vision Systems-PhD Presentation
 
Stereo Correspondence Algorithms for Robotic Applications Under Ideal And Non...
Stereo Correspondence Algorithms for Robotic Applications Under Ideal And Non...Stereo Correspondence Algorithms for Robotic Applications Under Ideal And Non...
Stereo Correspondence Algorithms for Robotic Applications Under Ideal And Non...
 
3D Reconstruction from Multiple uncalibrated 2D Images of an Object
3D Reconstruction from Multiple uncalibrated 2D Images of an Object3D Reconstruction from Multiple uncalibrated 2D Images of an Object
3D Reconstruction from Multiple uncalibrated 2D Images of an Object
 
Localization of free 3 d surfaces by the mean of photometric
Localization of free 3 d surfaces by the mean of photometricLocalization of free 3 d surfaces by the mean of photometric
Localization of free 3 d surfaces by the mean of photometric
 
Image Interpolation Techniques with Optical and Digital Zoom Concepts
Image Interpolation Techniques with Optical and Digital Zoom ConceptsImage Interpolation Techniques with Optical and Digital Zoom Concepts
Image Interpolation Techniques with Optical and Digital Zoom Concepts
 
3DSensing.ppt
3DSensing.ppt3DSensing.ppt
3DSensing.ppt
 
Normalization cross correlation value of
Normalization cross correlation value ofNormalization cross correlation value of
Normalization cross correlation value of
 
3 d graphics with opengl part 2
3 d graphics with opengl  part 23 d graphics with opengl  part 2
3 d graphics with opengl part 2
 
Image Quality Feature Based Detection Algorithm for Forgery in Images
Image Quality Feature Based Detection Algorithm for Forgery in Images  Image Quality Feature Based Detection Algorithm for Forgery in Images
Image Quality Feature Based Detection Algorithm for Forgery in Images
 
sawano-icma2000
sawano-icma2000sawano-icma2000
sawano-icma2000
 
Lec15 sfm
Lec15 sfmLec15 sfm
Lec15 sfm
 
Copy of 3 d report
Copy of 3 d reportCopy of 3 d report
Copy of 3 d report
 
Theories and Engineering Technics of 2D-to-3D Back-Projection Problem
Theories and Engineering Technics of 2D-to-3D Back-Projection ProblemTheories and Engineering Technics of 2D-to-3D Back-Projection Problem
Theories and Engineering Technics of 2D-to-3D Back-Projection Problem
 
3-D Visual Reconstruction: A System Perspective
3-D Visual Reconstruction: A System Perspective3-D Visual Reconstruction: A System Perspective
3-D Visual Reconstruction: A System Perspective
 
Automatic Classification Satellite images for weather Monitoring
Automatic Classification Satellite images for weather MonitoringAutomatic Classification Satellite images for weather Monitoring
Automatic Classification Satellite images for weather Monitoring
 
3 projection computer graphics
3 projection computer graphics3 projection computer graphics
3 projection computer graphics
 
Class[4][19th jun] [three js-camera&light]
Class[4][19th jun] [three js-camera&light]Class[4][19th jun] [three js-camera&light]
Class[4][19th jun] [three js-camera&light]
 

More from Farah M. Altufaili

More from Farah M. Altufaili (10)

A Correlative Information-Theoretic Measure for Image Similarity
A Correlative Information-Theoretic Measure for Image SimilarityA Correlative Information-Theoretic Measure for Image Similarity
A Correlative Information-Theoretic Measure for Image Similarity
 
Fp growth
Fp growthFp growth
Fp growth
 
Writing a good cv
Writing a good cvWriting a good cv
Writing a good cv
 
Virtual Private Network VPN
Virtual Private Network VPNVirtual Private Network VPN
Virtual Private Network VPN
 
Fuzzy image processing- fuzzy C-mean clustering
Fuzzy image processing- fuzzy C-mean clusteringFuzzy image processing- fuzzy C-mean clustering
Fuzzy image processing- fuzzy C-mean clustering
 
Principal component analysis
Principal component analysisPrincipal component analysis
Principal component analysis
 
Tiny encryption algorithm
Tiny encryption algorithmTiny encryption algorithm
Tiny encryption algorithm
 
Polygon mesh
Polygon  meshPolygon  mesh
Polygon mesh
 
Nanotechnology and its impact on modern computer
Nanotechnology and its impact on modern computerNanotechnology and its impact on modern computer
Nanotechnology and its impact on modern computer
 
Adversarial search
Adversarial search Adversarial search
Adversarial search
 

Recently uploaded

Pests of sugarcane_Binomics_IPM_Dr.UPR.pdf
Pests of sugarcane_Binomics_IPM_Dr.UPR.pdfPests of sugarcane_Binomics_IPM_Dr.UPR.pdf
Pests of sugarcane_Binomics_IPM_Dr.UPR.pdf
PirithiRaju
 
Detectability of Solar Panels as a Technosignature
Detectability of Solar Panels as a TechnosignatureDetectability of Solar Panels as a Technosignature
Detectability of Solar Panels as a Technosignature
Sérgio Sacani
 
Cancer cell metabolism: special Reference to Lactate Pathway
Cancer cell metabolism: special Reference to Lactate PathwayCancer cell metabolism: special Reference to Lactate Pathway
Cancer cell metabolism: special Reference to Lactate Pathway
AADYARAJPANDEY1
 
Anemia_ different types_causes_ conditions
Anemia_ different types_causes_ conditionsAnemia_ different types_causes_ conditions
Anemia_ different types_causes_ conditions
muralinath2
 
Aerodynamics. flippatterncn5tm5ttnj6nmnynyppt
Aerodynamics. flippatterncn5tm5ttnj6nmnynypptAerodynamics. flippatterncn5tm5ttnj6nmnynyppt
Aerodynamics. flippatterncn5tm5ttnj6nmnynyppt
sreddyrahul
 
The solar dynamo begins near the surface
The solar dynamo begins near the surfaceThe solar dynamo begins near the surface
The solar dynamo begins near the surface
Sérgio Sacani
 
Exomoons & Exorings with the Habitable Worlds Observatory I: On the Detection...
Exomoons & Exorings with the Habitable Worlds Observatory I: On the Detection...Exomoons & Exorings with the Habitable Worlds Observatory I: On the Detection...
Exomoons & Exorings with the Habitable Worlds Observatory I: On the Detection...
Sérgio Sacani
 
Jet reorientation in central galaxies of clusters and groups: insights from V...
Jet reorientation in central galaxies of clusters and groups: insights from V...Jet reorientation in central galaxies of clusters and groups: insights from V...
Jet reorientation in central galaxies of clusters and groups: insights from V...
Sérgio Sacani
 
Climate extremes likely to drive land mammal extinction during next supercont...
Climate extremes likely to drive land mammal extinction during next supercont...Climate extremes likely to drive land mammal extinction during next supercont...
Climate extremes likely to drive land mammal extinction during next supercont...
Sérgio Sacani
 
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
muralinath2
 

Recently uploaded (20)

SCHIZOPHRENIA Disorder/ Brain Disorder.pdf
SCHIZOPHRENIA Disorder/ Brain Disorder.pdfSCHIZOPHRENIA Disorder/ Brain Disorder.pdf
SCHIZOPHRENIA Disorder/ Brain Disorder.pdf
 
insect taxonomy importance systematics and classification
insect taxonomy importance systematics and classificationinsect taxonomy importance systematics and classification
insect taxonomy importance systematics and classification
 
GBSN - Biochemistry (Unit 5) Chemistry of Lipids
GBSN - Biochemistry (Unit 5) Chemistry of LipidsGBSN - Biochemistry (Unit 5) Chemistry of Lipids
GBSN - Biochemistry (Unit 5) Chemistry of Lipids
 
Topography and sediments of the floor of the Bay of Bengal
Topography and sediments of the floor of the Bay of BengalTopography and sediments of the floor of the Bay of Bengal
Topography and sediments of the floor of the Bay of Bengal
 
Structures and textures of metamorphic rocks
Structures and textures of metamorphic rocksStructures and textures of metamorphic rocks
Structures and textures of metamorphic rocks
 
Pests of sugarcane_Binomics_IPM_Dr.UPR.pdf
Pests of sugarcane_Binomics_IPM_Dr.UPR.pdfPests of sugarcane_Binomics_IPM_Dr.UPR.pdf
Pests of sugarcane_Binomics_IPM_Dr.UPR.pdf
 
Detectability of Solar Panels as a Technosignature
Detectability of Solar Panels as a TechnosignatureDetectability of Solar Panels as a Technosignature
Detectability of Solar Panels as a Technosignature
 
Cancer cell metabolism: special Reference to Lactate Pathway
Cancer cell metabolism: special Reference to Lactate PathwayCancer cell metabolism: special Reference to Lactate Pathway
Cancer cell metabolism: special Reference to Lactate Pathway
 
Anemia_ different types_causes_ conditions
Anemia_ different types_causes_ conditionsAnemia_ different types_causes_ conditions
Anemia_ different types_causes_ conditions
 
Aerodynamics. flippatterncn5tm5ttnj6nmnynyppt
Aerodynamics. flippatterncn5tm5ttnj6nmnynypptAerodynamics. flippatterncn5tm5ttnj6nmnynyppt
Aerodynamics. flippatterncn5tm5ttnj6nmnynyppt
 
Gliese 12 b, a temperate Earth-sized planet at 12 parsecs discovered with TES...
Gliese 12 b, a temperate Earth-sized planet at 12 parsecs discovered with TES...Gliese 12 b, a temperate Earth-sized planet at 12 parsecs discovered with TES...
Gliese 12 b, a temperate Earth-sized planet at 12 parsecs discovered with TES...
 
The solar dynamo begins near the surface
The solar dynamo begins near the surfaceThe solar dynamo begins near the surface
The solar dynamo begins near the surface
 
A Giant Impact Origin for the First Subduction on Earth
A Giant Impact Origin for the First Subduction on EarthA Giant Impact Origin for the First Subduction on Earth
A Giant Impact Origin for the First Subduction on Earth
 
Multi-source connectivity as the driver of solar wind variability in the heli...
Multi-source connectivity as the driver of solar wind variability in the heli...Multi-source connectivity as the driver of solar wind variability in the heli...
Multi-source connectivity as the driver of solar wind variability in the heli...
 
Exomoons & Exorings with the Habitable Worlds Observatory I: On the Detection...
Exomoons & Exorings with the Habitable Worlds Observatory I: On the Detection...Exomoons & Exorings with the Habitable Worlds Observatory I: On the Detection...
Exomoons & Exorings with the Habitable Worlds Observatory I: On the Detection...
 
Jet reorientation in central galaxies of clusters and groups: insights from V...
Jet reorientation in central galaxies of clusters and groups: insights from V...Jet reorientation in central galaxies of clusters and groups: insights from V...
Jet reorientation in central galaxies of clusters and groups: insights from V...
 
Climate extremes likely to drive land mammal extinction during next supercont...
Climate extremes likely to drive land mammal extinction during next supercont...Climate extremes likely to drive land mammal extinction during next supercont...
Climate extremes likely to drive land mammal extinction during next supercont...
 
Erythropoiesis- Dr.E. Muralinath-C Kalyan
Erythropoiesis- Dr.E. Muralinath-C KalyanErythropoiesis- Dr.E. Muralinath-C Kalyan
Erythropoiesis- Dr.E. Muralinath-C Kalyan
 
GBSN - Microbiology (Lab 2) Compound Microscope
GBSN - Microbiology (Lab 2) Compound MicroscopeGBSN - Microbiology (Lab 2) Compound Microscope
GBSN - Microbiology (Lab 2) Compound Microscope
 
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
 

Stereo vision

  • 2. Stereo Vision  Two Seeing Eyes = Two Views!  Two Views Used and Fused in the Brain = Stereovision!  Human Beings with Two Eyes that Work Together Have Stere 5/30/2015 2
  • 3. Computer stereo vision  Computer stereo vision is the extraction of 3D information from digital images. 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. 5/30/2015 3
  • 4. Inferring 3D From 2D  Model based pose estimation :If we have single camera that’s calibrated and we have a model we know the geometry of the model so we can determine the pose of the camera with respect to the model called Model based pose estimation Known model single (calibrated) camera -> Can determine the pose of the model 5/30/2015 4
  • 5. Inferring 3D From 2D  Stereo vision: if we have two cameras and we know the relative pose between them we can find 3D information from an arbitrary seen we don’t have to know model in the seen and we can determine the position in that scene from those two cameras Arbitrary scene two (calibrated) camera -> Can determine the positions of points in the scene Relative pose between cameras is also known 5/30/2015 5
  • 6. Outline  In traditional stereo vision, two cameras, displaced horizontally from one another are used to obtain two differing views on a scene, in a manner similar to human binocular vision. By comparing these two images, the relative depth information can be obtained, in the form of disparities, which are inversely proportional to the differences in distance to the objects.  To compare the images, the two views must be superimposed in a stereoscopic device, the image from the right camera being shown to the observer's right eye and from the left one to the left eye. 5/30/2015 6
  • 8.  A way of getting depth (3-D) information about a scene from two (or more) 2-D images - Used by humans and animals, now computers 5/30/2015 8 Left image Right image Reconstructed surface with image texture
  • 9. Iright = im2double(imread('pentagonRight.png')); Ileft = im2double(imread('pentagonLeft.png')); % Disparity is d = xleft-xright % So Ileft(x,y) = Iright(x+d,y) for d=-20:20 d Idiff = abs(Ileft(:, 21:end-20) - Iright(:, d+21:d+end-20)); imshow(Idiff, []); pause end 5/30/2015 9
  • 10. Stereo Principle  If you know • intrinsic parameters of each camera • the relative pose between the cameras  If you measure • An image point in the left camera • The corresponding point in the right camera  Each image point corresponds to a ray emanating from that camera  You can intersect the rays (triangulate) to find the absolute point position 5/30/2015 10
  • 11. Stereo Geometry – Simple Case  Assume image planes are coplanar.  There is only a translation in the X direction between the two coordinate frames.  b is the baseline distance between the cameras. 5/30/2015 11 XL ZRZL XR xR P(XL,YL,ZL) Right camera  disparity: the difference in image location of the same 3D point when projected under perspective to two different cameras d = xleft-xright xL Left camera f b
  • 13. Stereo Geometry – Simple Case  f is the focal lenth, b is the baseline distance between the cameras. d=𝑥 𝐿 − 𝑥 𝑅 ,𝑥 𝐿 = 𝑓 𝑋 𝐿 𝑍 𝐿 , 𝑥 𝑅 = 𝑓 𝑋 𝑅 𝑍 𝑅 ∵ 𝑍 𝑅= 𝑍 𝐿 = 𝑍 and 𝑋 𝐿=𝑋 𝑅 + 𝑏 ∴ 𝑑 = 𝑥 𝐿 − 𝑥 𝑅= 𝑓 𝑋 𝑅+𝑏 𝑍 − 𝑋 𝑅= 𝑓 𝑋 𝑅+𝑏−𝑋 𝑅 𝑍 = 𝑓 𝑏 𝑍 𝒅 = 𝒇 𝒃 𝒁 𝒁 = 𝒇 𝒃 𝒅 5/30/2015 13 • We can see as the disparity increases the Z value is smaller. • And as disparity decreases the point goes further way XL ZRZL XR xR P(XL,YL,ZL) Right camera xL Left camera f b
  • 14. Geometry for parallel cameras  Let us consider the optical setting in the figure, that is also called standard model. 1. L and R are two cameras with parallel optical axes. Let f be the focal length of both cameras. 2. The baseline (that is the line connecting the two lens centers) is perpendicular to the optical axes. Let b be the distance between the two lens centers. 3. XZ is the plane where the optical axes lie, XY plane is parallel to the image plane of both cameras, X axis equals the baseline and the origin O of (X,Y,Z) world reference system is the lens center of the left camera. 5/30/2015 14
  • 15. Simple Model: Optic axes of 2 cameras are parallel  𝑧 𝑓 = 𝑥 𝑥 𝑙 , 𝑧 𝑓 = 𝑥−𝑏 𝑥 𝑟 , 𝑧 𝑓 = 𝑦 𝑦 𝑙 = 𝑦 𝑦 𝑟 (from similar triangles) 5/30/2015 15 Y-axis is perpendicular to the page.
  • 16. 3D from Stereo Images: Triangulati  For stereo cameras with parallel optical axes, focal length f,  baseline b, corresponding image points (xl,yl) and (xr,yr), the location of the 3D point can be derived from previous slide’s equations:  Depth z = 𝑓 𝑏 𝑥 𝐿−𝑥 𝑅 = 𝑓 𝑏 𝑑 X = 𝑥 𝐿 ∗ 𝑧 𝑓 or 𝑏 + 𝑥 𝐿 ∗ 𝑧 𝑓 Y = 𝑦 𝐿 ∗ 𝑧 𝑓 or 𝑦 𝑅 ∗ 𝑧 𝑓 5/30/2015 16 This method of determining depth from disparity d is called triangulation.
  • 17.  Disparity is higher for points closer to the camera 5/30/2015 17
  • 19. Goal: a complete disparity 5/30/2015 19  Disparity is the difference in position of corresponding points between the left and right images .
  • 20. Reconstruction Error  Given the uncertainty in pixel projection of the point, what is the error in depth?  Obviously the error in depth (∆Z) will depend on:  Z, b, f  ∆xL, ∆ xR  Let’s find the expected value of the error, and the variance of the error 5/30/2015 20
  • 21. Reconstruction Error  First, find the error in disparity Dd, from the error of locating the feature in each image, ∆ XL and ∆ XR d=𝑥 𝐿 − 𝑥 𝑅  Taking the total derivative of each side  d(d)=d(𝑥 𝐿) − d(𝑥 𝑅)  ∆ d=∆𝑥 𝐿 − ∆𝑥 𝑅  Assuming ∆xL, ∆xR are independent and zero mean  𝜇 = 𝐸 ∆𝑑 = 𝐸 ∆𝑥 𝐿 − 𝐸 ∆𝑥 𝑅 = 0  𝑉𝑎𝑟 ∆𝑑 = 𝐸 ∆𝑑 − 𝜇 2 = 𝐸 ∆𝑑 2 5/30/2015 21
  • 22. Reconstruction Error  And  𝑉𝑎𝑟 ∆𝑑 = 𝐸 ∆𝑥 𝐿 − ∆𝑥 𝑅 2 = 𝐸 ∆𝑥 𝐿 2 − 2∆𝑥 𝐿∆𝑥 𝑅 + ∆𝑥 𝑅 2 =𝐸 ∆𝑥 𝐿 2 − 2𝐸 ∆𝑥 𝐿∆𝑥 𝑅 + 𝐸 ∆𝑥 𝑅 2 =𝐸 ∆𝑥 𝐿 2 + 𝐸 ∆𝑥 𝑅 2  So: 𝜎 𝑑 2 =𝜎L 2 +𝜎R 2 5/30/2015 22 2𝐸 ∆𝑥 𝐿∆𝑥 𝑅 =0 Because ∆xL, ∆xR are independent and zero mean
  • 23. Reconstruction Error  Next, we take the total derivative of Z=𝑓 𝑏 𝑍  If the only uncertainty is in the disparity d ∆Z=𝑓 𝑏 𝑑2 (−∆d)  The mean error is 𝜇 𝑍= E[∆ Z] 𝜇 𝑍=0  The variance of the error is 𝜎Z 2 = E [(∆ Z- 𝜇 𝑍)2] E [(∆ Z- 𝜇 𝑍)2] =𝐸 ∆𝑍2 = 𝑓 𝑏 𝑑2 2 𝐸 −∆𝑑 2 𝜎Z 2 = 𝑓 𝑏 𝑑2 2 𝜎d 2 𝜎 𝑍 = 𝑓 𝑏 𝑑2 𝜎 𝑑 = Z 𝜎 𝑑 𝑑 5/30/2015 23
  • 24. Example  A stereo vision system estimates the disparity of a point as d=10 pixels  What is the depth (Z) of the point, if f = 500 pixels and b = 10 cm? Z=𝑓 𝑏 𝑑 =(500 pix) 10𝑐𝑚 10𝑝𝑖𝑥 = 500 𝑐𝑚  What is the uncertainty (standard deviation) of the depth, if the standard deviation of locating a feature in each image = 1 pixel? 𝜎 𝑑 2 =𝜎L 2 +𝜎R 2 =2 𝜎 𝑑 = 2 𝜎 𝑍 = Z 𝜎 𝑑 𝑑 =(500 cm) 2𝑝𝑖𝑥 10𝑝𝑖𝑥 ≅ 70𝑐𝑚 5/30/2015 24
  • 25. Example – continues  Find 3D point corresponding to 2 point P1 and P2 in from right and left camera respectively ,where P1(88,90) ,P2 (100,90). f=500 cm , b=10 bix.  z = 𝑓 𝑏 𝑥 𝐿−𝑥 𝑅 = 500 𝑐𝑚 10 𝑏𝑖𝑥 100−88 = 417 X = 𝑥 𝐿 ∗ 𝑧 𝑓 = 100 ∗ 417 500 = 83 Y = 𝑦 𝐿 ∗ 𝑧 𝑓 = 90 ∗ 417 500 = 75  So P which is 3D point is : 𝑿 𝒀 𝒁 = 𝟖𝟑 𝟕𝟓 𝟒𝟏𝟕 5/30/2015 25