29
EECS 274 Computer Vision Cameras

EECS 274 Computer Vision Cameras. Camera models –Pinhole Perspective Projection – Affine Projection – Spherical Perspective Projection Camera with lenses

Embed Size (px)

Citation preview

Page 1: EECS 274 Computer Vision Cameras. Camera models –Pinhole Perspective Projection – Affine Projection – Spherical Perspective Projection Camera with lenses

EECS 274 Computer Vision

Cameras

Page 2: EECS 274 Computer Vision Cameras. Camera models –Pinhole Perspective Projection – Affine Projection – Spherical Perspective Projection Camera with lenses

Cameras

• Camera models– Pinhole Perspective Projection– Affine Projection– Spherical Perspective Projection

• Camera with lenses• Sensing• Human eye• Reading: FP Chapter 1, S Chapter 2

Page 3: EECS 274 Computer Vision Cameras. Camera models –Pinhole Perspective Projection – Affine Projection – Spherical Perspective Projection Camera with lenses

Images are two-dimensional patterns of brightness values.

They are formed by the projection of 3D objects.

Figure from US Navy Manual of Basic Optics and Optical Instruments, prepared by Bureau of Naval Personnel. Reprinted by Dover Publications, Inc., 1969.

Page 4: EECS 274 Computer Vision Cameras. Camera models –Pinhole Perspective Projection – Affine Projection – Spherical Perspective Projection Camera with lenses

Animal eye: a looonnng time ago.

Pinhole perspective projection: Brunelleschi, XVth Century.Camera obscura: XVIth Century.

Photographic camera:Niepce, 1816.

Reproduced by permission, the American Society of Photogrammetry andRemote Sensing. A.L. Nowicki, “Stereoscopy.” Manual of Photogrammetry,Thompson, Radlinski, and Speert (eds.), third edition, 1966.

Figure from US Navy Manual of Basic Optics and Optical Instruments, prepared by Bureau of Naval Personnel. Reprinted by Dover Publications, Inc., 1969.

Page 5: EECS 274 Computer Vision Cameras. Camera models –Pinhole Perspective Projection – Affine Projection – Spherical Perspective Projection Camera with lenses

Parallel lines: appear to converge on a line formed by the intersection of a plane parallel to π and image plane

L in π that is parallel to image plane has no image at all

B’ and C’ have same heightA’ is half of B’

From the model C is half the size of BA is half the size of Bhn

Page 6: EECS 274 Computer Vision Cameras. Camera models –Pinhole Perspective Projection – Affine Projection – Spherical Perspective Projection Camera with lenses

Vanishing point

Page 7: EECS 274 Computer Vision Cameras. Camera models –Pinhole Perspective Projection – Affine Projection – Spherical Perspective Projection Camera with lenses

Vanishing point

The lines all converge in his right eye, drawing the viewers gaze to this place.

Page 8: EECS 274 Computer Vision Cameras. Camera models –Pinhole Perspective Projection – Affine Projection – Spherical Perspective Projection Camera with lenses

Pinhole Perspective Equation

z

yfy

z

xfx

z

f

y

y

x

x

zf

yy

xx

''

''

