formation - moodle 2019-2020 · • spatial and grayscale values have been made discrete. •...

59
1 Image Formation Light source properties Surface shape Surface reflectance properties Optics Sensor characteristics Exposure

Upload: others

Post on 20-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

1

Image FormationLight sourceproperties

Surface shape

Surface reflectancepropertiesOptics

Sensor characteristics

Exposure

Page 2: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

2

Analog Images

An image can be understood as a 2D light intensity function f(x,y) where: • x and y are spatial coordinates • f(x, y) is proportional to the brightness or gray value of the

image at that point.

! Cannot be stored as such on a digital computer.

Page 3: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

3

Digital Images

A digitized image is one in which: • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in

x and y directions are sampled to • 8 bits (256 values) per point for grayscale, • 3x8 bits per point for color images.

• They are stored as a two dimensional arrays of gray-level values. The array elements are called pixels and identified by their x, y coordinates.

Page 4: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

4

Black and White Images

Page 5: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

5

Color Images

A color image is often represented by three 8-bit images, one for red, one for green, and one for blue.

Page 6: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

6

Image Formation

Projection from surfaces to 2-D sensor. • Where: Geometry • How bright: Radiometry • Stored how: Sensing

Page 7: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

7

Pinhole Camera Model

Idealized model of the perspective projection:

• All rays go through a hole and form a pencil of lines.

• The hole acts as a ray selector that allows an inverted image to form.

Page 8: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

8

Escher’s Belvedere

Impossible Possible

http://www.cs.technion.ac.il/~gershon/

DoneM. C. Escher

Page 9: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

9

Magnet Like Slopes

Page 10: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

10

Virtual Image

• The real image forms on the image plane and is inverted. • Let us consider a virtual plane in front of the camera. • On this plane, we have a virtual non-inverted image.

—> It is simpler to reason in terms of that virtual image.

Page 11: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

11

Camera Geometry

Pinhole geometry without image reversalVirtual image

Pinhole = Center of Projection

From now on, we will use this formalism.

Page 12: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

12

Coordinate Systems

Xw

Yw

Zw

Xc

Yc

Zc

Page 13: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

13

Camera Coordinate System

• The center of the projection coincides with the origin of the world.

• The camera axis (optical axis) is aligned with the world’s z-axis.

• To avoid image inversion, the image plane is in front of the center of projection.

Page 14: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

14

1D Image

xf

f=

xc

zc

⇒ xi = xf = fxc

zc

Page 15: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

15

2D Image

xi = fxc

zc

yi = fyc

zcxc,yc,zc

We dropped the distinction between (xf,yf ) and (xi,yi).

Page 16: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

16

Distant Objects Appear Smaller

Because the car at the back has the same size in projection, we perceive it as being larger.

The green and red objects are of the same size but the red one is farther and therefore its projection smaller.

Page 17: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

17

Projected Parallel Lines Meet

• Their intersection is referred to as the vanishing point. • There is one per set of parallel 3D lines with the same

direction vector.

Page 18: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

18

Vanishing Points

• The projections of parallel lines all meet at one point, called the vanishing point.

• As the focal length increases, the vanishing point moves towards infinity.

Page 19: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

19

Road Following

Rasmussen et al. , BMVC’04

The vanishing point can be computed and used to direct an autonomous car.

Page 20: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

20

Projection is Non Linear

!Reformulate it as a linear operation using homogeneous coordinates.

u ∝ xi = fxc

zc

v ∝ yi = fyc

zcIn meters

In pixels

Page 21: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

21

Homogeneous Coordinates

• Homogeneous representation of 3D point:

• Homogeneous representation of 2D point:

• Scale invariance: X and lX represent the same point, same for x and lx.

Page 22: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

22

Simple Projection Matrix3D point expressed in projective coordinates.

2D point expressed in projective coordinates.

Xi =xz

= fXc

Zc

Yi =yz

= fYc

Zc

• represents[x, y, z]T

• Therefore is the projection of .

[x, y, z]T

[Xc, Yc, Zc,1]T

Let us write:

—> We have expressed the projection of a 3D point as the multiplication of its projective coordinates by a projection matrix.

