image acquisition camera geometry summary

36
Image acquisition Camera geometry Summary Prof. Ioannis Pitas Aristotle University of Thessaloniki [email protected] www.aiia.csd.auth.gr Version 3.0

Upload: others

Post on 17-Apr-2022

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Image acquisition Camera geometry Summary

Image acquisition

Camera geometry

Summary

Prof. Ioannis Pitas

Aristotle University of Thessaloniki

[email protected]

www.aiia.csd.auth.gr

Version 3.0

Page 2: Image acquisition Camera geometry Summary

Image acquisition

โ€ข A still image visualizes a still object or scene, using a still picture camera.

โ€ข A video sequence (moving image) is the visualization of an object or scene

illuminated by a light source, using a video camera.

โ€ข The captured object, the light source and the video camera can all be either

moving or still.

โ€ข Thus, moving images are the projection of moving 3D objects on the camera

image plane, as a function of time.

โ€ข Digital video corresponds to their spatiotemporal sampling.

2

Page 3: Image acquisition Camera geometry Summary

Light reflection

โ€ข Objects reflect or emit light.

โ€ข Reflection can be decomposed in two components:

โ€ข Diffuse reflection (distributes light energy equally along any spatial

direction, allows perceiving object color).

โ€ข Specular reflection (strongest along the direction of the incident light,

incident light color is perceived).

โ€ข Lambertian surfaces perform only diffuse reflection, thus being

dull and matte (e.g., cement surface).

3

Page 4: Image acquisition Camera geometry Summary

Light reflection

5

Page 5: Image acquisition Camera geometry Summary

Light reflection

โ€ข Reflected irradiance when object surface produces diffuse

reflectance and incident light source comes from:

โ€ข Ambient illumination:

๐‘“๐‘Ÿ ๐‘‹, ๐‘Œ, ๐‘, ๐‘ก, ๐œ† = ๐‘Ÿ ๐‘‹, ๐‘Œ, ๐‘, ๐‘ก, ๐œ† โˆ™ ๐ธ๐›ผ ๐‘ก, ๐œ†

โ€ข Point light source:

๐‘“๐‘Ÿ ๐‘‹, ๐‘Œ, ๐‘, ๐‘ก, ๐œ† = ๐‘Ÿ ๐‘‹, ๐‘Œ, ๐‘, ๐‘ก, ๐œ† โˆ™ ๐ธ๐‘ ๐‘ก, ๐œ† โˆ™ cos ๐œƒ

โ€ข Distant point source and ambient illumination:

๐ธ ๐‘ก, ๐œ† = ๐ธ๐›ผ ๐‘ก, ๐œ† + ๐ธ๐‘ ๐‘ก, ๐œ† โˆ™ cos ๐œƒ

6

Page 6: Image acquisition Camera geometry Summary

Camera structure

7

Page 7: Image acquisition Camera geometry Summary

โ€ข The lens is the most important part of the camera.

โ€ข Incident light rays pass through a lens (or a group of lenses) and

get focused on the semiconductor chip.

โ€ข The distance between the lens center (optical center, ๐Ž) and the

point of convergence of the light rays inside the camera (focal

point, ๐…) is called focal length.

โ€ข Focal length characterizes the lens and determines the scene part

to be captured as well as scene object sizes (magnification).

Camera structure

8

Page 8: Image acquisition Camera geometry Summary

Pinhole Camera and Perspective Projection

13

Pinhole camera geometry.

Page 9: Image acquisition Camera geometry Summary

โ€ข Let us consider 2 coordinate systems:

โ€ข the camera (or standard) coordinate system (๐Ž๐‘ , ๐‘‹๐‘ , ๐‘Œ๐‘ , ๐‘๐‘) and

โ€ข the image coordinate system (๐จ, ๐‘ฅ, ๐‘ฆ).

โ€ข ๐‘‹๐‘, and ๐‘Œ๐‘ define the plane โ„ฑ that is parallel to the camera image