'''

'

'

'

NOTE: z is always negative

• C’ : image center• OC’: optical axis• π’ : image plane is at a positive distance f’ from the pinhole• OP’= λ OP• P: (x,y,z), P’(x’,y’,z’)

Page 9: EECS 274 Computer Vision Cameras. Camera models –Pinhole Perspective Projection – Affine Projection – Spherical Perspective Projection Camera with lenses

Affine projection models: Weak perspective projection

0

'where

'

'

z

fm

myy

mxx

is the magnification.

When the scene relief (depth) is small compared its distance from thecamera, m can be taken constant: weak perspective projection.

frontal-parallel plane π0 defined by z=z0

Page 10: EECS 274 Computer Vision Cameras. Camera models –Pinhole Perspective Projection – Affine Projection – Spherical Perspective Projection Camera with lenses

Affine projection models: Orthographic projection

yy

xx

'

' When the camera is always at a(roughly constant) distancefrom the scene, take m=-1

Page 11: EECS 274 Computer Vision Cameras. Camera models –Pinhole Perspective Projection – Affine Projection – Spherical Perspective Projection Camera with lenses

Planar pinhole perspective

Orthographicprojection

Spherical pinholeperspective

Page 12: EECS 274 Computer Vision Cameras. Camera models –Pinhole Perspective Projection – Affine Projection – Spherical Perspective Projection Camera with lenses

Pinhole too big - many directions are averaged, blurring the image

Pinhole too small- diffraction effects blur the image

Generally, pinhole cameras are dark, becausea very small set of raysfrom a particular pointhits the screen

Pinhole camera

Page 13: EECS 274 Computer Vision Cameras. Camera models –Pinhole Perspective Projection – Affine Projection – Spherical Perspective Projection Camera with lenses

Snell’s law (aka Descartes’ law)

Ignoring diffraction, interference

n1 sin 1 = n2 sin 2

n: index of refraction

reflection

refraction

Lenses

Page 14: EECS 274 Computer Vision Cameras. Camera models –Pinhole Perspective Projection – Affine Projection – Spherical Perspective Projection Camera with lenses

Snell’s law:

n1 sin 1 = n2 sin 2

Small angles:

n11 ¼ n22

Paraxial (or first-order) optics

Page 15: EECS 274 Computer Vision Cameras. Camera models –Pinhole Perspective Projection – Affine Projection – Spherical Perspective Projection Camera with lenses

Small angles:

n11 ¼ n22 R

nn

d

n

d

n 12

2

2

1

1

222

111

d

h

R

h

d

h

R

h

Paraxial (or first-order) optics

Page 16: EECS 274 Computer Vision Cameras. Camera models –Pinhole Perspective Projection – Affine Projection – Spherical Perspective Projection Camera with lenses

)1(2 and

11

'

1 e wher

''

''

n

Rf

fzz

z

yzy

z

xzx

f: focal length F, F’: focal points

Thin lenses: n=1

Thin Lenses

Page 17: EECS 274 Computer Vision Cameras. Camera models –Pinhole Perspective Projection – Affine Projection – Spherical Perspective Projection Camera with lenses

Depth of field and field of view• Depth of field (field of focus): objects

within certain range of distances are in acceptable focus– Depends on focal length and aperture

• Field of view: portion of scene space that are actually projected onto camera sensors– Not only defined by focal length– But also depends on effective sensor area

Page 18: EECS 274 Computer Vision Cameras. Camera models –Pinhole Perspective Projection – Affine Projection – Spherical Perspective Projection Camera with lenses

Depth of field

• Changing the aperture size affects depth of field– A smaller aperture increases the range in which the object is

approximately in focus– f number = f/D (f: focal length, D: diameter or aperature)

f / 5.6

f / 32

Page 19: EECS 274 Computer Vision Cameras. Camera models –Pinhole Perspective Projection – Affine Projection – Spherical Perspective Projection Camera with lenses

Thick lenses

• Simple lenses suffer from several aberrations• First order approximation is not sufficient• Use 3rd order Taylor approximation

Page 20: EECS 274 Computer Vision Cameras. Camera models –Pinhole Perspective Projection – Affine Projection – Spherical Perspective Projection Camera with lenses

Orthographic/telecentric lenses

http://www.lhup.edu/~dsimanek/3d/telecent.htm

Navitar telecentric zoom lens

Page 21: EECS 274 Computer Vision Cameras. Camera models –Pinhole Perspective Projection – Affine Projection – Spherical Perspective Projection Camera with lenses

Correcting radial distortion

from Helmut Dersch

Page 22: EECS 274 Computer Vision Cameras. Camera models –Pinhole Perspective Projection – Affine Projection – Spherical Perspective Projection Camera with lenses

SphericalAberration•rays do not intersect at one point•circle of least confusion

Distortion

ChromaticAberrationrefracted rays of different wavelengths intersect the optical axis at different points

Figure from US Navy Manual of Basic Optics and Optical Instruments, prepared by Bureau of Naval Personnel. Reprinted by Dover Publications, Inc., 1969.

pincushion barrel

Page 23: EECS 274 Computer Vision Cameras. Camera models –Pinhole Perspective Projection – Affine Projection – Spherical Perspective Projection Camera with lenses

Vignetting

• Aberrations can be minimized by aligning simple lenses with well-chosen shapes and refraction indexes, separated by appropriate stops• These compound lenses can still be modeled by thick lenses• However, light rays from object points off-axis are partially blocked by lens configuration vignetting brightness drop in the image periphery

Page 24: EECS 274 Computer Vision Cameras. Camera models –Pinhole Perspective Projection – Affine Projection – Spherical Perspective Projection Camera with lenses

Helmoltz’s SchematicEye

Reproduced by permission, the American Society of Photogrammetry andRemote Sensing. A.L. Nowicki, “Stereoscopy.” Manual of Photogrammetry,Thompson, Radlinski, and Speert (eds.), third edition, 1966.

Corena: transparent highly curved refractive componentPupil: opening at center of iris in response to illumination

Human eye

Page 25: EECS 274 Computer Vision Cameras. Camera models –Pinhole Perspective Projection – Affine Projection – Spherical Perspective Projection Camera with lenses

Retina: thin, layered membrane with two types of photoreceptors

• rods: very sensitive to light but poor spatial detail• cones: sensitive to spatial details but active at higher light level • generally called receptive field

Reprinted from Foundations of Vision, by B. Wandell, Sinauer Associates, Inc., (1995). 1995 Sinauer Associates, Inc.

Cones in the fovea Rods and cones in the periphery

Reprinted from Foundations of Vision, by B. Wandell, Sinauer Associates, Inc., (1995). 1995 Sinauer Associates, Inc.

Receptive field

Page 26: EECS 274 Computer Vision Cameras. Camera models –Pinhole Perspective Projection – Affine Projection – Spherical Perspective Projection Camera with lenses

Photographs (Niepce, “La Table Servie,” 1822)

Milestones: Daguerreotypes (1839)Photographic Film (Eastman,1889)Cinema (Lumière Brothers,1895)Color Photography (LumièreBrothers, 1908)Television (Baird, Farnsworth,Zworykin, 1920s)

CCD Devices (1970)

Collection Harlingue-Viollet. .

Sensing

Page 27: EECS 274 Computer Vision Cameras. Camera models –Pinhole Perspective Projection – Affine Projection – Spherical Perspective Projection Camera with lenses

360 degree field of view…

• Basic approach– Take a photo of a parabolic mirror with an orthographic lens (Nayar)– Or buy one a lens from a variety of omnicam manufacturers…

• See http://www.cis.upenn.edu/~kostas/omni.html

Page 28: EECS 274 Computer Vision Cameras. Camera models –Pinhole Perspective Projection – Affine Projection – Spherical Perspective Projection Camera with lenses

Digital camera

• A digital camera replaces film with a sensor array– Each cell in the array is a Charge Coupled Device

• light-sensitive diode that converts photons to electrons• other variants exist: CMOS is becoming more popular• http://electronics.howstuffworks.com/digital-camera.htm

Page 29: EECS 274 Computer Vision Cameras. Camera models –Pinhole Perspective Projection – Affine Projection – Spherical Perspective Projection Camera with lenses

Image sensing pipeline