Download presentation
Presentation is loading. Please wait.
Published byShana Elliott Modified over 9 years ago
1
Camera models and calibration Read tutorial chapter 2 and 3.1 http://www.cs.unc.edu/~marc/tutorial/ Szeliski’s book pp.29-73
2
Schedule (tentative) 2 #datetopic 1Sep.17Introduction and geometry 2Sep.24Camera models and calibration 3Oct.1Invariant features 4Oct.8Multiple-view geometry 5Oct.15Model fitting (RANSAC, EM, …) 6Oct.22Stereo Matching 7Oct.29Structure from motion 8Nov.5Segmentation 9Nov.12Shape from X (silhouettes, …) 10Nov.19Optical flow 11Nov.26Tracking (Kalman, particle filter) 12Dec.3Object category recognition 13Dec.10Specific object recognition 14Dec.17Research overview
3
Brief geometry reminder 3 2D line-point coincidence relation: Point from lines: 2D Ideal points 2D line at infinity 3D plane-point coincidence relation: Point from planes: Plane from points: Line from points: 3D line representation: (as two planes or two points) 3D Ideal points3D plane at infinity
4
Conics and quadrics 4 l=Cx l x C Conics Quadrics
5
2D projective transformations A projectivity is an invertible mapping h from P 2 to itself such that three points x 1,x 2,x 3 lie on the same line if and only if h(x 1 ),h(x 2 ),h(x 3 ) do. Definition: A mapping h : P 2 P 2 is a projectivity if and only if there exist a non-singular 3x3 matrix H such that for any point in P 2 reprented by a vector x it is true that h(x)=Hx Theorem: Definition: Projective transformation or 8DOF projectivity=collineation=projective transformation=homography
6
Transformation of 2D points, lines and conics Transformation for lines Transformation for conics Transformation for dual conics For a point transformation
7
Fixed points and lines (eigenvectors H =fixed points) (eigenvectors H - T =fixed lines) ( 1 = 2 pointwise fixed line)
8
Hierarchy of 2D transformations Projective 8dof Affine 6dof Similarity 4dof Euclidean 3dof Concurrency, collinearity, order of contact (intersection, tangency, inflection, etc.), cross ratio Parallellism, ratio of areas, ratio of lengths on parallel lines (e.g midpoints), linear combinations of vectors (centroids). The line at infinity l ∞ Ratios of lengths, angles. The circular points I,J lengths, areas. invariants transformed squares
9
The line at infinity The line at infinity l is a fixed line under a projective transformation H if and only if H is an affinity Note: not fixed pointwise
10
Affine properties from images projection rectification
11
Affine rectification v1v1 v2v2 l1l1 l2l2 l4l4 l3l3 l∞l∞
12
The circular points The circular points I, J are fixed points under the projective transformation H iff H is a similarity
13
The circular points “circular points” l∞l∞ Algebraically, encodes orthogonal directions
14
Conic dual to the circular points The dual conic is fixed conic under the projective transformation H iff H is a similarity Note: has 4DOF l ∞ is the nullvector l∞l∞
15
Angles Euclidean: Projective: (orthogonal)
16
Transformation of 3D points, planes and quadrics Transformation for lines Transformation for quadrics Transformation for dual quadrics For a point transformation(cfr. 2D equivalent)
17
Hierarchy of 3D transformations Projective 15dof Affine 12dof Similarity 7dof Euclidean 6dof Intersection and tangency Parallellism of planes, Volume ratios, centroids, The plane at infinity π ∞ Angles, ratios of length The absolute conic Ω ∞ Volume
18
The plane at infinity The plane at infinity π is a fixed plane under a projective transformation H iff H is an affinity 1.canonical position 2.contains directions 3.two planes are parallel line of intersection in π ∞ 4.line // line (or plane) point of intersection in π ∞
19
The absolute conic The absolute conic Ω ∞ is a fixed conic under the projective transformation H iff H is a similarity The absolute conic Ω ∞ is a (point) conic on π . In a metric frame: or conic for directions: (with no real points) 1.Ω ∞ is only fixed as a set 2.Circle intersect Ω ∞ in two circular points 3.Spheres intersect π ∞ in Ω ∞
20
The absolute dual quadric The absolute dual quadric Ω * ∞ is a fixed conic under the projective transformation H iff H is a similarity 1.8 dof 2.plane at infinity π ∞ is the nullvector of Ω ∞ 3.Angles:
21
Camera model Relation between pixels and rays in space ?
22
Pinhole camera Gemma Frisius, 1544
23
23 Distant objects appear smaller
24
24 Parallel lines meet vanishing point
25
25 Vanishing points VPL VPR H VP 1 VP 2 VP 3 To different directions correspond different vanishing points
26
26 Geometric properties of projection Points go to points Lines go to lines Planes go to whole image or half-plane Polygons go to polygons Degenerate cases: –line through focal point yields point –plane through focal point yields line
27
Pinhole camera model linear projection in homogeneous coordinates!
28
Pinhole camera model
29
Principal point offset principal point
30
Principal point offset calibration matrix
31
Camera rotation and translation ~
32
CCD camera
33
General projective camera non-singular 11 dof (5+3+3) intrinsic camera parameters extrinsic camera parameters
34
Radial distortion Due to spherical lenses (cheap) Model: R R http://foto.hut.fi/opetus/260/luennot/11/atkinson_6-11_radial_distortion_zoom_lenses.jpg straight lines are not straight anymore
35
Camera model Relation between pixels and rays in space ?
36
Projector model Relation between pixels and rays in space (dual of camera) (main geometric difference is vertical principal point offset to reduce keystone effect) ?
37
Meydenbauer camera vertical lens shift to allow direct ortho-photographs
38
Affine cameras
39
Action of projective camera on points and lines forward projection of line back-projection of line projection of point
40
Action of projective camera on conics and quadrics back-projection to cone projection of quadric
41
Resectioning
42
Direct Linear Transform (DLT) rank-2 matrix
43
Direct Linear Transform (DLT) Minimal solution Over-determined solution 5½ correspondences needed (say 6) P has 11 dof, 2 independent eq./points n 6 points minimize subject to constraint use SVD
44
Singular Value Decomposition Homogeneous least-squares
45
Degenerate configurations (i)Points lie on plane or single line passing through projection center (ii)Camera and points on a twisted cubic
46
Scale data to values of order 1 1.move center of mass to origin 2.scale to yield order 1 values Data normalization
47
Line correspondences Extend DLT to lines (back-project line) (2 independent eq.)
48
Geometric error
49
Gold Standard algorithm Objective Given n≥6 2D to 3D point correspondences {X i ↔x i ’}, determine the Maximum Likelyhood Estimation of P Algorithm (i)Linear solution: (a)Normalization: (b)DLT (ii)Minimization of geometric error: using the linear estimate as a starting point minimize the geometric error: (iii)Denormalization: ~~ ~
50
Calibration example (i)Canny edge detection (ii)Straight line fitting to the detected edges (iii)Intersecting the lines to obtain the images corners typically precision <1/10 (H&Z rule of thumb: 5 n constraints for n unknowns)
51
Errors in the world Errors in the image and in the world Errors in the image (standard case)
52
Restricted camera estimation Minimize geometric error impose constraint through parametrization Find best fit that satisfies skew s is zero pixels are square principal point is known complete camera matrix K is known Minimize algebraic error assume map from param q P=K[R|-RC], i.e. p=g(q) minimize ||Ag(q)||
53
Restricted camera estimation Initialization Use general DLT Clamp values to desired values, e.g. s=0, x = y Note: can sometimes cause big jump in error Alternative initialization Use general DLT Impose soft constraints gradually increase weights
55
Image of absolute conic
56
A simple calibration device (i)compute H for each square (corners (0,0),(1,0),(0,1),(1,1)) (ii)compute the imaged circular points H(1,±i,0) T (iii)fit a conic to 6 circular points (iv)compute K from through cholesky factorization (≈ Zhang’s calibration method)
57
Some typical calibration algorithms Tsai calibration Zhangs calibration http://research.microsoft.com/~zhang/calib/ Z. Zhang. A flexible new technique for camera calibration. IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(11):1330-1334, 2000. Z. Zhang. Flexible Camera Calibration By Viewing a Plane From Unknown Orientations. International Conference on Computer Vision (ICCV'99), Corfu, Greece, pages 666-673, September 1999. http://www.vision.caltech.edu/bouguetj/calib_doc/
58
58 Animal eye: a looonnng time ago. Pinhole perspective projection: Brunelleschi, XV th Century. Camera obscura: XVI th Century. Photographic camera: Niepce, 1816.
59
59 Limits for pinhole cameras
60
60 Camera obscura + lens
61
61 Lenses Snell’s law n 1 sin 1 = n 2 sin 2 Descartes’ law
62
62 Paraxial (or first-order) optics Snell’s law: n 1 sin 1 = n 2 sin 2 Small angles: n 1 1 n 2 2
63
63 Thin Lenses spherical lens surfaces; incoming light parallel to axis; thickness << radii; same refractive index on both sides
64
64 Thin Lenses http://www.phy.ntnu.edu.tw/java/Lens/lens_e.html
65
65 Thick Lens
66
66 The depth-of-field
67
67 The depth-of-field yields Similar formula for
68
68 The depth-of-field decreases with d, increases with Z 0 strike a balance between incoming light and sharp depth range
69
69 Deviations from the lens model 3 assumptions : 1. all rays from a point are focused onto 1 image point 2. all image points in a single plane 3. magnification is constant deviations from this ideal are aberrations
70
70 Aberrations chromatic : refractive index function of wavelength 2 types : 1. geometrical 2. chromatic geometrical : small for paraxial rays study through 3 rd order optics
71
71 Geometrical aberrations q spherical aberration q astigmatism q distortion q coma aberrations are reduced by combining lenses
72
72 Spherical aberration rays parallel to the axis do not converge outer portions of the lens yield smaller focal lenghts
73
73 Astigmatism Different focal length for inclined rays
74
74 Distortion magnification/focal length different for different angles of inclination Can be corrected! (if parameters are know) pincushion (tele-photo) barrel (wide-angle)
75
75 Ultra wide-angle optics Sometimes distortion is what you want Fisheye lens Cata-dioptric system (lens + mirror)
76
76 Coma point off the axis depicted as comet shaped blob
77
77 Chromatic aberration rays of different wavelengths focused in different planes cannot be removed completely sometimes achromatization is achieved for more than 2 wavelengths
78
78 Lens materials reference wavelengths : F = 486.13 nm d = 587.56 nm C = 656.28 nm lens characteristics : 1. refractive index n d 2. Abbe number V d = ( n d - 1) / ( n F - n C ) typically, both should be high allows small components with sufficient refraction notation : e.g. glass BK7(517642) n d = 1.517 and V d = 64.2
79
79 Lens materials additional considerations : humidity and temperature resistance, weight, price,... Crown Glass Fused Quartz & Fused Silica Plastic (PMMA) Calcium Fluoride Saphire Zinc Selenide 6000 18000 Germanium 14000 9000 100 200 400 600 800 1000 1200 1400 1600 1800 2000 2200 2400 WAVELENGTH (nm)
80
80 Vignetting Figure from http://www.vanwalree.com/optics/vignetting.html http://toothwalker.org/optics/vignetting.html
81
81 from Szeliski’s book
82
82 Next week: Image features
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.