Last 4 lectures Camera Structure HDR Image Filtering Image Transform

Embed Size (px)

Citation preview

  • Slide 1

Last 4 lectures Camera Structure HDR Image Filtering Image Transform Slide 2 Today Camera Projection Camera Calibration Slide 3 Pinhole camera Slide 4 Pinhole camera model (optical center) origin principal point P (X,Y,Z) p (x,y) The coordinate system We will use the pin-hole model as an approximation Put the optical center (Center Of Projection) at the origin Put the image plane (Projection Plane) in front of the COP (Why?) Slide 5 Pinhole camera model principal point Slide 6 Pinhole camera model (optical center) origin principal point P (X,Y,Z) p (x,y) x y Slide 7 Pinhole camera model (optical center) origin principal point P (X,Y,Z) p (x,y) x y Slide 8 Intrinsic matrix non-square pixels (digital video) Is this form of K good enough? Slide 9 Intrinsic matrix non-square pixels (digital video) skew Is this form of K good enough? Slide 10 Intrinsic matrix non-square pixels (digital video) skew radial distortion Is this form of K good enough? Slide 11 Distortion Radial distortion of the image Caused by imperfect lenses Deviations are most noticeable for rays that pass through the edge of the lens Slide 12 Barrel Distortion No distortion Barrel Wide Angle Lens Slide 13 Pin Cushion Distortion Pin cushion Telephoto lens No distortion Slide 14 Modeling distortion To model lens distortion Use above projection operation instead of standard projection matrix multiplication 2. Apply radial distortion 3. Apply focal length translate image center 1. Project (X, Y, Z) to normalized image coordinates Distortion-Free:With Distortion: Slide 15 Camera rotation and translation extrinsic matrix Slide 16 Two kinds of parameters internal or intrinsic parameters: focal length, optical center, skew external or extrinsic (pose): rotation and translation: Slide 17 Other projection models Slide 18 Orthographic projection Special case of perspective projection Distance from the COP to the PP is infinite Image World Also called parallel projection: (x, y, z) (x, y) Slide 19 Other types of projections Scaled orthographic Also called weak perspective Affine projection Also called paraperspective Slide 20 Fun with perspective Slide 21 Perspective cues Slide 22 Slide 23 Fun with perspective Ames room Slide 24 Forced perspective in LOTR Elijah Wood: 5' 6" (1.68 m)Ian McKellen 5' 11" (1.80 m) Slide 25 Camera calibration Slide 26 Estimate both intrinsic and extrinsic parameters Mainly, two categories: 1.Using objects with known geometry as reference 2.Self calibration (structure from motion) Slide 27 Camera calibration approaches Directly estimate 11 unknowns in the M matrix using known 3D points (Xi,Yi,Zi) and measured feature positions (ui,vi) Slide 28 Linear regression Slide 29 Slide 30 Solve for Projection Matrix M using least- square techniques Slide 31 Normal equation (Geometric Interpretation) Given an overdetermined system the normal equation is that which minimizes the sum of the square differences between left and right sides Slide 32 Normal equation (Differential Interpretation) n x m, n equations, m variables Slide 33 Normal equation Who invented Least Square? Carl Friedrich Gauss Slide 34 Nonlinear optimization A probabilistic view of least square Feature measurement equations Likelihood of M given {(u i,v i )} Slide 35 Optimal estimation Log likelihood of M given {(u i,v i )} It is a least square problem (but not necessarily linear least square) How do we minimize C? Slide 36 Nonlinear least square methods Slide 37 Least square fitting number of data points number of parameters Slide 38 Nonlinear least square fitting Slide 39 Function minimization It is very hard to solve in general. Here, we only consider a simpler problem of finding local minimum. Least square is related to function minimization. Slide 40 Function minimization Slide 41 Quadratic functions Approximate the function with a quadratic function within a small neighborhood Slide 42 Function minimization Slide 43 Computing gradient and Hessian Gradient Hessian Slide 44 Computing gradient and Hessian Gradient Hessian Slide 45 Computing gradient and Hessian Gradient Hessian Slide 46 Computing gradient and Hessian Gradient Hessian Slide 47 Computing gradient and Hessian Gradient Hessian Slide 48 Searching for update h GradientHessian Idea 1: Steepest Descent Slide 49 Steepest descent method isocontourgradient Slide 50 Steepest descent method It has good performance in the initial stage of the iterative process. Converge very slow with a linear rate. Slide 51 Searching for update h GradientHessian Idea 2: minimizing the quadric directly Converge faster but needs to solve the linear system Slide 52 Recap: Calibration Directly estimate 11 unknowns in the M matrix using known 3D points (Xi,Yi,Zi) and measured feature positions (ui,vi) Camera Model: Slide 53 Recap: Calibration Directly estimate 11 unknowns in the M matrix using known 3D points (Xi,Yi,Zi) and measured feature positions (ui,vi) Linear Approach: Slide 54 Recap: Calibration Directly estimate 11 unknowns in the M matrix using known 3D points (Xi,Yi,Zi) and measured feature positions (ui,vi) NonLinear Approach: Slide 55 Practical Issue is hard to make and the 3D feature positions are difficult to measure! Slide 56 A popular calibration tool Slide 57 Multi-plane calibration Images courtesy Jean-Yves Bouguet, Intel Corp. Advantage Only requires a plane Dont have to know positions/orientations Good code available online! Intels OpenCV library: http://www.intel.com/research/mrl/research/opencv/ http://www.intel.com/research/mrl/research/opencv/ Matlab version by Jean-Yves Bouget: http://www.vision.caltech.edu/bouguetj/calib_doc/index.html http://www.vision.caltech.edu/bouguetj/calib_doc/index.html Zhengyou Zhangs web site: http://research.microsoft.com/~zhang/Calib/ http://research.microsoft.com/~zhang/Calib/ Slide 58 Step 1: data acquisition Slide 59 Step 2: specify corner order Slide 60 Step 3: corner extraction Slide 61 Slide 62 Step 4: minimize projection error Slide 63 Step 4: camera calibration Slide 64 Slide 65 Step 5: refinement