image formation and camera modelsyang/... · outline images and projection models camera models...

13
Outline Images and Projection Models Camera Models Camera Intrinsic Parameters Image Formation and Camera Models Allen Y. Yang Berkeley EE 225b Feb 28th, 2007 Allen Y. Yang Image Formation and Camera Models

Upload: others

Post on 31-Jul-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Image Formation and Camera Modelsyang/... · Outline Images and Projection Models Camera Models Camera Intrinsic Parameters Distortions from Physical Lenses Pinhole camera model assumes

Outline Images and Projection Models Camera Models Camera Intrinsic Parameters

Image Formation and Camera Models

Allen Y. Yang

Berkeley EE 225b

Feb 28th, 2007

Allen Y. Yang Image Formation and Camera Models

Page 2: Image Formation and Camera Modelsyang/... · Outline Images and Projection Models Camera Models Camera Intrinsic Parameters Distortions from Physical Lenses Pinhole camera model assumes

Outline Images and Projection Models Camera Models Camera Intrinsic Parameters

1 Images and Projection ModelsIntroductionPerspective ProjectionOrthographic Projection

2 Camera ModelsImaging through a Pinhole

3 Camera Intrinsic ParametersLense DistortionsModeling Camera Parameters

Allen Y. Yang Image Formation and Camera Models

Page 3: Image Formation and Camera Modelsyang/... · Outline Images and Projection Models Camera Models Camera Intrinsic Parameters Distortions from Physical Lenses Pinhole camera model assumes

Outline Images and Projection Models Camera Models Camera Intrinsic Parameters

Representation of Images

I : Σ ⊂ R2 → R+; (x , y) 7→ I (x , y).

This Lecture

1 How are images captured from 3-D world to 2-D?

2 Camera projection model?

3 Image formation?

Allen Y. Yang Image Formation and Camera Models

Page 4: Image Formation and Camera Modelsyang/... · Outline Images and Projection Models Camera Models Camera Intrinsic Parameters Distortions from Physical Lenses Pinhole camera model assumes

Outline Images and Projection Models Camera Models Camera Intrinsic Parameters

Perspective Projection

A modern camera projects 3-D world into 2-D image plane through perspective projection:

Properties of perspective projection:Foreshortening: Distance objects are smaller.

Allen Y. Yang Image Formation and Camera Models

Page 5: Image Formation and Camera Modelsyang/... · Outline Images and Projection Models Camera Models Camera Intrinsic Parameters Distortions from Physical Lenses Pinhole camera model assumes

Outline Images and Projection Models Camera Models Camera Intrinsic Parameters

Perspective Projection

Horizon line:

Vanishing points: Parallel lines in 3-D intersect at a point in the image plane.

How many vanishing points in these images?

Allen Y. Yang Image Formation and Camera Models

Page 6: Image Formation and Camera Modelsyang/... · Outline Images and Projection Models Camera Models Camera Intrinsic Parameters Distortions from Physical Lenses Pinhole camera model assumes

Outline Images and Projection Models Camera Models Camera Intrinsic Parameters

Correct perspective projections are visible in paintings.

(a) 1st Century B.C., Pompeii (b) “School of Athens”, Raphael, 1518

More reading: “Perspective” in wikipedia.com.

Allen Y. Yang Image Formation and Camera Models

Page 7: Image Formation and Camera Modelsyang/... · Outline Images and Projection Models Camera Models Camera Intrinsic Parameters Distortions from Physical Lenses Pinhole camera model assumes

Outline Images and Projection Models Camera Models Camera Intrinsic Parameters

Perspective Projection and Illusions

(c) Necker cube (d) Escher waterfall (e) Ames room

Allen Y. Yang Image Formation and Camera Models

Page 8: Image Formation and Camera Modelsyang/... · Outline Images and Projection Models Camera Models Camera Intrinsic Parameters Distortions from Physical Lenses Pinhole camera model assumes

Outline Images and Projection Models Camera Models Camera Intrinsic Parameters

Orthographic Projection Model

Orthographic projection:

The difference between perspective and orthographic was illustrated in Christian artwork:

(f) Perugino Fresco, Vatican (g) Birth of theVirgin, Ukraine

Allen Y. Yang Image Formation and Camera Models

Page 9: Image Formation and Camera Modelsyang/... · Outline Images and Projection Models Camera Models Camera Intrinsic Parameters Distortions from Physical Lenses Pinhole camera model assumes

Outline Images and Projection Models Camera Models Camera Intrinsic Parameters

Pinhole camera model (Camera Obscura)

Mo-Zi (5th century BC) −→ Aristotle (300 BC) −→ Da Vinci (1490) −→ Kepler (17th century)

Figure: Pinhole camera model.

Let p = [X , Y , Z ]T ∈ R3, and its image x = [x , y ]T ∈ R2:

x : X = y : Y = −f : Z

Hence, x = −f XZ

, y = −f YZ

.

Question: What is the projection model for orthographic projection?

Allen Y. Yang Image Formation and Camera Models

Page 10: Image Formation and Camera Modelsyang/... · Outline Images and Projection Models Camera Models Camera Intrinsic Parameters Distortions from Physical Lenses Pinhole camera model assumes

Outline Images and Projection Models Camera Models Camera Intrinsic Parameters

Frontal Camera Model

The pinhole camera model is inconvenience that the focal length f is negative.

Figure: Frontal pinhole camera model.

x =[ x

y

]=

f

Z

[XY

].

In homogeneous coordinates:

Z

xy1

=

f 0 0 00 f 0 00 0 1 0

XYZ1

.

Allen Y. Yang Image Formation and Camera Models

Page 11: Image Formation and Camera Modelsyang/... · Outline Images and Projection Models Camera Models Camera Intrinsic Parameters Distortions from Physical Lenses Pinhole camera model assumes

Outline Images and Projection Models Camera Models Camera Intrinsic Parameters

Distortions from Physical Lenses

Pinhole camera model assumes

1 Perfect pinhole camera lenses.

2 Image x = I (p) ∈ R2 be measured in infinite accuracy.

3 Principal point is at the center of the image.

Physical camera lenses give us

1 Distorted imaging projections.

(a) Fish-eye

(b) Nor-mal/Portrait

(c) Tele-photo

2 Finite resolutions defined by the sensing devices in digital cameras.

3 Offset between image center and optical center.

Allen Y. Yang Image Formation and Camera Models

Page 12: Image Formation and Camera Modelsyang/... · Outline Images and Projection Models Camera Models Camera Intrinsic Parameters Distortions from Physical Lenses Pinhole camera model assumes

Outline Images and Projection Models Camera Models Camera Intrinsic Parameters

Camera Intrinsic Parameters

Figure: Transformation from image coordinates to pixel coordinates.

Modeling the camera distortion

1 Transform from image coordinates (e.g., in metric units) to pixel coordinates.[ xsys

]=

[sx 00 sy

] [ xy

].

2 Translate the image origin.x ′ = xs + ox ; y ′ = ys + oy .

Allen Y. Yang Image Formation and Camera Models

Page 13: Image Formation and Camera Modelsyang/... · Outline Images and Projection Models Camera Models Camera Intrinsic Parameters Distortions from Physical Lenses Pinhole camera model assumes

Outline Images and Projection Models Camera Models Camera Intrinsic Parameters

In homogeneous coordinates:

x′ =

x ′

y ′

1

=

sx 0 ox

0 sy oy

0 0 1

xy1

.

Camera Intrinsic Matrix:

K.=

sx 0 ox

0 sy oy

0 0 1

.

Complete transformation from 3-D to 2-D pixel coordinates:

Z

x ′

y ′

1

=

sx 0 ox

0 sy oy

0 0 1

f 0 0 00 f 0 00 0 1 0

XYZ1

=

fsx 0 ox

0 fsy oy

0 0 1

1 0 0 00 1 0 00 0 1 0

XYZ1

.

In short hand,λx′ = KΠ0X.

K is called calibration matrix, Π0 is called (perspective) projection matrix.

Allen Y. Yang Image Formation and Camera Models