Page 23: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

23

Intrinsic And Extrinsic Parameters

• Camera may not be at the origin, looking down the z-axis ! Extrinsic parameters

• One unit in image coordinates may not be the same as one unit in world coordinates ! Intrinsic parameters

Page 24: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

24

Complete Linear Camera Model

3D point expressed in projective coordinates

using the world coordinate system.

2D point expressed in projective coordinates

and in pixels.

Page 25: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

25

Matrix of Extrinsic Parameters

!Rotations and translations also expressed in terms of matrix multiplications in projective space.

Xw

Yw

Zw

Xc

Yc

Zc

It converts world coordinates into camera coordinates:

Page 26: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

26

Matrix of Intrinsic Parameters

It converts image coordinates into pixels:

u = Xi + pu = fX/Z + pu

v = Yi + pv = fY/Z + pv

K =

2

4f 0 pu0 f pv0 0 1

3

5

<latexit sha1_base64="VCKi0XCkJcpbd39difRszKiyCcM=">AAAC2HicbVJNb9QwEHVSPkr4WuDIZcQuCIG0JHsBDkhVuSBxKRLbbomjyPE6u1ZtJ9jOSqs0hx6g6pWfxo1/wU/AyYaqtIw00ps388aesbNScGPD8Jfnb127fuPm9q3g9p279+4PHjzcN0WlKZvSQhR6lhHDBFdsarkVbFZqRmQm2EF29L7NH6yYNrxQn+26ZIkkC8VzTol1VDr4jTO24KpmXxXRmqxfNEEFz+Cd81nK4SWUaeWiHGavvkAfYhys+prDvmYFeGlKQlkdSdl0gsO/ApfD8UTKJMCS2GWW1x+bXo4Fy20M/R0sySpBdFNTShsY5SNXETofuUNHrskm6GhHrc6p1iPATM3PWwDWfLG0CQQdfWG6dDAMx2FncBVEPRii3vbSwU88L2glmbJUEGPiKCxtUhNtORWsCXBlmJv8iCxY7KAikpmk7l6mgaeOmUNeaOfKQsdeVNREGrOWmatsd2Mu51ryf7m4svmbpOaqrCxTdHNQXgmwBbTPDHOuGbVi7QChmru7Al0STah1n6FdQnR55KtgOhm/HYefJsOd3X4b2+gxeoKeowi9RjvoA9pDU0S9fe/Y++Z992P/xD/1zzalvtdrHqF/zP/xB6QO1Qk=</latexit><latexit sha1_base64="VCKi0XCkJcpbd39difRszKiyCcM=">AAAC2HicbVJNb9QwEHVSPkr4WuDIZcQuCIG0JHsBDkhVuSBxKRLbbomjyPE6u1ZtJ9jOSqs0hx6g6pWfxo1/wU/AyYaqtIw00ps388aesbNScGPD8Jfnb127fuPm9q3g9p279+4PHjzcN0WlKZvSQhR6lhHDBFdsarkVbFZqRmQm2EF29L7NH6yYNrxQn+26ZIkkC8VzTol1VDr4jTO24KpmXxXRmqxfNEEFz+Cd81nK4SWUaeWiHGavvkAfYhys+prDvmYFeGlKQlkdSdl0gsO/ApfD8UTKJMCS2GWW1x+bXo4Fy20M/R0sySpBdFNTShsY5SNXETofuUNHrskm6GhHrc6p1iPATM3PWwDWfLG0CQQdfWG6dDAMx2FncBVEPRii3vbSwU88L2glmbJUEGPiKCxtUhNtORWsCXBlmJv8iCxY7KAikpmk7l6mgaeOmUNeaOfKQsdeVNREGrOWmatsd2Mu51ryf7m4svmbpOaqrCxTdHNQXgmwBbTPDHOuGbVi7QChmru7Al0STah1n6FdQnR55KtgOhm/HYefJsOd3X4b2+gxeoKeowi9RjvoA9pDU0S9fe/Y++Z992P/xD/1zzalvtdrHqF/zP/xB6QO1Qk=</latexit><latexit sha1_base64="VCKi0XCkJcpbd39difRszKiyCcM=">AAAC2HicbVJNb9QwEHVSPkr4WuDIZcQuCIG0JHsBDkhVuSBxKRLbbomjyPE6u1ZtJ9jOSqs0hx6g6pWfxo1/wU/AyYaqtIw00ps388aesbNScGPD8Jfnb127fuPm9q3g9p279+4PHjzcN0WlKZvSQhR6lhHDBFdsarkVbFZqRmQm2EF29L7NH6yYNrxQn+26ZIkkC8VzTol1VDr4jTO24KpmXxXRmqxfNEEFz+Cd81nK4SWUaeWiHGavvkAfYhys+prDvmYFeGlKQlkdSdl0gsO/ApfD8UTKJMCS2GWW1x+bXo4Fy20M/R0sySpBdFNTShsY5SNXETofuUNHrskm6GhHrc6p1iPATM3PWwDWfLG0CQQdfWG6dDAMx2FncBVEPRii3vbSwU88L2glmbJUEGPiKCxtUhNtORWsCXBlmJv8iCxY7KAikpmk7l6mgaeOmUNeaOfKQsdeVNREGrOWmatsd2Mu51ryf7m4svmbpOaqrCxTdHNQXgmwBbTPDHOuGbVi7QChmru7Al0STah1n6FdQnR55KtgOhm/HYefJsOd3X4b2+gxeoKeowi9RjvoA9pDU0S9fe/Y++Z992P/xD/1zzalvtdrHqF/zP/xB6QO1Qk=</latexit>

