19
EE141 1 Computer Vision Geometric Camera Calibration 1 S.M. Abdallah Computer Vision Computer Vision Geometric Camera Calibration Geometric Camera Calibration Samer M Abdallah, PhD Faculty of Engineering and Architecture American University of Beirut Beirut, Lebanon September 2, 2004

Samer M Abdallah, PhD Faculty of Engineering and ...gerig/CS6320-S2013/Materials/...EE141 4 S.M. Abdallah Computer Vision Geometric Camera Calibration 4 Camera calibration Camera calibration

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Samer M Abdallah, PhD Faculty of Engineering and ...gerig/CS6320-S2013/Materials/...EE141 4 S.M. Abdallah Computer Vision Geometric Camera Calibration 4 Camera calibration Camera calibration

EE1411

Computer Vision Geometric Camera Calibration 1S.M. Abdallah

Computer VisionComputer Vision

Geometric Camera CalibrationGeometric Camera Calibration

Samer M Abdallah, PhD

Faculty of Engineering and ArchitectureAmerican University of BeirutBeirut, Lebanon

September 2, 2004

Page 2: Samer M Abdallah, PhD Faculty of Engineering and ...gerig/CS6320-S2013/Materials/...EE141 4 S.M. Abdallah Computer Vision Geometric Camera Calibration 4 Camera calibration Camera calibration

EE1412

Computer Vision Geometric Camera Calibration 2S.M. Abdallah

Series outlineSeries outline

Cameras and lensesGeometric camera modelsGeometric camera calibrationStereopsis

Page 3: Samer M Abdallah, PhD Faculty of Engineering and ...gerig/CS6320-S2013/Materials/...EE141 4 S.M. Abdallah Computer Vision Geometric Camera Calibration 4 Camera calibration Camera calibration

EE1413

Computer Vision Geometric Camera Calibration 3S.M. Abdallah

Lecture outlineLecture outline

The calibration problemLeast-square techniqueCalibration from pointsRadial distortionA note on calibration patterns

Page 4: Samer M Abdallah, PhD Faculty of Engineering and ...gerig/CS6320-S2013/Materials/...EE141 4 S.M. Abdallah Computer Vision Geometric Camera Calibration 4 Camera calibration Camera calibration

EE1414

Computer Vision Geometric Camera Calibration 4S.M. Abdallah

Camera calibrationCamera calibrationCamera calibration is determining the intrinsic and extrinsic parameters of

the camera.

The are three coordinate systems involved: image, camera, and world.

Key idea: to write the projection equations linking the known coordinates of a set of 3-D points and their projections, and solve for the camera parameters.

Page 5: Samer M Abdallah, PhD Faculty of Engineering and ...gerig/CS6320-S2013/Materials/...EE141 4 S.M. Abdallah Computer Vision Geometric Camera Calibration 4 Camera calibration Camera calibration

EE1415

Computer Vision Geometric Camera Calibration 5S.M. Abdallah

Projection matrixProjection matrix

M is only defined up to scale in this setting.

Page 6: Samer M Abdallah, PhD Faculty of Engineering and ...gerig/CS6320-S2013/Materials/...EE141 4 S.M. Abdallah Computer Vision Geometric Camera Calibration 4 Camera calibration Camera calibration

EE1416

Computer Vision Geometric Camera Calibration 6S.M. Abdallah

The calibration problemThe calibration problem

Page 7: Samer M Abdallah, PhD Faculty of Engineering and ...gerig/CS6320-S2013/Materials/...EE141 4 S.M. Abdallah Computer Vision Geometric Camera Calibration 4 Camera calibration Camera calibration

EE1417

Computer Vision Geometric Camera Calibration 7S.M. Abdallah

Linear systemsLinear systems

A x b=

A x b=

Square system:Unique solutionGaussian elimination

Rectangular system:underconstrained: Infinity of solutionsOverconstrained: no solution

Minimize |Ax-b|2

Page 8: Samer M Abdallah, PhD Faculty of Engineering and ...gerig/CS6320-S2013/Materials/...EE141 4 S.M. Abdallah Computer Vision Geometric Camera Calibration 4 Camera calibration Camera calibration

EE1418

Computer Vision Geometric Camera Calibration 8S.M. Abdallah

How do you solve overconstrained linear equations?How do you solve overconstrained linear equations?

Page 9: Samer M Abdallah, PhD Faculty of Engineering and ...gerig/CS6320-S2013/Materials/...EE141 4 S.M. Abdallah Computer Vision Geometric Camera Calibration 4 Camera calibration Camera calibration

EE1419

Computer Vision Geometric Camera Calibration 9S.M. Abdallah

Homogeneous linear equationsHomogeneous linear equations

A x 0=

A x 0=

Square system:Unique solution = 0Unless Det(A) = 0

Rectangular system:0 is always a solution

Minimize |Ax|2 under the constraint |x|2 = 1

Page 10: Samer M Abdallah, PhD Faculty of Engineering and ...gerig/CS6320-S2013/Materials/...EE141 4 S.M. Abdallah Computer Vision Geometric Camera Calibration 4 Camera calibration Camera calibration

EE14110

Computer Vision Geometric Camera Calibration 10S.M. Abdallah

How do you solve overconstrained homogeneous linear equations?How do you solve overconstrained homogeneous linear equations?

The solution is the eigenvector e1 with least eigenvalue of UT U.

