32
Geometric Transformations

Geometric Transformations...Distant objects are smaller (Forsyth & Ponce) Parallel lines meet Parallel lines meet Common to draw image plane in front of the focal point. Moving the

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Geometric Transformations...Distant objects are smaller (Forsyth & Ponce) Parallel lines meet Parallel lines meet Common to draw image plane in front of the focal point. Moving the

Geometric Transformations

Page 2: Geometric Transformations...Distant objects are smaller (Forsyth & Ponce) Parallel lines meet Parallel lines meet Common to draw image plane in front of the focal point. Moving the

Let’s design a camera

• Idea 1: put a piece of film in front of an object • Do we get a reasonable image?

Slide by Steve Seitz

Pinhole camera

• Add a barrier to block off most of the rays – This reduces blurring – The opening is known as the aperture

Slide by Steve Seitz

Page 3: Geometric Transformations...Distant objects are smaller (Forsyth & Ponce) Parallel lines meet Parallel lines meet Common to draw image plane in front of the focal point. Moving the

Camera Obscura

First Idea:Mo-Ti , China (470 BC to 390 BC)

First built: Ibn Al-Haytham or Alhazen, Iraq/Egypt (965 to 1039AD)

Page 4: Geometric Transformations...Distant objects are smaller (Forsyth & Ponce) Parallel lines meet Parallel lines meet Common to draw image plane in front of the focal point. Moving the

http://www.acmi.net.au/AIC/CAMERA_OBSCURA.html (Russell Naughton)

Camera Obscura

"When images of illuminated objects ... penetrate through a small hole into a very dark room ... you will see [on the opposite wall] these objects in their proper form and color, reduced in size ... in a reversed position, owing to the intersection of the rays".

Da Vinci

Page 5: Geometric Transformations...Distant objects are smaller (Forsyth & Ponce) Parallel lines meet Parallel lines meet Common to draw image plane in front of the focal point. Moving the

Pinhole cameras

• Abstract camera model - box with a small hole in it

• Pinhole cameras work in practice

(Forsyth & Ponce)

Page 6: Geometric Transformations...Distant objects are smaller (Forsyth & Ponce) Parallel lines meet Parallel lines meet Common to draw image plane in front of the focal point. Moving the

Distant objects are smaller

(Forsyth & Ponce)

Page 7: Geometric Transformations...Distant objects are smaller (Forsyth & Ponce) Parallel lines meet Parallel lines meet Common to draw image plane in front of the focal point. Moving the

Parallel lines meet

Page 8: Geometric Transformations...Distant objects are smaller (Forsyth & Ponce) Parallel lines meet Parallel lines meet Common to draw image plane in front of the focal point. Moving the

Parallel lines meetCommon to draw image plane in front of the focal point. Moving the image plane merely scales the image.

(Forsyth & Ponce)

Page 9: Geometric Transformations...Distant objects are smaller (Forsyth & Ponce) Parallel lines meet Parallel lines meet Common to draw image plane in front of the focal point. Moving the

Vanishing points

• Each set of parallel lines meets at a different point – The vanishing point for this direction

• Sets of parallel lines on the same plane lead to collinear vanishing points. – The line is called the horizon for that plane

Page 10: Geometric Transformations...Distant objects are smaller (Forsyth & Ponce) Parallel lines meet Parallel lines meet Common to draw image plane in front of the focal point. Moving the

Properties of Projection

•Points project to points •Lines project to lines •Planes project to the whole image or a half image

•Angles are not preserved •Degenerate cases

• Line through focal point projects to a point.

• Plane through focal point projects to line

• Plane perpendicular to image plane projects to part of the image (with horizon).

Page 11: Geometric Transformations...Distant objects are smaller (Forsyth & Ponce) Parallel lines meet Parallel lines meet Common to draw image plane in front of the focal point. Moving the

Take out paper and pencil

Page 12: Geometric Transformations...Distant objects are smaller (Forsyth & Ponce) Parallel lines meet Parallel lines meet Common to draw image plane in front of the focal point. Moving the

http://www.sanford-artedventures.com/create/tech_1pt_perspective.html

Page 13: Geometric Transformations...Distant objects are smaller (Forsyth & Ponce) Parallel lines meet Parallel lines meet Common to draw image plane in front of the focal point. Moving the

The equation of projection

(Forsyth & Ponce)

Page 14: Geometric Transformations...Distant objects are smaller (Forsyth & Ponce) Parallel lines meet Parallel lines meet Common to draw image plane in front of the focal point. Moving the

The equation of projection• Cartesian coordinates:

– We have, by similar triangles, that

– Ignore the third coordinate,

and get