Principal point: p

Page 27: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

27

Matrix of Intrinsic Parameters

It converts image coordinates into pixels:

u = ↵uXi + pu = ↵uX/Z + pu

v = ↵vYi + pv = ↵vY/Z + pv

K =

2

4↵u 0 pu0 ↵v pv0 0 1

3

5

<latexit sha1_base64="7S3+g0bJNvS8DLeehmwhXICgowQ=">AAADDHicbVJNj9MwEHXC1xK+unDkMqIFIZC6SS/sHlZawQWJyyJRthBHleM6jbW2E2ynUhXlD3Dhr3DhAIgrP4Ab/wanTaG7y0ijvLx5M568OC0FNzYMf3v+pctXrl7buR7cuHnr9p3e7t23pqg0ZWNaiEJPUmKY4IqNLbeCTUrNiEwFO0lPX7T1kwXThhfqjV2WLJFkrnjGKbGOmu56fZyyOVc1+6CI1mT5pAkqeASHLjERZU6mFUymHJ5C6dAhbLF776GjMQ4WZ5sW8K5rWgDOTUkoqyMpG6f5p9gMcBIcj6RMAiyJzdOsftVsxgmW2Ri6JS1JK0F0U1NKGxhsVhk4YehyULbYDYP16+akwbrmnq4UduLICZma/Z0JWPN5bhMIVvSWH8G01w+H4SrgIog60EddHE97v/CsoJVkylJBjImjsL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p3e7t23pqg0ZWNaiEJPUmKY4IqNLbeCTUrNiEwFO0lPX7T1kwXThhfqjV2WLJFkrnjGKbGOmu56fZyyOVc1+6CI1mT5pAkqeASHLjERZU6mFUymHJ5C6dAhbLF776GjMQ4WZ5sW8K5rWgDOTUkoqyMpG6f5p9gMcBIcj6RMAiyJzdOsftVsxgmW2Ri6JS1JK0F0U1NKGxhsVhk4YehyULbYDYP16+akwbrmnq4UduLICZma/Z0JWPN5bhMIVvSWH8G01w+H4SrgIog60EddHE97v/CsoJVkylJBjImjsLRJTbTlVLAmwJVhzpJTMmexg4pIZpJ69TcbeOiYGWSFdqksrNjtjppIY5YydcrWLXO+1pL/q8WVzfaTmquyskzR9UFZJcAW0F4NmHHNqBVLBwjV3O0KNCeaUOsuUGtCdP6TL4LxaHgwDF+P+kfPOzd20H30AD1GEXqGjtBLdIzGiHofvc/eV++b/8n/4n/3f6ylvtf13ENnwv/5By7g6Is=</latexit>

