MSU CSE 803 Fall 2008 Stockman1 CV: 3D sensing and calibration Coordinate system changes; perspective transformation; Stereo and structured light.

Slides:



Advertisements
Similar presentations
Today Composing transformations 3D Transformations
Advertisements

Epipolar Geometry.
Computer Vision, Robert Pless
3D reconstruction.
4-3 Warm Up Lesson Presentation Lesson Quiz
Arbitrary Rotations in 3D Lecture 18 Wed, Oct 8, 2003.
1 ME 302 DYNAMICS OF MACHINERY Dynamic Force Analysis IV Dr. Sadettin KAPUCU © 2007 Sadettin Kapucu.
Computer vision: models, learning and inference
Mapping: Scaling Rotation Translation Warp
Camera Calibration. Issues: what are intrinsic parameters of the camera? what is the camera matrix? (intrinsic+extrinsic) General strategy: view calibration.
MSU CSE 240 Fall 2003 Stockman CV: 3D to 2D mathematics Perspective transformation; camera calibration; stereo computation; and more.
Ch. 2: Rigid Body Motions and Homogeneous Transforms
MSU CSE 803 Stockman Perspective algebra: quick- and-dirty first look Geometry of similar triangles yields algebra for computing world-image transformation.
CS485/685 Computer Vision Prof. George Bebis
Outline for Today More math… Finish linear algebra: Matrix composition
CSCE 590E Spring 2007 Basic Math By Jijun Tang. Applied Trigonometry Trigonometric functions  Defined using right triangle  x y h.
MSU CSE 803 Stockman Perspective algebra Geometry of similar triangles yields algebra for computing world-image transformation.
3-D Geometry.
COMP322/S2000/L221 Relationship between part, camera, and robot (cont’d) the inverse perspective transformation which is dependent on the focal length.
The Pinhole Camera Model
CV: 3D sensing and calibration
CS223b, Jana Kosecka Rigid Body Motion and Image Formation.
MSU CSE 803 Stockman CV: Matching in 2D Matching 2D images to 2D images; Matching 2D images to 2D maps or 2D models; Matching 2D maps to 2D maps.
Camera parameters Extrinisic parameters define location and orientation of camera reference frame with respect to world frame Intrinsic parameters define.
Stockman MSU/CSE Math models 3D to 2D Affine transformations in 3D; Projections 3D to 2D; Derivation of camera matrix form.
Linear Algebra Review CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2005.
3D Graphics Goal: To produce 2D images of a mathematically described 3D environment Issues: –Describing the environment: Modeling (mostly later) –Computing.
10/5/04© University of Wisconsin, CS559 Fall 2004 Last Time Compositing Painterly Rendering Intro to 3D Graphics Homework 3 due Oct 12 in class.
Mathematical Fundamentals
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Rotations and Translations
6.837 Linear Algebra Review Patrick Nichols Thursday, September 18, 2003.
Transformations Aaron Bloomfield CS 445: Introduction to Graphics
Recap of linear algebra: vectors, matrices, transformations, … Background knowledge for 3DM Marc van Kreveld.
COMP 175: Computer Graphics March 24, 2015
CS 480/680 Computer Graphics Representation Dr. Frederick C Harris, Jr. Fall 2012.
Transformations Dr. Amy Zhang.
Course 12 Calibration. 1.Introduction In theoretic discussions, we have assumed: Camera is located at the origin of coordinate system of scene.
6.837 Linear Algebra Review Patrick Nichols Thursday, September 18, 2003.
Rotations and Translations
CSE 681 Review: Transformations. CSE 681 Transformations Modeling transformations build complex models by positioning (transforming) simple components.
9-5 Transformations in the Coordinate Plane Learn to use translations, reflections, and rotations to change the positions of figures in the coordinate.
Geometric Camera Models
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
Jinxiang Chai Composite Transformations and Forward Kinematics 0.
Chapter 9 Transformations.
1 Chapter 2: Geometric Camera Models Objective: Formulate the geometrical relationships between image and scene measurements Scene: a 3-D function, g(x,y,z)
3D Transformation A 3D point (x,y,z) – x,y, and z coordinates
Computer Graphics Matrices
CSCE 552 Fall 2012 Math By Jijun Tang. Applied Trigonometry Trigonometric functions  Defined using right triangle  x y h.
Camera Model Calibration
Honors Geometry.  We learned how to set up a polygon / vertex matrix  We learned how to add matrices  We learned how to multiply matrices.
 An image is the new figure, and the preimage is the original figure  Transformations-move or change a figure in some way to produce an image.
