Top Banner
CSE152, Spr 05 Intro Computer Vision Introduction to Computer Vision CSE 152 Lecture 5 CSE152, Spr 05 Intro Computer Vision Announcements Assignment 1 has been posted. See links on web page for reading • Irfanview: http://www.irfanview.com/ is a good windows utility for manipulating images. Try xv for linux. CSE152, Spr 05 Intro Computer Vision Camera parameters • Issue – camera may not be at the origin, looking down the z-axis extrinsic parameters (Rigid Transformation) – one unit in camera coordinates may not be the same as one unit in world coordinates intrinsic parameters - focal length, principal point, aspect ratio, angle between axes, etc. U V W = Transformation representing intrinsic parameters 1 0 0 0 0 1 0 0 0 0 1 0 Transformation representing extrinsic parameters X Y Z T 3 x 3 4 x 4 CSE152, Spr 05 Intro Computer Vision , estimate intrinsic and extrinsic camera parameters • See Text book for how to do it. Camera Calibration CSE152, Spr 05 Intro Computer Vision Limits for pinhole cameras CSE152, Spr 05 Intro Computer Vision Thin Lens: Image of Point O F P P’ Z’ f Z f z z 1 1 ' 1 =
10

Camera parameters Camera Calibrationcseweb.ucsd.edu/classes/sp05/cse152/lec5.pdf · 2005-04-13 · 1. Prism (with 3 sensors) 2. Filter mosaic 3. Filter wheel … and X3 CSE152, Spr

May 08, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Camera parameters Camera Calibrationcseweb.ucsd.edu/classes/sp05/cse152/lec5.pdf · 2005-04-13 · 1. Prism (with 3 sensors) 2. Filter mosaic 3. Filter wheel … and X3 CSE152, Spr

1

CSE152, Spr 05 Intro Computer Vision

Introduction to Computer VisionCSE 152Lecture 5

CSE152, Spr 05 Intro Computer Vision

Announcements• Assignment 1 has been posted.• See links on web page for reading• Irfanview: http://www.irfanview.com/ is a

good windows utility for manipulating images. Try xv for linux.

CSE152, Spr 05 Intro Computer Vision

Camera parameters• Issue

– camera may not be at the origin, looking down the z-axis

• extrinsic parameters (Rigid Transformation)– one unit in camera coordinates may not be the

same as one unit in world coordinates• intrinsic parameters - focal length, principal point,

aspect ratio, angle between axes, etc.

UVW

=

Transformationrepresenting intrinsic parameters

1 0 0 00 1 0 00 0 1 0

Transformationrepresentingextrinsic parameters

XYZT

3 x 3 4 x 4CSE152, Spr 05 Intro Computer Vision

, estimate intrinsic and extrinsic camera parameters

• See Text book for how to do it.

Camera Calibration

CSE152, Spr 05 Intro Computer Vision

Limits for pinhole cameras

CSE152, Spr 05 Intro Computer Vision

Thin Lens: Image of Point

OF

P

P’ Z’

f

Z

fzz11

'1

=−

Page 2: Camera parameters Camera Calibrationcseweb.ucsd.edu/classes/sp05/cse152/lec5.pdf · 2005-04-13 · 1. Prism (with 3 sensors) 2. Filter mosaic 3. Filter wheel … and X3 CSE152, Spr

2

CSE152, Spr 05 Intro Computer Vision

Thin Lens: Image Plane

OF

P

P’

Image Plane

Q’

Q

A price: Whereas the image of P is in focus,the image of Q isn’t.

CSE152, Spr 05 Intro Computer Vision

Deviations from the lens modelDeviations from this ideal are aberrations

Two types1. geometrical

2. chromatic

spherical aberrationastigmatismdistortion- pin-cushion vs. barrelcoma

Aberrations are reduced by combining lenses

Compound lenses

CSE152, Spr 05 Intro Computer Vision

Camera’s sensor• Measured pixel intensity is a function

of irradiance integrated over – pixel’s area– over a range of wavelengths– For some time

∫∫∫∫ =t x y

dtdydxdqyxstyxEIλ