The pixels are not necessarily square, must account for different scaling in x and y.

Page 28: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

28

• s encodes the non-orthogonality of the u and v directions. It is very close to zero in modern cameras.

K =

2

4↵u s pu0 ↵v pv0 0 1

3

5

<latexit sha1_base64="l0B1Q5kWGxjhoFfSQjpju2jrxIw=">AAACkHicbVFNb9NAEF2bAiVACfTYy6oJCHGI7AqJ9lAo5YLopZUIrRRb0XgzTlZdr93dcaXI8v/h93Dj37CbWKhfI4327XtvP2Ymq5S0FEV/g/DRxuMnTzef9Z6/eLn1qv/6zS9b1kbgWJSqNBcZWFRS45gkKbyoDEKRKTzPLr95/fwajZWl/knLCtMC5lrmUgA5atr/nWQ4l7rBKw3GwPJD20sKoEWWNyctf8cPXSYKc5rwzkmQ1QpM2wghWj5MQFULmNZDZ7Quh5XHPEk4j/y206+Ha82tTvKKz9gZUc/+38kTI+cLSnlvRd/4VG/aH0SjaBX8Pog7MGBdnE77f5JZKeoCNQkF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/nWQ4l7rBKw3GwPJD20sKoEWWNyctf8cPXSYKc5rwzkmQ1QpM2wghWj5MQFULmNZDZ7Quh5XHPEk4j/y206+Ha82tTvKKz9gZUc/+38kTI+cLSnlvRd/4VG/aH0SjaBX8Pog7MGBdnE77f5JZKeoCNQkF1k7iqKK0AUNSKHRl1hYrEJcwx4mDGgq0abPqaMvfOmbG89K41MRX7M0TDRTWLovMOX237F3Nkw9pk5ry/bSRuqoJtVg/lNeKU8n9ePhMGhSklg6AMNL9lYsFGBDkhuibEN8t+T4Y740ORtHZ3uDouOvGJtthu+w9i9kndsS+s1M2ZiLYCj4Gh8HncDs8CL+EX9fWMOjObLNbEf74Bx2OwAc=</latexit>

Matrix of Intrinsic Parameters

It converts image coordinates into pixels:

Page 29: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

29

Putting it All Together

Hartley, Chap 6.

x = PX

P = K [1 0 0 00 1 0 00 0 1 0] Rt

with K =αu s pu

0 αv pv

0 0 1, Rt = [R T

0 1 ] , and RTR = I .

Intrinsics Extrinsics

3D point2D projection

Projection Matrix

Page 30: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

30

Another Way to Write the Projection Matrix

Hartley, Chap 6.

x = PX

P =p11 p12 p13 p14p21 p22 p23 p24

p31 p32 p33 1

3D point2D projection

Projection Matrix

• In projective geometry, l x = x. Therefore the matrix P can always be rescaled so that its last element is one.

• The 3x4 matrix P has 11 degrees of freedom.

Page 31: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

31

Camera CalibrationInternal Parameters: • Horizontal and vertical scaling (2) • Principal points (2) • Skew of the axis (1) External Parameters: • Rotations (3) • Translations (3)

!There are 11 free parameters to estimate. This is known as calibrating the camera.

Page 32: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

32

Calibration Grid

xi = PXi

One way to calibrate: Take a picture of a calibration grid.

Page 33: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

33

Estimating the Camera Parameters

• Number of measurements required: • 11 degrees of freedom. • 2 constraints per correspondence.

• Direct linear transform: • Minimal solution for 6 correspondences • Over-constrained solutions by imposing

• Non linear optimization.

Hartley, Chap 7.

For all i, xi = PXi, with

Page 34: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

34

Limitations of the Pinhole Model

Idealization because the hole cannot be infinitely small • Image would be infinitely dim • Diffraction effects ! Use a lens to overcome this problem.

Page 35: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

35

Imaging With a Lens

An ideal lens performs the same projection as a pinhole but gathers much more light!

Image plane

P: point emitting light in all directions.

Page 36: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

36

Thin Lens Properties

• An incident ray that passes through the center of the lens will in effect continue in the direction it had when it entered the lens.