Page 11: Samer M Abdallah, PhD Faculty of Engineering and ...gerig/CS6320-S2013/Materials/...EE141 4 S.M. Abdallah Computer Vision Geometric Camera Calibration 4 Camera calibration Camera calibration

EE14111

Computer Vision Geometric Camera Calibration 11S.M. Abdallah

Example: Line fittingExample: Line fittingProblem: minimize

with respect to (a,b,d).

• Minimize E with respect to d:

• Minimize E with respect to a,b:

where and

Page 12: Samer M Abdallah, PhD Faculty of Engineering and ...gerig/CS6320-S2013/Materials/...EE141 4 S.M. Abdallah Computer Vision Geometric Camera Calibration 4 Camera calibration Camera calibration

EE14112

Computer Vision Geometric Camera Calibration 12S.M. Abdallah

Estimation of the projection matrixEstimation of the projection matrix

The constraints associated with the n points yield a system of 2n homogeneous linear equations in the 12 coefficients of the matrix M,

When n ≥ 6, homogeneous linear least-square can be used to compute the value of the unit vector m (hence the matrix M) that minimizes |Pm|2 as the solution of an eigenvalue problem. The solution is the eigenvector with least eigenvalue of PTP.

Page 13: Samer M Abdallah, PhD Faculty of Engineering and ...gerig/CS6320-S2013/Materials/...EE141 4 S.M. Abdallah Computer Vision Geometric Camera Calibration 4 Camera calibration Camera calibration

EE14113

Computer Vision Geometric Camera Calibration 13S.M. Abdallah

Once M is known, you still got to recover the intrinsic and extrinsic parameters!

This is a decomposition problem, NOT an estimation problem.

Intrinsic parametersExtrinsic parameters

ρ

Estimation of the intrinsic and extrinsic parametersEstimation of the intrinsic and extrinsic parameters

Page 14: Samer M Abdallah, PhD Faculty of Engineering and ...gerig/CS6320-S2013/Materials/...EE141 4 S.M. Abdallah Computer Vision Geometric Camera Calibration 4 Camera calibration Camera calibration

EE14114

Computer Vision Geometric Camera Calibration 14S.M. Abdallah

Estimation of the intrinsic and extrinsic parametersEstimation of the intrinsic and extrinsic parametersWrite M = (A, b), therefore

Using the fact that the rows of a rotation matrix have unit length and are perpendicular to each other yields

and

Page 15: Samer M Abdallah, PhD Faculty of Engineering and ...gerig/CS6320-S2013/Materials/...EE141 4 S.M. Abdallah Computer Vision Geometric Camera Calibration 4 Camera calibration Camera calibration

EE14115

Computer Vision Geometric Camera Calibration 15S.M. Abdallah

Estimation of the intrinsic and extrinsic parametersEstimation of the intrinsic and extrinsic parameters

Page 16: Samer M Abdallah, PhD Faculty of Engineering and ...gerig/CS6320-S2013/Materials/...EE141 4 S.M. Abdallah Computer Vision Geometric Camera Calibration 4 Camera calibration Camera calibration

EE14116

Computer Vision Geometric Camera Calibration 16S.M. Abdallah

Taking radial distortion into accountTaking radial distortion into account

PMz

p⎟⎟⎟

⎜⎜⎜

⎛=

100010001

1 λλ

Assuming that the image centre is known (u0 = v0 = 0), model the projection process as:

where λ is a polynomial function of the squared distance d 2 between the image centre and the image point p.

It is sufficient to use low-degree polynomial:

),,1( tscoefficien distortion theand 3 with ,11

2 qpqd p

q

p

pp K=≤+= ∑

=

κκλ

222 ˆˆ vud +=

This yields highly nonlinear constraints on the q + 11 camera parameters.

Page 17: Samer M Abdallah, PhD Faculty of Engineering and ...gerig/CS6320-S2013/Materials/...EE141 4 S.M. Abdallah Computer Vision Geometric Camera Calibration 4 Camera calibration Camera calibration

EE14117

Computer Vision Geometric Camera Calibration 17S.M. Abdallah

Calibration patternCalibration patternThe accuracy of the calibration

depends on the accuracy of the measurements of the calibration pattern.

Page 18: Samer M Abdallah, PhD Faculty of Engineering and ...gerig/CS6320-S2013/Materials/...EE141 4 S.M. Abdallah Computer Vision Geometric Camera Calibration 4 Camera calibration Camera calibration

EE14118

Computer Vision Geometric Camera Calibration 18S.M. Abdallah

Line intersection and point sortingLine intersection and point sorting

Extract and link edges using Canny;Fit lines to edges using orthogonal regression;Intersect lines.

Page 19: Samer M Abdallah, PhD Faculty of Engineering and ...gerig/CS6320-S2013/Materials/...EE141 4 S.M. Abdallah Computer Vision Geometric Camera Calibration 4 Camera calibration Camera calibration

EE14119

Computer Vision Geometric Camera Calibration 19S.M. Abdallah

ReferencesReferences“Computer Vision: A Modern Approach”. D. Forsyth and J. Ponce, Prentice Hall, 2003“Introductory Techniques for 3-D Computer Vision”. E. Trucco and A. Verri, Prentice Hall, 2000“Geometric Frame Work for Vision – Lecture Notes”. A. Zisserman, University of Oxford