Page 15: Geometric Transformations...Distant objects are smaller (Forsyth & Ponce) Parallel lines meet Parallel lines meet Common to draw image plane in front of the focal point. Moving the
Page 16: Geometric Transformations...Distant objects are smaller (Forsyth & Ponce) Parallel lines meet Parallel lines meet Common to draw image plane in front of the focal point. Moving the
Page 17: Geometric Transformations...Distant objects are smaller (Forsyth & Ponce) Parallel lines meet Parallel lines meet Common to draw image plane in front of the focal point. Moving the
Page 18: Geometric Transformations...Distant objects are smaller (Forsyth & Ponce) Parallel lines meet Parallel lines meet Common to draw image plane in front of the focal point. Moving the
Page 19: Geometric Transformations...Distant objects are smaller (Forsyth & Ponce) Parallel lines meet Parallel lines meet Common to draw image plane in front of the focal point. Moving the
Page 20: Geometric Transformations...Distant objects are smaller (Forsyth & Ponce) Parallel lines meet Parallel lines meet Common to draw image plane in front of the focal point. Moving the
Page 21: Geometric Transformations...Distant objects are smaller (Forsyth & Ponce) Parallel lines meet Parallel lines meet Common to draw image plane in front of the focal point. Moving the

Intrinsic matrix, K

[xy1] =

f 0 px0 f py0 0 1

[XYZ ]

f 0 px0 f py0 0 1

=1 0 px0 1 py0 0 1

f 0 00 f 00 0 1

Page 22: Geometric Transformations...Distant objects are smaller (Forsyth & Ponce) Parallel lines meet Parallel lines meet Common to draw image plane in front of the focal point. Moving the
Page 23: Geometric Transformations...Distant objects are smaller (Forsyth & Ponce) Parallel lines meet Parallel lines meet Common to draw image plane in front of the focal point. Moving the
Page 24: Geometric Transformations...Distant objects are smaller (Forsyth & Ponce) Parallel lines meet Parallel lines meet Common to draw image plane in front of the focal point. Moving the

Three different coordinate systems

X

x

Ocamera

OimageOworld

Page 25: Geometric Transformations...Distant objects are smaller (Forsyth & Ponce) Parallel lines meet Parallel lines meet Common to draw image plane in front of the focal point. Moving the
Page 26: Geometric Transformations...Distant objects are smaller (Forsyth & Ponce) Parallel lines meet Parallel lines meet Common to draw image plane in front of the focal point. Moving the

Camera extrinsic (or external) parameters• Transform a point from the world coordinate

to the camera’s coordinate system • Translation and rotation

Xc = R(Xw − Cw)

Xc = RXw − RCw

XcYcZc1

= [R −RCw0 1 ]

XwYwZw1

[R −RCw0 1 ] = [R 0

0 1][I −Cw0 1 ]

Page 27: Geometric Transformations...Distant objects are smaller (Forsyth & Ponce) Parallel lines meet Parallel lines meet Common to draw image plane in front of the focal point. Moving the

Camera extrinsic (or external) parameters

XcYcZc1

= [R −RCw0 1 ]

XwYwZw1

[R −RCw0 1 ] = [R 0

0 1][I −Cw0 1 ]

[R 00 1] =

r11 r12 r13 0r21 r22 r23 0r31 r32 r33 00 0 0 1

[I −Cw0 1 ] =

1 0 0 −cx0 1 0 −Cy0 0 1 −Cz0 0 0 1

Page 28: Geometric Transformations...Distant objects are smaller (Forsyth & Ponce) Parallel lines meet Parallel lines meet Common to draw image plane in front of the focal point. Moving the

Camera extrinsic (or external) parameters

XcYcZc1

=

r11 r12 r13 0r21 r22 r23 0r31 r32 r33 00 0 0 1

1 0 0 −Cx0 1 0 −Cy0 0 1 −Cz0 0 0 1

XwYwZw1

XcYcZc1

= R(I3×3 | − Cw)

XwYwZw1

[xy1] = K

XcYcZc1

K =f s px0 mf py0 0 1

Page 29: Geometric Transformations...Distant objects are smaller (Forsyth & Ponce) Parallel lines meet Parallel lines meet Common to draw image plane in front of the focal point. Moving the

SummaryXwYwzw

XcYczc

[xy]

world coordinates

camera coordinates

pixel coordinates

Page 30: Geometric Transformations...Distant objects are smaller (Forsyth & Ponce) Parallel lines meet Parallel lines meet Common to draw image plane in front of the focal point. Moving the
Page 31: Geometric Transformations...Distant objects are smaller (Forsyth & Ponce) Parallel lines meet Parallel lines meet Common to draw image plane in front of the focal point. Moving the

Homogeneous coordinates of a 3-D point

Homogeneous coordinates of its 2-D image

Image of a Point

Projection of a 3-D point to an image plane

P

Page 32: Geometric Transformations...Distant objects are smaller (Forsyth & Ponce) Parallel lines meet Parallel lines meet Common to draw image plane in front of the focal point. Moving the