Image formation
Outline •
Logistics
•
HW1
•
Project ideas
•
Image formation (main lecture)
Webpage http://www.ics.uci.edu/~dramanan/teaching/cs216_spring15/
Related classes offered this quarter: CS217, CS117
Intro reading
http://www.ics.uci.edu/~dramanan/teaching/cs216_spring15/ballard_brown.pdf
HW1
CIFAR-10 dataset
K-NN
What about ties?
Distance measures
(Squared) euclidean distance (SSD) Cosine similarity
Projects http://www.ics.uci.edu/~dramanan/teaching/cs216_spring15/project.html
Can work individually or groups of 2 I am happy to discuss ideas with students Please start looking through references for ideas
A recent dataset http://mscoco.org/
or your own! (perhaps you want to identify cells, or monkeys, or….)
A recent toolbox… http://www.vlfeat.org/matconvnet/
For those looking to apply vision techniques to their own research task, I’d recommend this as a good place to start
Outline •
Logistics
•
HW1
•
Project ideas
•
Image formation (main lecture)
References for today’s lecture
https://www.youtube.com/watch?v=q8xsXFU7dK0&list=PLc0IeyeoGt2xtmfaF2ST_uNdeptre3f9s&index=2
Light as a wave + particle
Light as a wave (ignore for now)
Refraction
Diffraction
Image formation
Image Formation Image Formation
Image Formation
Digital Camera Digital Image
Digital Camera Digital Camera
Film
FilmFilm The Eye
Human eye The Eye The Eye
an = length of an unit radius circle cut-out by a unit angle (0 ∼ 2π)
Pixel brightness
ecause a patch directly overhead δA sees more of A
e=
! x+∆x ! y+∆y ! 1 ! π ! π 2
x
y
t=0
−π
0
E[x, y, t, θ, φ] · f (θ, φ) dx dy dt dθ dφ
) directly overhead patch
a scene on a paper?
ight with a pinhole.
e the scene at -z:
(Lots of detail in CS217)
Pinhole optics Pinhole camera
Camera Camera Obscura Obscura
World’s largest photograph World’s largest photograph – 2006, El Toro Marine Corps Irvine,CA
El Toro Marine Corps, Irvine CA 2006
Accidental pinholes
what’s the dark stuff?
(the view from Antonio’s hotel room) Torralba & Freeman, CVPR12
Perspective projection
Closer objects appear larger Closer objects are lower in the image Parallel lines meet
Pinhole Camera
optical axis
How do we compute P’? [on board]
Pinhole Camera
Image inversion
Image inversion Perplexed folks for a while. But software (or the brain) can simply invert this.
Physical model that avoids inversion “easel”
COP = pinhole Distance of COP to easel = focal length
Physical model that avoids inversion “easel” ✓
L ✓= f
L = length of projection on sphere (e.g., retina)
Human head is 9 inches high. At a distance of 9 feet, it subtends 1/12 radians = 4.8 degrees, regardless of focal length
Field of view ✓ Field of View Field of View 24mm 24mm
50mm 50mm
135mm 135mm
sensor size ✓= focal length
Increasing the focal length and stepping back
© Marc Levoy
✦
changing the focal length lets us move back from a subject, while maintaining its size on the image
Decreasing the focal length and moving forward
© Marc Levoy
Perspective projection
Closer objects appear larger Closer objects are lower in the image Parallel lines meet [On board]
Vanishing points
VP2
VP1
Different vanishing points corresponding to different directions in 3D space VP3
Vanishing point: proof 2 3 2 3 2 3 x Ax Dx 4 y 5 = 4 By 5 + 4 D y 5 z Cz Dz fX f (Ax + Dx ) f Dx x= = = Z Az + D z Dz
for
!1
ny things happen…
Horizon line Parallel lines aren’t…
Figure by David Fors
Horizon line: proof 2 3 2 3 2 3 x Ax Dx 4 y 5 = 4 By 5 + 4 D y 5 z Cz Dz fX f (Ax + Dx ) f Dx x= = = Z Az + D z Dz
for
!1
Equation of ground plane is Y = -h For all points A on ground plane (Ax,-h,Az) and all directions D along ground plane (Dx,0,Dz), vanishing points must lie on line
f Dx ( , 0) Dy
Image y position: proof Equation of ground plane is Y = -h A point on ground plane will have y-coordinate y = -fh/Z
Z2 Z1
Z3
Image height: proof Bottom of tree: (X,-h,Z) Top of tree: (X,L-h,Z)
Angles and distances aren’t preserved
Perspective vs Orthographic
Perspective vs Orthogrpahic
Wide angle Wide angle
Standard Standard
Telephoto Telephoto
2
3
Ax 4 Ay 5 Z f Ax ax = = ↵Ax Z f Bx bx = Z+ Z f Bx ⇡ = ↵Bx Z
2
3
Bx 4 By 5 Z+ Z
for
Z⌧Z
Scaled orthographic
Scaled orthographic
Dominant effects of perspective
•
Parallel lines meet at vanishing points
•
Objects further away are smaller
•
Foreshortening
Fronto-parallel view
Foreshortened view Affine “linear” warp
Perspective view Homography “nonlinear” warp