plane ๐”—, lying at a focal length ๐‘“ behind the optical center ๐Ž๐‘

along the optical axis ๐‘๐‘.

Pinhole Camera and Perspective Projection

14

Page 10: Image acquisition Camera geometry Summary

Pinhole Camera and Perspective Projection

15

Page 11: Image acquisition Camera geometry Summary

โ€ข We want to derive the equations that connect a 3D point (3D

vector) ๐๐‘ = ๐‘‹๐‘ , ๐‘Œ๐‘ , ๐‘๐‘๐‘‡ referenced in the camera coordinate

system with its projection point (2D vector) ๐ฉโ€ฒ = ๐‘ฅโ€ฒ, ๐‘ฆโ€ฒ ๐‘‡ on the

virtual image plane.

โ€ข By employing the similarity of triangles ๐Ž๐‘๐จโ€ฒ๐ฉโ€ฒ and ๐Ž๐‘๐™๐‘๐๐‘:

๐‘ฅโ€ฒ

๐‘‹๐‘=

๐‘ฆโ€ฒ

๐‘Œ๐‘=

๐‘“

๐‘๐‘, ๐‘ฅโ€ฒ = ๐‘“

๐‘‹๐‘

๐‘๐‘, ๐‘ฆโ€ฒ = ๐‘“

๐‘Œ๐‘

๐‘๐‘

โ€ข Coordinates on the real image plane are given by the same

equations, differing only by a minus sign.

Pinhole Camera and Perspective Projection

18

Page 12: Image acquisition Camera geometry Summary

โ€ข Perspective projection equations are rational, rather than linear.

Thus:

โ€ข straight lines are mapped to straight lines but

โ€ข distances between points and the angles between straight lines are not

preserved after projection.

โ€ข We can linearise them applying two transformations:

โ€ข orthographic projection ๐‘ฅโ€ฒ = ๐‘‹๐‘ and ๐‘ฆโ€ฒ = ๐‘Œ๐‘ and

โ€ข isotropic scaling ฮค๐‘“ าง๐‘

The Weak-Perspective Camera Model

19

Page 13: Image acquisition Camera geometry Summary

The Weak-Perspective Camera Model

20

Orthographic projection

Page 14: Image acquisition Camera geometry Summary

โ€ข While a weak-perspective camera preserves parallelism in the

projected lines, as orthographic projection does (b), perspective

projection (a) does not.

The Weak-Perspective Camera Model

22

Page 15: Image acquisition Camera geometry Summary

โ€ข A way to linearize the perspective projection equations is by using

the so-called homogeneous coordinates.

โ€ข A 2D image point is mapped to a 3D point:

๐ฉ = ๐‘ฅ, ๐‘ฆ ๐‘‡ โˆˆ โ„2 โŸถ ๐ฉ๐ป = ๐‘ฅ, ๐‘ฆ, 1 ๐‘‡ โˆˆ โ„™2.

โ€ข A 3D scene point is mapped to a 4D point:

๐ = ๐‘‹, ๐‘Œ, ๐‘ ๐‘‡ โˆˆ โ„3 โŸถ ๐๐ป = ๐‘‹, ๐‘Œ, ๐‘, 1 ๐‘‡ โˆˆ โ„™3.

Central Projection and Homogeneous Coordinates

23

Page 16: Image acquisition Camera geometry Summary

Camera Parameters and Projection Matrix

26

Page 17: Image acquisition Camera geometry Summary

โ€ข Extrinsic camera parameters:

โ€ข Translation vector ๐“ โˆˆ โ„3 (3 degrees of freedom)

โ€ข Orthonormal rotation matrix ๐‘ โˆˆ โ„3ร—3 (3 degrees of freedom: only 3 of

the 9 rotation matrix entries are independent from each other).

โ€ข The relationship between a point ๐๐‘ค โˆˆ โ„3 in world coordinates