Instructor: Mircea Nicolescu Lecture 9
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
Computer Graphics I, Fall 2010 Transformations.
Chapter 9 Properties of Transformations Warren Luo Matthew Yom.
CS 551 / 645: Introductory Computer Graphics Viewing Transforms.
Computer Graphic 2 D Transformation.
CS682, Jana Kosecka Rigid Body Motion and Image Formation Jana Kosecka
4-3 Warm Up Lesson Presentation Lesson Quiz
Review: Transformations
COMP 175: Computer Graphics February 9, 2016
Geometric Camera Models
Chapter IV Spaces and Transforms
CV: Matching in 2D Matching 2D images to 2D images; Matching 2D images to 2D maps or 2D models; Matching 2D maps to 2D maps MSU CSE 803 Stockman.
Single-view geometry Odilon Redon, Cyclops, 1914.
CSCE441: Computer Graphics 2D/3D Transformations
4-3 Warm Up Lesson Presentation Lesson Quiz
Presentation transcript:

MSU CSE 803 Fall 2008 Stockman1 CV: 3D sensing and calibration Coordinate system changes; perspective transformation; Stereo and structured light

MSU CSE 803 Fall 2008 Stockman2 roadmap using multiple cameras using structured light projector 3D transformations general perspective transformation justification of 3x4 camera model

MSU CSE 803 Fall 2008 Stockman3 Four Coordinate frames W: world, C,D: cameras, M: object model Need to relate all to each other.

MSU CSE 803 Fall 2008 Stockman4 Can we recognize? Is there some object M That can be placed in some location That will create the two images that are observed? Discover/compute what object and what pose

MSU CSE 803 Fall 2008 Stockman5 Need to relate frames to compute relate camera to world using rotations and translations project world point into real image using projection scale image point in real image plane to get pixel array coordinates

MSU CSE 803 Fall 2008 Stockman6 Stereo configuration 2 corresponding image points enable the intersection of 2 rays in W

MSU CSE 803 Fall 2008 Stockman7 Stereo computation

MSU CSE 803 Fall 2008 Stockman8 Math for stereo computations need to calibrate both cameras to W so that rays in x,y,z reference same space need to have corresponding points find point of closest approach of the two rays (rays are too far apart  point correspondence error or crude calibration)

MSU CSE 803 Fall 2008 Stockman9 Replace camera with projector Can calibrate a projector to W easily. Correspondence now means identifying marks.

MSU CSE 803 Fall 2008 Stockman10 Advantages/disadvantages of structured light

MSU CSE 803 Fall 2008 Stockman11 Grid projected on objects All grid intersects are integral

MSU CSE 803 Fall 2008 Stockman12 Computing surface normals Surface normals have been computed and then added to the image (augmented reality)

MSU CSE 803 Fall 2008 Stockman13 Relating coordinate frames need to relate camera frame to world need to rotate, translate, and scale coordinate systems need to project world points to the image plane all the above are modeled using 4x4 matrices and 1x4 points in homogeneous coordinates

MSU CSE 803 Fall 2008 Stockman14 Translation of 3D point P parameters Point in 3D Point in frame 1 Point in frame 2

MSU CSE 803 Fall 2008 Stockman15 Scaling 3D point P

MSU CSE 803 Fall 2008 Stockman16 Rotation of P about the X-axis

MSU CSE 803 Fall 2008 Stockman17 Rotate P about the Y-axis

MSU CSE 803 Fall 2008 Stockman18 Rotate P about the Z-axis Looks same as 2D rotation omitting row, col 4

MSU CSE 803 Fall 2008 Stockman19 Arbitrary rotation has orthonormal rows and columns

