1 / 29

CMPUT 412 3D Computer Vision

CMPUT 412 3D Computer Vision. Presented by Azad Shademan Feb. 13-15, 2007. Acknowledgement . Marc Pollefeys’ slides (University of North Carolina), comp290-89 Spring 2003 http://www.cs.unc.edu/~marc/mvg/slides.html. Motivation.

shada
Download Presentation

CMPUT 412 3D Computer Vision

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CMPUT 412 3D Computer Vision Presented by Azad Shademan Feb. 13-15, 2007

  2. Acknowledgement • Marc Pollefeys’ slides (University of North Carolina), comp290-89 Spring 2003 http://www.cs.unc.edu/~marc/mvg/slides.html

  3. Motivation • Images form one of the most important feedback signals in robotics. • Vision-based control: • Robotic Visual Servoing • Mobile Navigation

  4. Eye-In-Hand Visual Servoing

  5. More motivation • Course project: • Two cameras looking at one scene • Need to “correspond” similar points in these two images Laser projection on the wall Image plane Right camera Image plane Left camera

  6. Camera Model Mostly pinhole camera model

  7. Pinhole Camera Model

  8. Pinhole Camera Model

  9. Principle Point Offset principal point

  10. Principle Point Offset calibration matrix

  11. Camera Rotation and Orientation

  12. Hierarchy of transformations Projective 15dof Intersection and tangency Parallellism of planes, Volume ratios, centroids Affine 12dof Similarity 7dof Euclidean 6dof Volume

  13. Camera Calibration • Procedure that finds the camera matrix, i.e., • Intrinsic camera parameters • Extrinsic camera parameters • Rotation • Orientation • There is a lot to be done with calibrated cameras, BUT we are more interested in uncalibrated cameras (more challenging)

  14. Some linear algebra to get started • Singular value decomposition (SVD) • Decomposes a matrix as follows:

  15. Singular Value Decomposition

  16. Singular Value Decomposition • Homogeneous least-squares • Span and null-space • Closest rank r approximation • Pseudo inverse

  17. Parameter estimation • 2D homography Given a set of (xi,xi’), compute H (xi’=Hxi) • 3D to 2D camera projection Given a set of (Xi,xi), compute P (xi=PXi) • Fundamental matrix Given a set of (xi,xi’), compute F (xi’TFxi=0)

  18. Number of measurements required • At least as many independent equations as degrees of freedom required • Example: 2 independent equations / point 8 degrees of freedom 4x2≥8

  19. Approximate solutions • Minimal solution 4 points yield an exact solution for H • More points • No exact solution, because measurements are inexact (“noise”) • Search for “best” according to some cost function • Algebraic or geometric/statistical cost

  20. Direct Linear Transformation(DLT)

  21. Direct Linear Transformation(DLT) • Equations are linear in h • Only 2 out of 3 are linearly independent (indeed, 2 eq/pt) (only drop third row if wi’≠0) • Holds for any homogeneous representation, e.g. (xi’,yi’,1)

  22. Direct Linear Transformation(DLT) • Solving for H size A is 8x9 or 12x9, but rank 8 Trivial solution is h=09T is not interesting 1-D null-space yields solution of interest pick for example the one with

  23. Direct Linear Transformation(DLT) • Over-determined solution No exact solution because of inexact measurement i.e. “noise” • Find approximate solution • Additional constraint needed to avoid 0, e.g. • not possible, so minimize

  24. DLT algorithm • Objective • Given n≥4 2D to 2D point correspondences {xi↔xi’}, determine the 2D homography matrix H such that xi’=Hxi • Algorithm • For each correspondence xi ↔xi’ compute Ai. Usually only two first rows needed. • Assemble n 2x9 matrices Ai into a single 2nx9 matrix A • Obtain SVD of A. Solution for h is last column of V • Determine H from h

  25. Normalized DLT algorithm • Objective • Given n≥4 2D to 2D point correspondences {xi↔xi’}, determine the 2D homography matrix H such that xi’=Hxi • Algorithm • Normalize points • Apply DLT algorithm to • Denormalize solution

  26. Reprojection error

  27. OpenCV • cvFindHomography() • cvFindFundamentalMat() • …

  28. cvFindHomography Finds perspective transformation between two planes void cvFindHomography( const CvMat* src_points, const CvMat* dst_points, CvMat* homography ); src_points Point coordinates in the original plane, 2xN, Nx2, 3xN or Nx3 array (the latter two are for representation in homogeneous coordinates), where N is the number of points. dst_points Point coordinates in the destination plane, 2xN, Nx2, 3xN or Nx3 array (the latter two are for representation in homogeneous coordinates) homography Output 3x3 homography matrix. The function cvFindHomography finds perspective transformation H=||hij|| between the source and the destination planes: [x',,i,,] [x,,i,,] s,,i,,[y',,i,,]~H*[y,,i,,] [1 ] [ 1] So that the back-projection error is minimized: sum_i((x',,i,,-(h11*x,,i,, + h12*y,,i,, + h13)/(h31*x,,i,, + h32*y,,i,, + h33))^2^+ (y',,i,,-(h21*x,,i,, + h22*y,,i,, + h23)/(h31*x,,i,, + h32*y,,i,, + h33))^2^) -> min The function is used to find initial intrinsic and extrinsic matrices. Homography matrix is determined up to a scale, thus it is normalized to make h33=1.

More Related