and its camera coordinate counterpart ๐๐‘ โˆˆ โ„3 is:

๐๐‘ = ๐‘ ๐๐‘ค โˆ’ ๐“

Camera Parameters and Projection Matrix

27

Page 18: Image acquisition Camera geometry Summary

where:

โ€ข [๐‘œ๐‘ฅ , ๐‘œ๐‘ฆ]๐‘‡: the location of the principal camera point ๐จ in pixel

coordinates.

โ€ข ๐‘ ๐‘ฅ , ๐‘ ๐‘ฆ: the effective pixel sizes in millimeters

โ€ข Coordinate system origin: at the top left corner of the image, not

at the image center.

Camera Parameters and Projection Matrix

30

Page 19: Image acquisition Camera geometry Summary

Camera Parameters and Projection Matrix

31

Page 20: Image acquisition Camera geometry Summary

โ€ข Definition of the 3 ร— 4 matrix of extrinsic parameters ๐๐ธ:

๐๐ธ =

๐‘Ÿ11 ๐‘Ÿ12 ๐‘Ÿ13 โˆ’๐‘1๐‘‡๐“

๐‘Ÿ21 ๐‘Ÿ22 ๐‘Ÿ23 โˆ’๐‘2๐‘‡๐“

๐‘Ÿ31 ๐‘Ÿ32 ๐‘Ÿ33 โˆ’๐‘3๐‘‡๐“

โ€ข Definition of the 3 ร— 3 matrix of intrinsic parameters ๐๐ผ:

๐๐ผ =

โˆ’ ๐‘“๐‘ ๐‘ฅ

0 ๐‘œ๐‘ฅ

0 โˆ’ ๐‘“๐‘ ๐‘ฆ

๐‘œ๐‘ฆ

0 0 1

Camera Parameters and Projection Matrix

33

Page 21: Image acquisition Camera geometry Summary

โ€ข The transformation of a point ๐ โˆˆ โ„™3 to ๐ฉ โˆˆ โ„™2 is given by:

๐‘๐‘ฅ๐‘‘๐‘๐‘ฆ๐‘‘๐‘

= ๐๐ผ๐๐ธ

๐‘‹๐‘ค๐‘Œ๐‘ค๐‘๐‘ค1

๐ฉ = ๐๐ผ๐๐ธ๐ = ฦค๐

Camera Parameters and Projection Matrix

34

Page 22: Image acquisition Camera geometry Summary

Properties of the Projective Transformation

Vanishing points

Page 23: Image acquisition Camera geometry Summary

Properties of the Projective Transformation

โ€ข The cross-ratio of four collinear

points remains invariant under a

projective transformation:

๐ถ๐‘Ÿ ๐ฉ1, ๐ฉ2, ๐ฉ3, ๐ฉ4 =

๐ถ๐‘Ÿ ๐1, ๐2, ๐3, ๐4 .

Page 24: Image acquisition Camera geometry Summary

โ€ข Chirp effect: the increase in local

image spatial frequency

proportionally to the distance of

the projected scene area from the

camera.

โ€ข It is evident in 2D image regions

where distant and close-up scene

parts are projected.

Properties of the Projective Transformation

46

Page 25: Image acquisition Camera geometry Summary

โ€ข The weak-perspective projection is valid, if the depth variations

amongst the points of a viewed object are small, in comparison

with its average distance from the camera (object depth),

represented by ๐‘3๐‘‡ เดฅ๐ โˆ’ ๐“ .

โ€ข Another camera-at-infinity model is the affine camera model, with

projection matrix:

ฦค๐‘Ž๐‘“ =

๐‘Ž11 ๐‘Ž12 ๐‘Ž13 ๐‘Ž14๐‘Ž21 ๐‘Ž22 ๐‘Ž23 ๐‘Ž240 0 0 ๐‘Ž34

Cameras at Infinity

49

Page 26: Image acquisition Camera geometry Summary

โ€ข Camera calibration deals with determining the extrinsic and