MSU CSE 803 Fall 2008 Stockman20 Equivalent rotation form every rotation or combination of rotations is equivalent to ONE rotation of angle theta about a single axis or rotation the axis of rotation and angle of rotation can be determined if three points are known before and after

MSU CSE 803 Fall 2008 Stockman21 Computing angle-axis form A A* O B To rotate A to A*, the axis of rotation is OB that is perpendicular to OA and OA* Compute OB = OA x OA* (unit vectors) Compute  from OA o OA* (unit vectors) See frame software 

MSU CSE 803 Fall 2008 Stockman22 Example: camera relative to world

MSU CSE 803 Fall 2008 Stockman23 exercise verify that the 3 x 3 rotation matrix is orthonormal by checking 6 dot products invert the 3 x 3 rotation matrix invert the 4 x 4 matrix verify that the new matrix transforms points correctly from C to W

MSU CSE 803 Fall 2008 Stockman24 Transformation “calculus”: notation accounts for transforms T W M Denotes transformation Origin frame M Destination frame W T transforms points from model frame to world frame. (Notation from John Craig, 1986)

MSU CSE 803 Fall 2008 Stockman25 Apply transformations to points T M W P M P = W Point in model coordinates Point in world coordinates Transformation from model to world coordinates (instance transformation)

MSU CSE 803 Fall 2008 Stockman26 Matrix algebra enables composition Let M and N be 4 x 4 matrices and let P be a 4 x 1 point M ( N P ) = ( M N ) P we can transform P using N and then transform that by M, or we can multiply matrices M and N and then apply that to point P matrix multiplication is associative (but not commutative)

MSU CSE 803 Fall 2008 Stockman27 Composing transformations T (  W C T(  C A T = W A Two transformations are composed to get one transformation that maps points from the world frame to the frame A Parameters: rotation and translation Projection parms. cancel

MSU CSE 803 Fall 2008 Stockman28 Use of transformation calculus Alignment of two congruent triangles (ABC and DEF) via coordinate transformation; Fundamental operation

MSU CSE 803 Fall 2008 Stockman29 Align corresponding vertices at origin and align first side 1) Translate vertex to origin (do both) 2) Rotate DE to X-axis and AB to X-axis 0) starting configurations in 3D

MSU CSE 803 Fall 2008 Stockman30 Alignment: last steps 3) Rotate point F about X-axis into XY-plane. Rotate point C in a similar manner. Both triangles should now overlap in 3D

MSU CSE 803 Fall 2008 Stockman31 Here’s what was done Every transformation we applied is invertible. So, we get the inverses to apply to one side. This is T M W

MSU CSE 803 Fall 2008 Stockman32 Align two congruent triangles in 3D space

MSU CSE 803 Fall 2008 Stockman33 What use is it? fundamental step in aligning a 3D model to observed 3D points might be lucky to have 3 corners of a rectangular box could have any matching 3D feature points once aligned, other 3D points could be transformed the same way See /user/stockman/Software/RST/Frames/frame.cpp and look for function align_triangles

MSU CSE 803 Fall 2008 Stockman34 Deriving form of the camera matrix We have already described what the camera matrix does and what form it has; we now go through the steps to justify it

MSU CSE 803 Fall 2008 Stockman35 Viewing model points M What’s in front of the camera?

MSU CSE 803 Fall 2008 Stockman36 Math for the steps

MSU CSE 803 Fall 2008 Stockman37 Perspective transformation: camera origin at the center of projection This transformation uses same units in 3D as in the image plane

MSU CSE 803 Fall 2008 Stockman38 Perspective projection: camera origin in the real image plane

MSU CSE 803 Fall 2008 Stockman39 Rigid transformation for change of coordinate frame

MSU CSE 803 Fall 2008 Stockman40 Relate camera frame to world frame

MSU CSE 803 Fall 2008 Stockman41 Change scene units to pixels To get into XV or GIMP image coordinates!

MSU CSE 803 Fall 2008 Stockman42 Final result a 3x4 camera matrix maps 2D image pixels to 3D rays maps 3D rays to 2D image pixels obtain matrix via calibration (easy) obtain matrix via reasoning (hard) do camera calibration exercise