• Any incident ray traveling parallel to the optical axis, will refract and travel through the focal point on the opposite side of the lens.

• Any incident ray traveling through the focal point on the way to the lens will be refracted and travel parallel to the principal axis.

• All rays emanating from P and entering the lens will converge at P’.

optical axis

Image plane

Page 37: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

37

Camera Obscura

• Used by painters since the Renaissance to produce perspective projections. • Direct ancestors to the first film cameras.

Optional

Page 38: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

38

• He clearly knew all about the perspective transform!

Durer 1471-1528

Optional

Page 39: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

39

Shifting Perspective

China, 8th century:

•The focal point moves from one part of the image to the other.

•The characters are always seen at eye-level as the picture is unrolled.

Optional

Page 40: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

40

Thin Lens Equation

! Lens with focal distance f equivalent to pinhole camera with similar focal distance but larger aperture.

X

Page 41: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

41

Aperture

aperture

iris diaphragm

• Diameter d=2a of the lens that is exposed to light. • The image plane is not located exactly where the rays meet. • The greater a, the more blur there will be.

Image Plane

Page 42: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

42

Blur Circle

The size of the blur circle is proportional to the aperture.

Page 43: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

43

Depth of Field

• Range of object distances (d-d’) over which the image is sufficiently well focused.

• Range for which blur circle is less than the resolution of the sensor.

Small focal length —> Large depth of field.

Page 44: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

44

Proof

apertureblur circle(circle of confusion)

Sensor PlaneIn Focus

PointOut -of-

Focus Point

• Simple geometry:

• Thin lens equation:

rb =as′

|s − s′ |

1d

+1s

=1f

⇒ s =df

d − f1d

+1s′

=1f

⇒ s =d′ f

d′ − f

Large f and a —> Large rb.

s′ − s =f

d − ff

d′ − f(d − d′ )

rb =as′

f 2

(d − f )(d′ − f )

Page 45: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

45

Changing the Focal Length

• Wide field of view • (small f)

Narrow field of view (large f): Small depth of field.

rb =a

s0

����f2

(d0 � f)(d� f)

����

Small f ! Small rb<latexit sha1_base64="/fhJ0k6P0Jt4K8+bcIfVGGHUhK0=">AAACWXicb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7x07ZnHH2g/0ODoLD4FcYhoMw2lvDoN85Yv9MePQHzgCwiA==</latexit><latexit sha1_base64="/fhJ0k6P0Jt4K8+bcIfVGGHUhK0=">AAACWXicbVBNj9MwFHQC7JbwVdgjlycatOVAlfYCHJBWcOG4CMqu1ITqxXlurXWcYDugKps/yQUh8VeQcNscYJcn2RrNzNPYk9dKWpckP4Pwxs1bB4eD29Gdu/fuPxg+fPTJVo3hNOeVqsx5jpaU1DR30ik6rw1hmSs6yy/ebvWzr2SsrPRHt6kpK3GlpZAcnaeWwy+QLiIwyxxeQyoM8ha71h53kCoS7rLnxOdZ146L4+fiGYwLf3epkau1u4wgzaKUk3ZkpF5FH0pUCmIRQ7x3oDHVtxh63ufEy+EomSS7getg2oMR6+d0OfyeFhVvSh/CFVq7mCa1y1o0TnJFXZQ2lmrkF7iihYcaS7JZu6umg6eeKUBUxh/tYMf+vdFiae2mzL2zRLe2V7Ut+T9t0TjxMmulrhtHmu+DRKPAVbDtGQppiDu18QC5kf6twNfoy/RN2ciXML365etgPpu8miTvZ6OTN30bA/aYPWFjNmUv2Al7x07ZnHH2g/0ODoLD4FcYhoMw2lvDoN85Yv9MePQHzgCwiA==</latexit>

Wide field of view (small f): Large depth of field.

Page 46: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

46

f/11 1/30sec f/2.8 1/500sec

Changing Aperture

rb =a

s0

����f2

(d0 � f)(d� f)

����

