ch02a - Ch2 – Image Formation •  •  •  • ...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Ch2 – Image Formation •  •  •  •  •  •  •  Overview Geometric Primitives 2D Geometric Transformations 3D Geometric Transformations Image Formation Image Sampling Conclusions Overview •  Before we can understand how digital images are formed we must review some geometry –  Geometric primitives –  2D and 3D geometric transformations •  Then we will discuss how cameras create digital images of the world –  3D to 2D projection –  Image sampling Geometric Primitives •  2D points –  x=(x,y) in Euclidean coordinates –  x=(x,y,w) in homogeneous coordinates where x=x/w and y=y/w •  3D points –  x=(x,y,z) in Euclidean coordinates –  x=(x,y,z,w) in homogeneous coordinates where x=x/w , y=y/w and z=z/w Geometric Primitives •  2D lines –  ax+by+c=0 is basic 2D line equation –  (a,b,c).(x,y,1)=0 using dot product notation –  Geometric .primitives and transformations y) is unit normal 2.1 (nx,ny,d) (x,y,1)=0 where n=(nx,n to line and d is distance from line to origin y z ^ n n l d x x d y Geometric Primitives •  3D lines –  r = (1-λ)p + λq is parametric line equation –  In this case Vision: nd r are 3D points Computer p, q a Algorithms and Applications (August 18, 2010 –  When λ = [0..1] we have 3D line segment z p r=(1- )p+ q x q y Figure 2.3 3D line equation, r = (1 − λ)p + λq . Geometric Primitives •  3D planes –  ax+by+cz+d=0 is basic 3D plane equation –  (a,b,c,d).(x,y,z,1)=0 using dot product notation –  (nx,ny,nz,d) .(x,y,z,1)=0 where n=(nx,ny,nz) is unit d transformations 33 normal and d is distance from plane to origin z ^ n ^ n m d x x (a) d (b) y 2D Geometric Transformations •  The simplest geometric transformations that occur in the 2D plane are: translation, Euclidean, similarity, affine and projective 2010 draf Computer Vision: Algorithms and Applications (August 18, y projective similarity translation Euclidean affine x Figure 2.4 Basic set of 2D planar transformations. 2D Geometric Transformations •  2D Translation: x' = x + t ( x ', y ') = ( x, y ) + (t x , t y ) !1 0 t $ x # & x ' = # 0 1 ty &x # & #0 0 1& " % 2D Geometric Transformations •  2D Scaling: x' = s ! x ( x ', y ') = (sx, sy) "s 0 0 $ x' = $ 0 s 0 $0 0 1 # % ' 'x ' & 2D Geometric Transformations •  2D Rotation: x' = R ! x ( x ', y ') = ( x cos! " y sin ! , x sin ! + y cos! ) # cos! " sin ! 0 & % ( x ' = % sin ! cos! 0 ( x %0 0 1( $ ' 2D Geometric Transformations •  2D Rotation around arbitrary point: –  Translate to origin, rotate, translate back x ' = T( cx,cy ) ! R ! T( " cx," cy ) ! x x ' = ( x " cx ) cos! " ( y " cy ) sin ! + cx y ' = ( x " cx ) sin ! + ( y " cy ) cos! + cy # 1 0 cx &# cos! " sin ! 0 &# 1 0 "cx & % (% (% ( x ' = % 0 1 cy (% sin ! cos! 0 (% 0 1 "cy ( x % 0 0 1 (% 0 0 1 (% 0 0 1 ( $ '$ '$ ' 2D Geometric Transformations •  2D Scaling around arbitrary point: –  Translate to origin, scale, translate back x ' = T( cx,cy ) ! S ! T( " cx," cy ) ! x x ' = ( x " cx )s + cx y ' = ( x " cx )s + cy # 1 0 cx &# s 0 0 &# 1 0 "cx % (% (% x ' = % 0 1 cy (% 0 s 0 (% 0 1 "cy % 0 0 1 (% 0 0 1 (% 0 0 1 $ '$ '$ & ( (x ( ' 2D Geometric Transformations •  2D Euclidean (rotation + translation): –  Preserves distances between points x ' = T( tx,ty ) ! R ! x ( x ', y ') = ( x cos! " y sin ! + t x , x sin ! + y cos! + t y ) # cos! % x ' = % sin ! % %0 $ " sin ! cos! 0 tx & ( ty (x ( 1( ' 2D Geometric Transformations •  2D Similarity (scaling + rotation + translation): –  Preserves angles between lines x ' = T( tx,ty ) ! R ! S ! x ( x ', y ') = (s x cos! " s y sin ! + t x , s x sin ! + s y cos! + t y ) # s ! cos! % x ' = % s ! sin ! % 0 % $ "s ! sin ! s ! cos! 0 tx & ( ty (x ( 1( ' 2D Geometric Transformations •  2D Affine: –  Parallel lines remain parallel x ' = Ax ( x ', y ') = (a00 x + a01 y + a02 , a10 x + a11 y + a12 ) !a a01 a02 $ # 00 & x ' = # a10 a11 a12 & x # & 0 1& #0 " % 2D Geometric Transformations   2D Projective: –  Straight lines remain straight x ' = Hx ! h00 x + h01 y + h02 h10 x + h11 y + h12 $ ( x ', y ') = # , & " h20 x + h21 y + h22 h20 x + h21 y + h22 % 'h h01 h02 * 00 ) , x ' = ) h10 h11 h12 , x ) , h20 h21 h22 , ) ( + 2D Geometric Transformations 38 Computer Vision: Algorithms and Applications (August 18, 2010 draft) •  2D Transformation hierarchy Transformation translation rigid (Euclidean) similarity affine projective Matrix ￿ ￿ ￿ I ￿ t R sR ￿ ￿ A ˜ H 2×3 ￿ t ￿ 2×3 ￿ t # DoF 2×3 2×3 ￿ 3×3 Preserves 2 Icon orientation 3 lengths ✚❙ ✚❙ ❙✚ ❙✚ 4 angles ✚❙ ❙✚ 6 parallelism ✂✂ ✂✂ ✥ ✥ 8 straight lines Table 2.1 Hierarchy of 2D coordinate transformations. Each transformation also preserves 3D Geometric Transformations •  3D translation is very similar to 2D translation –  There are now 3 coordinates to translate (tx,ty,tz) –  We use 4x4 matrix to perform operation •  3D scaling is very similar to 2D scaling –  We still only have one scale factor S –  We use 4x4 matrix to perform operation 3D Geometric Transformations •  There are three ways to perform 3D rotations –  1) Rotate about the X,Y,Z axes –  2) Rotate about an arbitrary axis –  3) Use unit quaternions to perform rotation •  Option 1 is easiest to understand •  Options 2 and 3 provide smoother motions 3D Geometric Transformations •  3D Rotation about Z axis: x' = R ! x ( x ', y ', z ') = ( x cos! " y sin ! , x sin ! + y cos! , z ) # cos! " sin ! 0 0 & % ( % sin ! cos! 0 0 ( x x' = %0 0 1 0( %0 0 0 1( $ ' 3D Geometric Transformations •  3D Rotation about Y axis: x' = R ! x ( x ', y ', z ') = ( x cos! + z sin ! , y, " x sin ! + z cos! ) # cos! 0 sin ! 0 & % ( 1 0 0( %0 x' = x % " sin ! 0 cos! 0 ( %0 0 0 1( $ ' 3D Geometric Transformations •  3D Rotation about X axis: x' = R ! x ( x ', y ', z ') = ( x, y cos! " z sin ! , y sin ! + z cos! ) #1 0 0 0& % ( % 0 cos! " sin ! 0 ( x x' = % 0 sin ! cos! 0 ( %0 0 0 1( $ ' 3D Geometric Transformations •  3D Rotation about arbitrary axis in X-Y plane –  Find angle α between rotation axis and X axis –  Rotate around Z axis by -α degrees –  Rotate around X axis by desired angle θ –  Rotate around Z axis by α degrees •  Same approach works for rotations about an arbitrary axis in Y-Z plane or Z-X plane 3D Geometric Transformations •  3D Rotation about an arbitrary axis –  Project arbitrary axis onto Y-Z plane –  Find angle β between projected axis and Y axis –  Rotate around X axis by -β degrees –  Now rotate about axis in X-Y plane –  Rotate around X axis by β degrees •  Same approach can be used to project the arbitrary axis onto Y-Z plane or Z-X plane 3D Geometric Transformations •  3D Transformation hierarchy 2.1 Geometric primitives and transformations Transformation translation rigid (Euclidean) similarity affine projective Matrix ￿ ￿ ￿ I ￿ t R t sR ￿ ￿ ￿ A ˜ H 3×4 ￿ t # DoF 3×4 ￿ 3×4 3×4 ￿ 39 4×4 Preserves 3 Icon orientation 6 lengths ✚❙ ✚❙ ❙✚ ❙✚ 7 angles ✚❙ ❙✚ 12 parallelism ✂✂ ✂✂ ✥ ✥ 15 straight lines Table 2.2 Hierarchy of 3D coordinate transformations. Each transformation also preserves Image Formation •  Before we can perform CV we must understand how digital images are created –  How 3D objects are projected to 2D images –  How light reflects from objects to the camera 2.2 Photometric digital cameras sample and store data 61 –  How image formation light source image plane sensor plane ^ n surface optics Image Formation •  In order to perform CV we intentionally choose simpler image formation models than high-end computer graphics systems –  Ideal camera projection model, without distortion –  Ambient and diffuse reflection, ignoring specular reflections and complex light refraction –  Uniform grid of image samples with known range of (rgb) pixel values Image Formation •  TBA Image Sampling •  TBA Conclusions •  TBA ...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online