Introduction to pinhole cameras Lesson given by S erard in the course - - PowerPoint PPT Presentation

introduction to pinhole cameras
SMART_READER_LITE
LIVE PREVIEW

Introduction to pinhole cameras Lesson given by S erard in the course - - PowerPoint PPT Presentation

Introduction to pinhole cameras Lesson given by S erard in the course ebastien Pi Introduction aux techniques audio et vid eo (ULg, Pr. J.J. Embrechts) INTELSIG, Montefiore Institute, University of Li` ege, Belgium October 30,


slide-1
SLIDE 1

Introduction to pinhole cameras

Lesson given by S´ ebastien Pi´ erard in the course “Introduction aux techniques audio et vid´ eo” (ULg, Pr. J.J. Embrechts)

INTELSIG, Montefiore Institute, University of Li` ege, Belgium

October 30, 2013

1 / 21

slide-2
SLIDE 2

Optics : the light travels along straight line segments

The light travels along straight lines if one assumes a single material (air, glass, etc.) and a single frequency. Otherwise . . .

2 / 21

slide-3
SLIDE 3

Optics : behavior of a lens

Assuming the Gauss’ assumptions, all light rays coming from the same direction converge to a unique point on the focal plane.

3 / 21

slide-4
SLIDE 4

Optics : an aperture

4 / 21

slide-5
SLIDE 5

Optics : a pinhole camera

A pinhole camera is a camera with a very small aperture. The lens becomes completely useless. The camera is just a small hole. High exposure durations are needed due to the limited amount of light received.

5 / 21

slide-6
SLIDE 6

What is a camera ?

A camera is a function: point in the 3D world → pixel

  • x

y z

  • u

v

  • x

y z

  • x

y z

(c) →

  • u

v

(f ) →

  • u

v

  • x

y z

  • in the world 3D Cartesian coordinate system

  • x

y z

(c) in the 3D Cartesian coordinate system located

at the camera’s optical center (the hole), with the axis z(c) along its optical axis, and the axis y(c) pointing upperwards.

  • u

v

(f ) in the 2D Cartesian coordinate system locate in the

focal plane

  • u

v

  • in the 2D coordinate system screen or image

6 / 21

slide-7
SLIDE 7

(x y z) → (x y z)(c)

y(c)

z(c)

❅ ❅ ❅ ❘

x(c)

✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏ ✏ ✶

− → t

x

❅ ❅ ❅ ❅ ■

y

❅ ❅ ❅ ❘

z

❅ ❅

 

x(c) y(c) z(c)

   = R3×3   

x y z

   +   

tx ty tz

  

7 / 21

slide-8
SLIDE 8

(x y z) → (x y z)(c)

  

x(c) y(c) z(c)

   = R3×3   

x y z

   +   

tx ty tz

  

R is a matrix that gives the rotation from the world coordinate system to the camera coordinate system. The columns of R are the base vectors of the world coordinate system expressed in the camera coordinate system. In the following, we will assume that the two coordinate systems are orthonormal. In this case, we have RTR = I ⇔ R−1 = RT.

8 / 21

slide-9
SLIDE 9

(x y z)(c) → (u v)(f )

y(c)

z(c)

❅ ❅ ❘

x(c)

v(f )

❅ ❅ ❘

u(f ) f

❅ ❅ ❅ ❅ ❅ ❅ ❅ ❅ ❅ ❅ ❅ ❅ ❅ ❅ ❅ ❅ ❅ ❅ s ✟✟✟✟✟✟✟✟✟✟✟✟✟✟✟✟✟✟ ✟ ✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥ ✥ ❅ ❅ ❅ ❅ ❅ ❅ ❅ s

9 / 21

slide-10
SLIDE 10

(x y z)(c) → (u v)(f )

We suppose that the image plane is orthogonal to the optical axis. We have : u(f ) = x(c) f z(c) v(f ) = y(c) f z(c)

10 / 21

slide-11
SLIDE 11

(u v)(f ) → (u v)

✲ ✻

v(f ) u(f )

✂✂ ✂✂

v

✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✍ ✂ ✂ ✂ ✂ ✂ ✂ ✂✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂

u

✲ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂

u0 v0 θ

✲ ✛

1 ku

✻ ❄

1 kv

11 / 21

slide-12
SLIDE 12

(u v)(f ) → (u v)

We have : u = (u(f ) − v(f ) tan θ)ku + u0 v = v(f )kv + v0 The parameters ku and kv are scaling factors and (u0, v0) are the coordinates of the point where the optical axis crosses the image

  • plane. We pose suv = − ku

