Homogeneous representation Points Vectors Transformation representation Stefano Soatto (c) UCLA Vision Lab 1 Lecture 4: Image formation Stefano Soatto (c) UCLA Vision Lab 2 Image Formation Vision infers world properties form images. How do images depend on these properties? Two key elements Geometry Radiometry We consider only simple models of these Stefano Soatto (c) UCLA Vision Lab 3 Image formation (Chapter 3) Stefano Soatto (c) UCLA Vision Lab 4 Representation of images Stefano Soatto (c) UCLA Vision Lab 5 ( Similar triangles <P’F’S’>,<ROF’> and <PSF><QOF> ( z ' f )( z f ) f 2 Stefano Soatto (c) 1 1 1 z' z f UCLA Vision Lab 6 Pinhole model Stefano Soatto (c) UCLA Vision Lab 7 Forward pinhole Stefano Soatto (c) UCLA Vision Lab 8 Distant objects are smaller Stefano Soatto (c) UCLA Vision Lab (Forsyth & Ponce) 9 Parallel lines meet Common to draw image plane in front of the focal point. Moving the image plane merely scales the image. Stefano Soatto (c) UCLA Vision Lab (Forsyth & Ponce) 10 Vanishing points • Each set of parallel lines meets at a different point – The vanishing point for this direction • Sets of parallel lines on the same plane lead to collinear vanishing points. – The line is called the horizon for that plane Stefano Soatto (c) UCLA Vision Lab 11 Properties of Projection Points project to points Lines project to lines Planes project to the whole image or a half image Angles are not preserved Degenerate cases Line through focal point projects to a point. Plane through focal point projects to line Plane perpendicular to image plane projects to part of the image (with horizon). Stefano Soatto (c) UCLA Vision Lab 12 Orthographic projection x x ' y y ' Stefano Soatto (c) UCLA Vision Lab 13 Stefano Soatto (c) UCLA Vision Lab 14 Cameras with Lenses Stefano Soatto (c) UCLA Vision Lab (Forsyth & Ponce) 15 Stefano Soatto (c) UCLA Vision Lab 16 Assumptions for thin lens equation Lens surfaces are spherical Incoming light rays make a small angle with the optical axis The lens thickness is small compared to the radii of curvature The refractive index is the same for the media on both sides of the lens Stefano Soatto (c) UCLA Vision Lab 17 Stefano Soatto (c) UCLA Vision Lab 18 Blur circle Points a t distance z are brought into focus at distance z ' A point at distance z z ' from the lens is imaged at point 1 1 1 z' z f -z z’ P and so Q d b Q’ f f z ' z ' ( z z) (z f ) (z f ) Thus points at distance z will give rise to a blur circle of diameter d b | z ' z '| z' P’ z’ -z with d the diameter of the lens Stefano Soatto (c) UCLA Vision Lab 19 Interaction of light with matter Absorption Scattering Refraction Reflection Other effects: Diffraction: deviation of straight propagation in the presence of obstacles Fluorescence:absorbtion of light of a given wavelength by a fluorescent molecule causes reemission at another wavelength Stefano Soatto (c) UCLA Vision Lab 20 Refraction n1, n2: indexes of refraction Stefano Soatto (c) UCLA Vision Lab 21 Solid Angle hemisphere radian dq 2 2 2 2 d sin q ddq dq 2 q 0 0 0 0 2 2 sin qdq steradian (sr) d q 0 2 [ cosq ]0 d d sinq dq Sphere: Stefano Soatto (c) UCLA Vision Lab 2 4 22 Radiometric Terms Stefano Soatto (c) UCLA Vision Lab 23 Irradiance and Radiance Irradiance Definition: power per unit area incident on a surface d E dA [W/m2 = lux] Radiance Definition: power per unit area and projected solid angle d 2 L cos q dA d [W/m2sr] Li qi d 2 dE Li cos q i di dA E L cos q d i i i A H2 Stefano Soatto (c) UCLA Vision Lab 24 Radiant Intensity Definition: flux per unit solid angle d I d [W/sr = cd (candela)] I d S : Radiant flux [W] 2 I [ ] Stefano Soatto (c) UCLA Vision Lab 25 Isotropic Point Source Stefano Soatto (c) UCLA Vision Lab 26 Isotropic Point Source : Radiant flux [W] All directions: solid angle 4 d : Radiant flux per I d unit solid angle [W/sr] r dA r 2 d E I 4 : Radiant intensity d Id d 1 dA dA dA 4 dA 4 r 2 dA 4r 2 • Note inverse square law fall off. Stefano Soatto (c) UCLA Vision Lab 27 Isotropic Point Source : Radiant flux [W] All directions: solid angle 4 dA r 2 1 d r q cos q d : Radiant flux per I d unit solid angle [W/sr] h I 4 : Radiant intensity d Id d cos q dA cos 3 q E 2 dA dA 4 dA 4 r dA 4 h 2 Stefano Soatto (c) h r cos q • Note cosine dependency. UCLA Vision Lab 28 Isotropic Point Source Point source at a finite distance r q h cos q E 2 4 h 3 • Note inverse square law fall off. • Note cosine dependency. Stefano Soatto (c) UCLA Vision Lab 29 Irradiance from Area Sources Stefano Soatto (c) UCLA Vision Lab 30 Hemispherical Source L E 2 0 2 0 L cosq i sin q i dq i di [ ] L 2 2 sin q i 02 di 2 0 L 2 di 2 0 L Stefano Soatto (c) UCLA Vision Lab 31 Reflectance Li(x,i) The surface becomes a light source Lr(x,) qi Ei Ei dLr=fr dEi dLr fr dEi Lr f r dE i Reflectance: ratio of radiance to irradiance Stefano Soatto (c) UCLA Vision Lab 32 BRDF Stefano Soatto (c) UCLA Vision Lab 33 BRDF dL r ,r;r E dLrrq ; Eii i , ii;;q q r r, r f rrq i , i ; i; dEi iq dE i , ii dLr i ;r ; Ei f r i ;r dEi i d 2 r / d r d i dEi i Li i di Li i cosqi di Lr r f r i ; r dEi i i Stefano Soatto (c) f r i ; r Li i cosqi di i UCLA Vision Lab 34 Reflection Equation Stefano Soatto (c) UCLA Vision Lab 35 qi Perfectly Diffuse Reflection Perfectly Diffuse Surface •Appears equally bright from all viewing directions (qr, r) •Reflects all incident light, i.e., LB(qr, r) is constant for all directions (qr, r) E Lr r d r r LB 1 fB Es Stefano Soatto (c) q r LB LB cos q r sin q r dq r dr LB r L cos q d 1 i i i i i UCLA Vision Lab 36 qi Common Diffuse Reflection Normal Diffuse Surface •Appears almost equally bright from most viewing directions (qr, r), qr << 90° •Reflects only a fraction of incident light, i.e., LB fB B Es LB B Li i cosqi di i Reflectance : Albedo Stefano Soatto (c) UCLA Vision Lab 37 Perfectly Diffuse Reflection Distant point light source d ( q i q s )d ( i s ) E( q i ,i ) E sin q s qi Lr f B Li (q i , i ) cosq i di i 1 L (q , ) cosq sin q dq d q i Stefano Soatto (c) 1 1 i i i i i i i i E d (q i q i i q s )d (i s ) cosq i dq i di E cosq s Lambertian cosine Law UCLA Vision Lab 38 Law of Reflection Li ( qi ,i ) Lr ( q r ,r ) Lr (qr , r ) Li (qi , i ) Stefano Soatto (c) UCLA Vision Lab 39 Perfectly Specular Reflection From the definition of BRDF, the surface radiance is: Lr (q r , r ) q To satisfy: i f s (q r , r ;qi , i ) Li (qi , i ) cosqi sin qi dqi di i Lr (qr , r ) Li (qi , i ) d (qi q r )d (i r ) f s (q r , r ;qi , i ) sin qi cosqi Li (q r , r ) d (q q Stefano Soatto (c) i i q r )d (i r ) Li (qi , i )dqi di i UCLA Vision Lab 40 Lambertian Examples Lambertian sphere as the light moves. (Steve Seitz) Scene (Oren and Nayar) Stefano Soatto (c) UCLA Vision Lab 41 Lambertian + Specular Model L( P, 0 , 0 ) d ( P) L( P, i , i ) cosi d s ( P) L( P, s , s ) cosn ( s 0 ) Stefano Soatto (c) UCLA Vision Lab 42 Lambertian + specular • Two parameters: how shiny, what kind of shiny. • Advantages – easy to manipulate – very often quite close true • Disadvantages – some surfaces are not • e.g. underside of CD’s, feathers of many birds, blue spots on many marine crustaceans and fish, most rough surfaces, oil films (skin!), wet surfaces – Generally, very little advantage in modelling behaviour of light at a surface in more detail -- it is quite difficult to understand behaviour of L+S surfaces (but in graphics???) Stefano Soatto (c) 43 UCLA Vision Lab Lambertian+Specular+Ambient (http://graphics.cs.ucdavis.edu/GraphicsNotes/Shading/Shading.html) Stefano Soatto (c) UCLA Vision Lab 44