0% found this document useful (0 votes)
12 views79 pages

cv2 2

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views79 pages

cv2 2

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 79

Computer Vision

Fractal 2 Lecture 3, 4

Content taken from various sources


Constrained Least Squares Solution
Extracting Intrinsic/Extrinsic Parameters
Extracting Intrinsic/Extrinsic Parameters

QR Decomposition/Factorization: Decomposes matrix M into a product A = QR of an orthonormal matrix Q and an


upper triangular matrix R

In our case, we have RQ so we need RQ Decomposition which is related in the following way.

QR decomposition is Gram–Schmidt orthogonalization of columns of A, started from the first column.


RQ decomposition is Gram–Schmidt orthogonalization of rows of A, started from the last row.
Extracting Intrinsic/Extrinsic Parameters

RQ decomposition for P = KR

P= prow3 R = rrow3
prow2 rrow2
prow1 rrow1

rrow1 = prow1
||prow1||

rrow2* = prow2 - <prow2,rrow1> rrow1 [<a,b> represents dot product of a,b]


rrow2 = rrow2*
||rrow2*||

rrow3* = prow3 - <prow3,rrow1> rrow1 - <prow3,rrow2> rrow2


rrow3 = rrow3*
||rrow3*||
Extracting Intrinsic/Extrinsic Parameters

RQ decomposition for P = KR

P = KR

PR-1 = K

PRT = K [Since R is orthonormal]


Extracting Intrinsic/Extrinsic Parameters
Other Intrinsic Parameters
Backward Projection: From 2D to 3D
Computing the 2D-to-3D Outgoing Ray
Triangulation using Two Cameras

Simple Stereo System:


Imaging with a left
camera and a right
camera
Triangulation using Two Cameras

Assume for now that


the corresponding
points in both images
have been found
Simple Stereo: Depth and Disparity

So if the point is very


far away, then in both
the images the point
will be at roughly the
same location
Stereo Matching: Finding Disparities
Window Based Methods
Similarity Metrics for Template Matching
Issues with Stereo Matching
How Large Should the Window Be?
Window Based Methods: Results
Rearranged Camera
Rearranged Camera
Triangulation: Rearranged Camera
Triangulation: Rearranged Camera
Triangulation: Rearranged Camera
Triangulation: Rearranged Camera
Problem of Uncalibrated Stereo

Extrinsics (relative position/orientation of cameras) are unknown


Uncalibrated Stereo
Initial Correspondence
Uncalibrated Stereo

5.
Uncalibrated Stereo

5.
Epipolar geometry
Epipolar geometry: Epipoles

Epipoles: Points where the line joining the optical centers intersects with the image planes
el and er (or e and e’) are epipoles. They are unique for a given stereo pair
Uncalibrated Stereo

Every scene point lies on a unique epipolar plane


Epipolar Constraint
Linear algebra reminder: cross product
Linear algebra reminder: cross product
Linear algebra reminder: Compare with dot product
Epipolar Constraint
Epipolar Constraint
Essential Matrix E: Decomposition
How do we find E?
Incorporating the Image Coordinates
Incorporating the Image Coordinates
Incorporating the Image Coordinates
Incorporating the Image Coordinates
Incorporating the Image Coordinates
Fundamental Matrix F
Fundamental Matrix F
Fundamental Matrix F
Stereo Calibration Procedure
Stereo Calibration Procedure

=0
Stereo Calibration Procedure

Each corresponding points only contribute one equation. So we need at


least 8 corresponding points. Eight point algorithm
The Tale of the Missing Scale
The Tale of the Missing Scale
Solving for F

Can be solved using the Eigen Value Formulation or SVD


Solving for F
After finding F, it has to be converted to a rank 2 matrix

(k=2)
Extracting Rotation and Translation
Extracting Rotation and Translation
UnCalibrated Stereo
Finding Correspondence
Simple Stereo: Finding Correspondences
Epipolar Geometry: Epipolar Line
Epipolar Geometry: Epipolar Line

Finding correspondences reduces to a 1D search


Finding Epipolar Lines
Finding Epipolar Lines
Finding Epipolar Lines: Example
Finding Epipolar Lines: Example
Finding Correspondence
Computing Depth
Computing Depth
Computing Depth
Computing Depth
Computing Depth
Computing Depth
Computing Depth: Least Square Solution
3D Reconstruction with Internet Images
Optical Flow
Optical Flow

● If you consider the methods we have discussed thus far, they fall into two categories.

○ We either capture a single snapshot of a three dimensional scene or


○ We take a sequence of images.

● We have assumed so far that objects in the scene do not move.

● But we know that most things in the real world are in motion most of the time.

● And we are interested in measuring the motion of objects in the scene.

● This is the problem of computing optical flow.

● So we're going to develop a method for estimating the motion of scene points in the image from a
sequence of images taken in quick succession.
Optical Flow

● First we will understand the notion of motion field

● When you have a point moving in the three dimensional scene, it's projection onto the image via
perspective projection is what's referred to the motion field

● But we can't directly measure the motion field because in images, all we have are brightness patterns.

● And what we can do is measure the motion of brightness patterns.

● The motion of brightness patterns in the image is referred to as optical flow.

You might also like