Small a ! Small rb<latexit sha1_base64="niuDt8/QOsBzDhLSmDBp5ss8UT0=">AAACWXicbVBNb9NAFFybfgRTINAjl6fGVcOByMkFOCBVcOFYBKGVYjd6Xj8nq67XZncNilz/SS4Iib+CxCbxgX48aVejmXma3UkrKYyNot+e/2Bnd2+/9zB4dPD4ydP+s+dfTVlrTlNeylJfpGhICkVTK6yki0oTFqmk8/Tqw1o//07aiFJ9sauKkgIXSuSCo3XUvP8N4lkAep7CO4hzjbzBtjEnLcSScnvdcfnlpG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ylJfpGhICkVTK6yki0oTFqmk8/Tqw1o//07aiFJ9sauKkgIXSuSCo3XUvP8N4lkAep7CO4hzjbzBtjEnLcSScnvdcfnlpG2G2cmr/CUMM3e3sRaLpb0OIE6CmJOypIVaBJ8LlBJCDCHcOlDr8kcIHe9ywnl/EI2izcBdMO7AgHVzNu//jLOS14UL4RKNmY2jyiYNaiu4pDaIa0MV8itc0MxBhQWZpNlU08KxYzLIS+2OsrBh/99osDBmVaTOWaBdmtvamrxPm9U2f5M0QlW1JcW3QXktwZaw7hkyoYlbuXIAuRburcCX6Mp0TZnAlTC+/eW7YDoZvR1FnyaD0/ddGz32gh2xIRuz1+yUfWRnbMo4+8X+envevvfH9/2eH2ytvtftHLIb4x/+A8XqsIM=</latexit>

Small aperture, long exposure: Large depth of field.

Large aperture, short exposure: Small depth of field.

Page 47: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

47

Distortions

The lens is not exactly a “thin lens:” • Different wave lengths are refracted differently, • Barrel Distortion.

Page 48: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

48

Chromatic Aberration

Different wavelengths are refracted differently.

Page 49: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

49

Radial Lens Distortion

The distortion is a function of radial distance to the image center:

No Distortion Barrel Distortion Pincushion Distortion

ru = rd + k1 rd3

• rd: Observed distance of the projected point to the center. • ru: Distance of the point to the center in an image without

distortions.

ru

rd

Page 50: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

50

Lens Systems

Aberrations can be minimized by aligning several lenses with well chosen • Shapes,• Refraction indices.

Page 51: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

51

Undistorting

Real image Synthetic image

—> Create the synthetic image a sense without distortion would have produced.

Page 52: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

52

Undistorting

Once the image is undistorted, the camera projection can be formulated as a projective transform.

! The pinhole camera model applies.

Page 53: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

53

Fundamental Radiometric Equation

Scene Radiance (Rad) : Amount of light radiation emitted from a surface point (Watt / m2 / Steradian).

Image Irradiance (Irr): Amount of light incident at the image of the surface point (Watt / m2).

Irr =π4

(df

)2cos4(α)Rad ,

⇒ Irr ∝ Rad for small values of α .

Page 54: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

54

Vignetting

Images can get darker towards their edges because some of the light does not go through all the lenses.

Page 55: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

55

De Vignetting

Zheng et al., CVPR’08

—> As for undistortion, undo vignetting to create an image that an ideal camera would have produced.

Page 56: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

56

Sensor Array

• Photons free up electrons that are then captured by a potential well.

• Charges are transferred row by row wise to a register.

• Pixel values are read from the register.

Page 57: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

57

Sensing

Conversion of the “optical image” into an “electrical image”:

! Quantization in • Time • Space

Page 58: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

58

Sensors

•Charged Coupling Devices (CCD): Made through a special manufacturing process that allows the conversion from light to signal to take place in the chip without distortion.

•Complimentary Metal Oxide Semiconductor (CMOS): Easier to produce and quality almost as good. Will probably catch up.

CCD CMOS

Page 59: Formation - Moodle 2019-2020 · • Spatial and grayscale values have been made discrete. • Intensities measured across a regularly spaced grid in x and y directions are sampled

59

In Short

• Camera geometry can be modeled in terms of the pinhole camera model, which is linear in projective space.

• Image radiance is roughly proportional to surface radiance and the two can be used interchangeably for our purposes.