intrinsic camera parameters.

โ€ข To this end, a calibration pattern, also called calibration grid is

employed, so that the projection matrix ฦค of the camera can be

computed from a single view by mapping known points ๐๐‘ค =

๐‘‹๐‘ค, ๐‘Œ๐‘ค, ๐‘๐‘ค๐‘‡ in world coordinates to their projections ๐ฉ = ๐‘ฅ, ๐‘ฆ ๐‘‡

on the image plane.

Camera Calibration

52

Page 27: Image acquisition Camera geometry Summary

Camera Calibration

54

Calibration patterns.

Page 28: Image acquisition Camera geometry Summary

โ€ข The calibration pattern is a 3D object of common, known

dimensions and positioning, with a checkerboard pattern clearly

visible on each side.

โ€ข Pattern dimensions must be known, in an accuracy much greater

than the desired calibration accuracy.

Camera Calibration

55

Page 29: Image acquisition Camera geometry Summary

โ€ข The most popular calibration techniques utilizing solely a planar

calibration pattern are:

โ€ข Direct camera parameter estimation and

โ€ข Zhangโ€™s calibration method.

โ€ข Other calibration methods do not require a calibration object and

are jointly referenced by the term self-calibration or

autocalibration.

Camera Calibration

56

Page 30: Image acquisition Camera geometry Summary

โ€ข ๐๐‘ค = ๐‘‹๐‘ค, ๐‘Œ๐‘ค , ๐‘๐‘ค๐‘‡: a known point in world coordinates.

โ€ข ๐๐‘ = ๐‘‹๐‘ , ๐‘Œ๐‘ , ๐‘๐‘๐‘‡ : the same point in camera coordinates.

โ€ข ๐ฉ๐‘‘ = ๐‘ฅ๐‘‘ , ๐‘ฆ๐‘‘๐‘‡: its image point in pixel coordinates.

โ€ข The transformation between the world and camera coordinate

systems involves an orthonormal 3 ร— 3 rotation matrix ๐‘ and a

3 ร— 1 translation vector ๐“ (equivalent to determining the extrinsic

camera parameters).

Direct camera parameter estimation

57

Page 31: Image acquisition Camera geometry Summary

โ€ข Each of the linear homogeneous equations has 8 unknown parameters:

๐ฎ = ๐‘Ž๐‘Ÿ11, ๐‘Ž๐‘Ÿ12, ๐‘Ž๐‘Ÿ13, ๐‘Ÿ21, ๐‘Ÿ22, ๐‘Ÿ23, ๐‘‡๐‘ฅ, ๐‘‡๐‘ฆ๐‘‡โ‰œ ๐‘ข1, ๐‘ข2, โ€ฆ , ๐‘ข8

๐‘‡

โ€ข Expressing the homogeneous system of equation as a product of the matrix ๐—

๐— โ‰œ

๐‘ฅ๐‘‘1๐‘‹๐‘ค1 ๐‘ฅ๐‘‘1๐‘Œ๐‘ค1 ๐‘ฅ๐‘‘1๐‘๐‘ค1 ๐‘ฅ๐‘‘1 โˆ’๐‘ฆ๐‘‘1๐‘‹๐‘ค1 โˆ’๐‘ฆ๐‘‘1๐‘Œ๐‘ค1 โˆ’๐‘ฆ๐‘‘1๐‘๐‘ค1 โˆ’๐‘ฆ๐‘‘1๐‘ฅ๐‘‘2๐‘‹๐‘ค2 ๐‘ฅ๐‘‘2๐‘Œ๐‘ค2 ๐‘ฅ๐‘‘2๐‘๐‘ค2 ๐‘ฅ๐‘‘2 โˆ’๐‘ฆ๐‘‘2๐‘‹๐‘ค2 โˆ’๐‘ฆ๐‘‘2๐‘Œ๐‘ค2 โˆ’๐‘ฆ๐‘‘2๐‘๐‘ค2 โˆ’๐‘ฆ๐‘‘2โ‹ฎ

