Docsity

Computer vision appunti, Dispense di Computer Graphics

Anteprima parziale del testo

Scarica Computer vision appunti e più Dispense in PDF di Computer Graphics solo su Docsity!

INTELLIGENT AUTONOMOUS SYSTEMS LAB

Projective geometry

Stefano Ghidoni

IAS-LAB

  • Geometry of projection
  • Reference systems and transformations for
    • Modeling the projection
    • Modeling the sensor
    • Modeling the camera orientation

Agenda

Slides by Stefano Ghidoni and Alberto Pretto. Reference: Forsyth, Ponce, Computer vision: a modern approach

2

IAS-LAB

  • Consider a point P and its projection p

Camera projection

Perspective view Side view

IAS-LAB

Camera projection

  • Now consider a plane that is
    • Parallel to the image plane
    • In front of the optical center
    • At the same distance f from the optical center
      • Easier to work on this plane
        • Same geometrical relation
        • Avoid the upside-down effect

Perspective view Side view

IAS-LAB

(recall)

Camera projection

IAS-LAB

  • Similar triangle rule

𝑝

𝑝

𝑝

  • Analogously for x

Camera projection

IAS-LAB

  • Projecting points on a 2D surface causes the

loss of the distance information

Loosing a dimension

Projected onto the

same image point

IAS-LAB

  • The equations can be rearranged in matrix

form using the homogeneous coordinates

  • Reminder – transforming to / from

homogeneous coordinates:

Homogeneous coordinates

𝑥

𝑦

𝑤 ෥𝑥

𝑤 ෥𝑦

𝑤 ෥

=

𝑥 ෤

𝑦 ෤

𝑤 ෥

𝑥 ෤

𝑦 ෤

𝑤 ෥

𝑥 ෤/ 𝑤෥

𝑦 ෤/ 𝑤෥

IAS-LAB

  • When f=1 we obtain the essential perspective

projection

  • This represents the core of the projection

process

Projection matrix

IAS-LAB

  • So far: the projection matrix describes how

the 3D world is mapped onto the image plane

  • Now reflect:
    • What measurement unit is used for distances in

the 3D world?

  • What measurement unit is used for distances on

the projection plane?

  • What measurement unit do we commonly use for

distances in a digital image?

Reference systems and meas. units

IAS-LAB

  • We need to map points projected onto the

image plane in the coordinates used for pixels

  • From 𝑥, 𝑦 to 𝑢, 𝑣

Mapping to image coordinates

IAS-LAB

  • The transformation can be

defined considering the

coordinates of the principal

point to be 𝑢

0

0

  • The origin is in the top-left

corner

Mapping to image coordinates

IAS-LAB

  • Mapping from 𝑥, 𝑦 to 𝑢, 𝑣

is obtained by translation and

scaling:

0

𝑝

0

𝑢

𝑝

0

𝑝

0

𝑣

𝑝

Mapping to image coordinates

IAS-LAB

  • We can combine the mappings:
    • From 3D to 2D image plane
    • From image plane to pixels

By substituting the last equations into the

projection equation

From 3D to pixel coordinates