Title: Last 4 lectures
1Last 4 lectures
Camera Structure
HDR
Image Transform
Image Filtering
2Today
Camera Projection Camera Calibration
3Pinhole camera
4Pinhole camera model
(X,Y,Z)
P
origin
p
(x,y)
principal point
(optical center)
- The coordinate system
- We will use the pin-hole model as an
approximation - Put the optical center (Center Of Projection) at
the origin - Put the image plane (Projection Plane) in front
of the COP (Why?)
5Pinhole camera model
principal point
6Pinhole camera model
(X,Y,Z)
P
origin
p
(x,y)
principal point
(optical center)
7Pinhole camera model
(X,Y,Z)
P
origin
p
(x,y)
principal point
(optical center)
8Intrinsic matrix
Is this form of K good enough?
- non-square pixels (digital video)
9Intrinsic matrix
Is this form of K good enough?
- non-square pixels (digital video)
- skew
10Intrinsic matrix
Is this form of K good enough?
- non-square pixels (digital video)
- skew
- radial distortion
11Distortion
- Radial distortion of the image
- Caused by imperfect lenses
- Deviations are most noticeable for rays that pass
through the edge of the lens
12Barrel Distortion
No distortion
Wide Angle Lens
Barrel
13Pin Cushion Distortion
No distortion
Telephoto lens
Pin cushion
14Modeling distortion
Distortion-Free
With Distortion
1. Project (X, Y, Z)to normalized image
coordinates
2. Apply radial distortion
3. Apply focal length translate image center
- To model lens distortion
- Use above projection operation instead of
standard projection matrix multiplication
15Camera rotation and translation
extrinsic matrix
16Two kinds of parameters
- internal or intrinsic parameters focal length,
optical center, skew - external or extrinsic (pose) rotation and
translation
17Other projection models
18Orthographic projection
- Special case of perspective projection
- Distance from the COP to the PP is infinite
- Also called parallel projection (x, y, z) ?
(x, y)
19Other types of projections
- Scaled orthographic
- Also called weak perspective
- Affine projection
- Also called paraperspective
20Fun with perspective
21Perspective cues
22Perspective cues
23Fun with perspective
Ames room
24Forced perspective in LOTR
Elijah Wood 5' 6" (1.68 m)
Ian McKellen 5' 11" (1.80 m)
25Camera calibration
26Camera calibration
- Estimate both intrinsic and extrinsic parameters
- Mainly, two categories
- Using objects with known geometry as reference
- Self calibration (structure from motion)
27Camera calibration approaches
- Directly estimate 11 unknowns in the M matrix
using known 3D points (Xi,Yi,Zi) and measured
feature positions (ui,vi)
28Linear regression
29Linear regression
30Linear regression
Solve for Projection Matrix M using least-square
techniques
31Normal equation (Geometric Interpretation)
- Given an overdetermined system
the normal equation is that which minimizes the
sum of the square differences between left and
right sides
32Normal equation (Differential Interpretation)
nxm, n equations, m variables
33Normal equation
Carl Friedrich Gauss
Who invented Least Square?
34Nonlinear optimization
- A probabilistic view of least square
- Feature measurement equations
- Likelihood of M given (ui,vi)
35Optimal estimation
- Log likelihood of M given (ui,vi)
- It is a least square problem (but not necessarily
linear least square) - How do we minimize C?
36Nonlinear least square methods
37Least square fitting
number of data points
number of parameters
38Nonlinear least square fitting
39Function minimization
Least square is related to function minimization.
- It is very hard to solve in general. Here, we
only consider a simpler problem of finding local
minimum.
40Function minimization
41Quadratic functions
Approximate the function with a quadratic
function within a small neighborhood
42Function minimization
43Computing gradient and Hessian
Gradient
Hessian
44Computing gradient and Hessian
Gradient
Hessian
45Computing gradient and Hessian
Gradient
Hessian
46Computing gradient and Hessian
Gradient
Hessian
47Computing gradient and Hessian
Gradient
Hessian
48Searching for update h
Gradient
Hessian
Idea 1 Steepest Descent
49Steepest descent method
isocontour
gradient
50Steepest descent method
- It has good performance in the initial stage of
the iterative process. Converge very slow with a
linear rate.
51Searching for update h
Gradient
Hessian
Idea 2 minimizing the quadric directly
Converge faster but needs to solve the linear
system
52Recap Calibration
- Directly estimate 11 unknowns in the M matrix
using known 3D points (Xi,Yi,Zi) and measured
feature positions (ui,vi)
Camera Model
53Recap Calibration
- Directly estimate 11 unknowns in the M matrix
using known 3D points (Xi,Yi,Zi) and measured
feature positions (ui,vi)
Linear Approach
54Recap Calibration
- Directly estimate 11 unknowns in the M matrix
using known 3D points (Xi,Yi,Zi) and measured
feature positions (ui,vi)
NonLinear Approach
55Practical Issue
is hard to make and the 3D feature positions are
difficult to measure!
56A popular calibration tool
57Multi-plane calibration
Images courtesy Jean-Yves Bouguet, Intel Corp.
- Advantage
- Only requires a plane
- Dont have to know positions/orientations
- Good code available online!
- Intels OpenCV library http//www.intel.com/rese
arch/mrl/research/opencv/ - Matlab version by Jean-Yves Bouget
http//www.vision.caltech.edu/bouguetj/calib_doc/i
ndex.html - Zhengyou Zhangs web site http//research.micros
oft.com/zhang/Calib/
58Step 1 data acquisition
59Step 2 specify corner order
60Step 3 corner extraction
61Step 3 corner extraction
62Step 4 minimize projection error
63Step 4 camera calibration
64Step 4 camera calibration
65Step 5 refinement