tan θ and obtain:

  

su sv s

   =   

ku suv u0 kv v0 1

     

su(f ) sv(f ) s

  

Often, the grid of photosensitive cells can be considered as nearly

  • rectangular. The parameter suv is then neglected and is considered

as 0.

12 / 21

slide-13
SLIDE 13

The complete pinhole camera model

With homogeneous coordinates the pinhole model can be written as a linear relation:

  

su sv s

   =   

ku suv u0 kv v0 1

     

f f 1

       

tx R3×3 ty tz 1

         

x y z 1

    

  

su sv s

   =   

αu Suv u0 αv v0 1

       

tx R3×3 ty tz 1

         

x y z 1

    

  

su sv s

   =   

m11 m12 m13 m14 m21 m22 m23 m24 m31 m32 m33 m34

       

x y z 1

    

with αu = f ku, αv = f kv, and Suv = f suv.

13 / 21

slide-14
SLIDE 14

Questions

Question What is the physical meaning of the homogeneous coordinates ? Think about all concurrent lines intersection at the origin and the three first elements of the homogeneous coordinates with (x y z)

  • n a sphere . . .

Question How many degrees of freedom has M3×4 ? (m31m32m33) is a unit vector since (m31m32m33) = (r31r32r33).

14 / 21

slide-15
SLIDE 15

The calibration step: finding the matrix M3×4

15 / 21

slide-16
SLIDE 16

The calibration step: finding the matrix M3×4

  

su sv s

   =   

m11 m12 m13 m14 m21 m22 m23 m24 m31 m32 m33 m34

       

x y z 1

    

therefore u = m11 x + m12 y + m13 z + m14 m31 x + m32 y + m33 z + m34 v = m21 x + m22 y + m23 z + m24 m31 x + m32 y + m33 z + m34 and

(m31 u − m11)x + (m32 u − m12)y + (m33 u − m13)z + (m34 u − m14) = (m31 v − m21)x + (m32 v − m22)y + (m33 v − m23)z + (m34 v − m24) =

16 / 21

slide-17
SLIDE 17

The calibration step: finding the matrix M3×4

          

x1 y1 z1 1 −u1x1 −u1y1 −u1z1 −u1 x2 y2 z2 1 −u2x2 −u2y2 −u2z2 −u2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xn yn zn 1 −unxn −unyn −unzn −un x1 y1 z1 1 −v1x1 −v1y1 −v1z1 −v1 x2 y2 z2 1 −v2x2 −v2y2 −v2z2 −v2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xn yn zn 1 −vnxn −vnyn −vnzn −vn

                         

m11 m12 m13 m14 m21 m22 m23 m24 m31 m32 m33 m34

              

= 0

17 / 21

slide-18
SLIDE 18

Questions

Question What is the minimum value for n ? 5.5 Question How can we solve the homogeneous system of the previous slide ? Apply a SVD and use the vector of the matrix V corresponding the smallest singular value. Question Is there a conditions on the set of 3D points used for calibrating the camera ? Yes, they should not be coplanar.

18 / 21

slide-19
SLIDE 19

Intrinsic and extrinsic parameters

  

m11 m12 m13 m14 m21 m22 m23 m24 m31 m32 m33 m34

   =   

αu Suv u0 αv v0 1

  

  • intrinsic parameters

  

tx R3×3 ty tz

  

  • extrinsic parameters

The decomposition can be achieved via the orthonormalising theorem of Graham-Schmidt, or via a QR decomposition since

  

m11 m12 m13 m21 m22 m23 m31 m32 m33

  

=

  

αu Suv u0 αv v0 1

     

r11 r12 r13 r21 r22 r23 r31 r32 r33

  

  

m33 m23 m13 m32 m22 m12 m31 m21 m11

  

=

  

r33 r23 r13 r32 r22 r12 r31 r21 r11

     

1 v0 u0 αv Suv αu

  

19 / 21

slide-20
SLIDE 20

Questions

Question What is the minimum of points to use for recalibrating a camera that has moved ? 3 since there are 6 degrees of freedom in the extrinsic parameters. Question What is this ?

20 / 21

slide-21
SLIDE 21

Bibliography

  • D. Forsyth and J. Ponce, Computer Vision: a Modern

Approach. Prentice Hall, 2003.

  • R. Hartley and A. Zisserman, Multiple View Geometry in

Computer Vision, 2nd ed. Cambridge University Press, 2004.

  • Z. Zhang,“A flexible new technique for camera calibration,”

IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 22, no. 11, pp. 1330–1334, 2000.

21 / 21