๐‘ฅ๐‘‘๐‘๐‘‹๐‘ค๐‘

โ‹ฎ๐‘ฅ๐‘‘๐‘๐‘Œ๐‘ค๐‘

โ‹ฎ๐‘ฅ๐‘‘๐‘๐‘๐‘ค๐‘

โ‹ฎ๐‘ฅ๐‘‘๐‘

โ‹ฎโˆ’๐‘ฆ๐‘‘๐‘๐‘‹๐‘ค๐‘

โ‹ฎโˆ’๐‘ฆ๐‘‘๐‘๐‘Œ๐‘ค๐‘

โ‹ฎโˆ’๐‘ฆ๐‘‘๐‘๐‘๐‘ค๐‘

โ‹ฎโˆ’๐‘ฆ๐‘‘๐‘

and the vector ๐ฎ:

๐—๐ฎ = ๐ŸŽ

Direct camera parameter estimation

64

Page 32: Image acquisition Camera geometry Summary

โ€ข Thus, the desired solution is the null space of the matrix ๐—.

โ€ข Provided that ๐‘ โ‰ฅ 7 pairs are not coplanar:

โ€ข Matrix ๐— will have rank 7.

โ€ข The system of equations will have one non-trivial solution ๐ฎ โ‰  ๐ŸŽ ,

obtained via the singular value decomposition (SVD) of matrix ๐—:

๐— = ๐”๐šบ๐•๐‘‡

โ€ข ๐šบ is a diagonal matrix containing the singular values. The solution ๐ฎ is the

column of matrix ๐• corresponding to the zero singular value of ๐œฎ.

Direct camera parameter estimation

65

Page 33: Image acquisition Camera geometry Summary

โ€ข It uses a planar calibration pattern, posing in ๐‘ different

orientations ๐‘ โ‰ฅ 2 , by moving either the pattern of the camera.

โ€ข Precise knowledge of this motion is not

required.

โ€ข The calibration pattern can simply be

printed on a paper and attached to any

planar surface.

โ€ข It has educed complexity.

Zhangโ€™s calibration method

66

Page 34: Image acquisition Camera geometry Summary

โ€ข These approaches:

โ€ข do not require a calibration object and recover the camera parameters

from image information alone;

โ€ข are flexible but not very robust;

โ€ข exploit properties of the absolute conic of the projective geometry;

โ€ข typically require information equivalent to a partial 3D reconstruction of

the scene.

โ€ข Self-calibration is strongly related to the geometry of multiple

cameras.

Self-calibration

77

Page 35: Image acquisition Camera geometry Summary

Bibliography[PIT2019] I. Pitas, โ€œComputer visionโ€, Createspace/Amazon, in press. [SZE2011] R.Szelinski, โ€œ Computer Vision โ€ , Springer 2011[HAR2003] Hartley R, Zisserman A. , โ€œ Multiple view geometry in computer visionโ€ .

Cambridge university press; 2003.[DAV2017] Davies, E. Roy. โ€œComputer vision: principles, algorithms, applications,

learning โ€. Academic Press, 2017[TRU1998] Trucco E, Verri A. โ€œIntroductory techniques for 3-D computer visionโ€, Prentice

Hall, 1998.[PIT2017] I. Pitas, โ€œDigital video processing and analysis โ€ , China Machine Press, 2017

(in Chinese).[PIT2013] I. Pitas, โ€œDigital Video and Television โ€ , Createspace/Amazon, 2013.[PIT2000] I. Pitas, Digital Image Processing Algorithms and Applications, J. Wiley, 2000. [NIK2000] N. Nikolaidis and I. Pitas, 3D Image Processing Algorithms, J. Wiley, 2000.

62

Page 36: Image acquisition Camera geometry Summary

Q & A

Thank you very much for your attention!

Contact: Prof. I. Pitas

[email protected]

79