λλλ )(),(),,,(

CSE152, Spr 05 Intro Computer Vision

Image Brightness• Image brightness (irradiance) is a function

of:1. Lighting2. Surface BRDF (local reflectance)3. Shadowing4. Inter-reflections (global reflectance)

CSE152, Spr 05 Intro Computer Vision

Lighting• Applied lighting can be represented as a

function on the 4-D ray space (radiances)• Special light sources

– Point sources– Distant point sources– Strip sources– Area sources

• Common to think of lighting at infinity (a function on the sphere, a 2-D space)

CSE152, Spr 05 Intro Computer Vision

Light at surfacesMany effects when light strikes a

surface -- could be:• transmitted

– Skin, glass• reflected

– mirror• scattered

– milk• travel along the surface and

leave at some other point• absorbed

– sweaty skin

Assume that• surfaces don’t fluoresce

– e.g. scorpions, detergents • surfaces don’t emit light

(i.e. are cool)• all the light leaving a

point is due to that arriving at that point

Assume that• surfaces don’t fluoresce

– e.g. scorpions, detergents • surfaces don’t emit light

(i.e. are cool)• all the light leaving a

point is due to that arriving at that point

Page 3: Camera parameters Camera Calibrationcseweb.ucsd.edu/classes/sp05/cse152/lec5.pdf · 2005-04-13 · 1. Prism (with 3 sensors) 2. Filter mosaic 3. Filter wheel … and X3 CSE152, Spr

3

CSE152, Spr 05 Intro Computer Vision

BRDF

• Bi-directional Reflectance Distribution Function

ρ(θin, φin ; θout, φout)

• Function of– Incoming light direction:

θin , φin– Outgoing light direction:

θout , φout

• Ratio of incident irradiance to emitted radiance

n(θin,φin)

(θout,φout)

CSE152, Spr 05 Intro Computer Vision

Lambertian Surface

At image location (u,v), the intensity of a pixel x(u,v) is:

x(u,v) = [a(u,v) n(u,v)] [s0s ]

where• a(u,v) is the albedo of the surface projecting to (u,v).• n(u,v) is the direction of the surface normal.• s0 is the light source intensity.• s is the direction to the light source.

^ ^.

ns

a

x(u,v)

^

[ Important: We’ll use this a lot ]

CSE152, Spr 05 Intro Computer Vision

Specular Reflection: Smooth Surface

N

Phong – rough, specular

CSE152, Spr 05 Intro Computer Vision

Rough Specular Surface

Phong Lobe

CSE152, Spr 05 Intro Computer Vision CSE152, Spr 05 Intro Computer Vision

Shadows cast by a point source

• A point that can’t see the source is in shadow• For point sources, the geometry is simple

Cast Shadow

Attached Shadow

Page 4: Camera parameters Camera Calibrationcseweb.ucsd.edu/classes/sp05/cse152/lec5.pdf · 2005-04-13 · 1. Prism (with 3 sensors) 2. Filter mosaic 3. Filter wheel … and X3 CSE152, Spr

4

CSE152, Spr 05 Intro Computer VisionFigure from “Mutual Illumination,” by D.A. Forsyth and A.P. Zisserman, Proc. CVPR, 1989, copyright 1989 IEEE

At the top, geometry of a gutter with triangular cross-section; below, predicted radiositysolutions, scaled to lie on top of each other, for different albedos of the geometry. When albedo is close to zero, shading follows a local model; when it is close to one, there are substantial reflexes.

Inter-reflections

CSE152, Spr 05 Intro Computer Vision

Color Cameras

Eye: Three types of Cones

Cameras:1. Prism (with 3 sensors)2. Filter mosaic3. Filter wheel

… and X3

CSE152, Spr 05 Intro Computer Vision

Prism color cameraSeparate light in 3 beams using dichroic prismRequires 3 sensors & precise alignmentGood color separation

CSE152, Spr 05 Intro Computer Vision

Filter mosaic Coat filter directly on sensor

Demosaicing (obtain full colour & full resolution image)

CSE152, Spr 05 Intro Computer Vision

Filter wheelRotate multiple filters in front of lensAllows more than 3 color bands

Only suitable for static scenes

CSE152, Spr 05 Intro Computer Vision

new color CMOS sensorFoveon’s X3

better image qualitysmarter pixels

Page 5: Camera parameters Camera Calibrationcseweb.ucsd.edu/classes/sp05/cse152/lec5.pdf · 2005-04-13 · 1. Prism (with 3 sensors) 2. Filter mosaic 3. Filter wheel … and X3 CSE152, Spr

5

CSE152, Spr 05 Intro Computer Vision

The appearance of colors

• Color appearance is strongly affected by (at least):– Spectrum of lighting striking the retina– other nearby colors (space)– adaptation to previous views (time)– “state of mind”

CSE152, Spr 05 Intro Computer Vision

From Foundations of Vision, Brian Wandell, 1995, via B. Freeman slides

CSE152, Spr 05 Intro Computer Vision CSE152, Spr 05 Intro Computer Vision

CSE152, Spr 05 Intro Computer Vision CSE152, Spr 05 Intro Computer Vision

Page 6: Camera parameters Camera Calibrationcseweb.ucsd.edu/classes/sp05/cse152/lec5.pdf · 2005-04-13 · 1. Prism (with 3 sensors) 2. Filter mosaic 3. Filter wheel … and X3 CSE152, Spr

6

CSE152, Spr 05 Intro Computer Vision CSE152, Spr 05 Intro Computer Vision

Color Afterimage: South African Flag

opponent colors Blue -> yellowRed -> green

CSE152, Spr 05 Intro Computer Vision CSE152, Spr 05 Intro Computer Vision

Light Spectrum

CSE152, Spr 05 Intro Computer Vision

Talking about colors1. Spectrum –

• A positive function over interval 400nm-700nm

• “Infinite” number of values needed.2. Names

• red, harvest gold, cyan, aquamarine, auburn, chestnut

• A large, discrete set of color names3. R,G,B values

• Just 3 numbersCSE152, Spr 05 Intro Computer Vision

Color ReflectanceMeasured color spectrum is

a function of the spectrum of the illumination and reflectance

From Foundations of Vision, Brian Wandell, 1995, via B. Freeman slides

Page 7: Camera parameters Camera Calibrationcseweb.ucsd.edu/classes/sp05/cse152/lec5.pdf · 2005-04-13 · 1. Prism (with 3 sensors) 2. Filter mosaic 3. Filter wheel … and X3 CSE152, Spr

7

CSE152, Spr 05 Intro Computer Vision

Illumination Spectra

Blue skylight Tungsten bulb

From Foundations of Vision, Brian Wandell, 1995, via B. Freeman slides

CSE152, Spr 05 Intro Computer Vision

Measurements of relative spectral power of sunlight, made by J. Parkkinen and P. Silfsten. Relative spectral power is plotted against wavelength in nm. The visible range is about 400nm to 700nm. The color names on the horizontal axis give the color names used for monochromatic light of the corresponding wavelength --- the “colors of the rainbow”. Mnemonic is “Richard of York got blisters in Venice”.

Violet Indigo Blue Green Yellow Orange Red

CSE152, Spr 05 Intro Computer Vision

Spectral albedoes for several different leaves, with color names attached. Notice that different colourstypically have different spectral albedo, but that different spectral albedoes may result in the same perceived color (compare the two whites). Spectral albedoes are typically quite smooth functions. Measurements by E.Koivisto.

CSE152, Spr 05 Intro Computer Vision

Fresnel Equation for Polished Copper

CSE152, Spr 05 Intro Computer Vision

Color Matching

Not on a computer Screen

CSE152, Spr 05 Intro Computer Visionslide from T. Darrel

Page 8: Camera parameters Camera Calibrationcseweb.ucsd.edu/classes/sp05/cse152/lec5.pdf · 2005-04-13 · 1. Prism (with 3 sensors) 2. Filter mosaic 3. Filter wheel … and X3 CSE152, Spr

8

CSE152, Spr 05 Intro Computer Visionslide from T. Darrel CSE152, Spr 05 Intro Computer Visionslide from T. Darrel

CSE152, Spr 05 Intro Computer Visionslide from T. Darrel CSE152, Spr 05 Intro Computer Visionslide from T. Darrel

CSE152, Spr 05 Intro Computer Visionslide from T. Darrel CSE152, Spr 05 Intro Computer Visionslide from T. Darrel

Page 9: Camera parameters Camera Calibrationcseweb.ucsd.edu/classes/sp05/cse152/lec5.pdf · 2005-04-13 · 1. Prism (with 3 sensors) 2. Filter mosaic 3. Filter wheel … and X3 CSE152, Spr

9

CSE152, Spr 05 Intro Computer Visionslide from T. Darrel CSE152, Spr 05 Intro Computer Visionslide from T. Darrel

CSE152, Spr 05 Intro Computer Vision

The principle of trichromacy• Experimental facts:

– Three primaries will work for most people if we allow subtractive matching

• Exceptional people can match with two or only one primary.

• This could be caused by a variety of deficiencies.

– Most people make the same matches.• There are some anomalous trichromats, who use

three primaries but make different combinations to match.

CSE152, Spr 05 Intro Computer Vision

Color receptors

“Red” cone “Green” cone “Blue” cone

Response of k’th cone = λλλρ dEk

)()(∫

CSE152, Spr 05 Intro Computer Vision

Color Matching Functions

CSE152, Spr 05 Intro Computer Vision

Color spaces

• Linear color spaces describe colors as linear combinations of primaries

• Choice of primaries=choice of color matching functions=choice of color space

• Color matching functions, hence color descriptions, are all within linear transformations

• RGB: primaries are monochromatic, energies are 645.2nm, 526.3nm, 444.4nm. Color matching functions have negative parts -> some colors can be matched only subtractively.

• CIE XYZ: Color matching functions are positive everywhere, but primaries are imaginary. Usually draw x, y, where x=X/(X+Y+Z)

y=Y/(X+Y+Z)

Page 10: Camera parameters Camera Calibrationcseweb.ucsd.edu/classes/sp05/cse152/lec5.pdf · 2005-04-13 · 1. Prism (with 3 sensors) 2. Filter mosaic 3. Filter wheel … and X3 CSE152, Spr

10

CSE152, Spr 05 Intro Computer Vision

RGB Color Cube• Block of colours for (r, g,

b) in the range (0-1).• Convenient to have an

upper bound on coefficient of each primary.

• In practice:– primaries given by monitor

phosphors– (phosphors are the materials

on the face of the monitor screen that glow when struck by electrons)

CSE152, Spr 05 Intro Computer Vision

YIQ Model

• Used by NTSC TV standard• Separates Hue & Saturation (I,Q) from

Luminance (Y)

−−−=

BGR

QIY

311.0532.0212.0321.0275.0596.0

114.0587.0299.0