Invariants. Definitions and Invariants A definition of a class means that given a list of properties: –For all props, all objects have that prop. –No.

Slides:



Advertisements
Similar presentations
Today Composing transformations 3D Transformations
Advertisements

Announcements. Structure-from-Motion Determining the 3-D structure of the world, and/or the motion of a camera using a sequence of images taken by a moving.
Invariants (continued).
Computer Graphics Lecture 4 Geometry & Transformations.
Primitives Behaviour at infinity HZ 2.2 Projective DLT alg Invariants
Geometric Transformations
Arbitrary Rotations in 3D Lecture 18 Wed, Oct 8, 2003.
3D Reconstruction – Factorization Method Seong-Wook Joo KG-VISA 3/10/2004.
Mapping: Scaling Rotation Translation Warp
Transformations II Week 2, Wed Jan 17
Geometry (Many slides adapted from Octavia Camps and Amitabh Varshney)
Camera Models A camera is a mapping between the 3D world and a 2D image The principal camera of interest is central projection.
2D Geometric Transformations
Chapter 4.1 Mathematical Concepts
Image Warping : Computational Photography Alexei Efros, CMU, Fall 2006 Some slides from Steve Seitz
Linear Algebra and SVD (Some slides adapted from Octavia Camps)
Chapter 4.1 Mathematical Concepts. 2 Applied Trigonometry Trigonometric functions Defined using right triangle  x y h.
Image Warping : Computational Photography Alexei Efros, CMU, Fall 2008 Some slides from Steve Seitz
Structure-from-Motion Determining the 3-D structure of the world, and/or the motion of a camera using a sequence of images taken by a moving camera. –Equivalently,
CSCE 590E Spring 2007 Basic Math By Jijun Tang. Applied Trigonometry Trigonometric functions  Defined using right triangle  x y h.
3-D Geometry.
© 2003 by Davi GeigerComputer Vision October 2003 L1.1 Structure-from-EgoMotion (based on notes from David Jacobs, CS-Maryland) Determining the 3-D structure.
The Pinhole Camera Model
Transformations. 2 Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002 Coordinate-Free Geometry When we learned simple geometry, most of us.
Stockman MSU/CSE Math models 3D to 2D Affine transformations in 3D; Projections 3D to 2D; Derivation of camera matrix form.
Cameras, lenses, and calibration
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.
Transformations Aaron Bloomfield CS 445: Introduction to Graphics
CS 480/680 Computer Graphics Representation Dr. Frederick C Harris, Jr. Fall 2012.
Geometric Transformation. So far…. We have been discussing the basic elements of geometric programming. We have discussed points, vectors and their operations.
Transformations Dr. Amy Zhang.
Mathematical Foundations Sections A-1 to A-5 Some of the material in these slides may have been adapted from university of Virginia, MIT and Åbo Akademi.
Warping CSE 590 Computational Photography Tamara Berg.
Homogeneous Coordinates (Projective Space) Let be a point in Euclidean space Change to homogeneous coordinates: Defined up to scale: Can go back to non-homogeneous.
Dx = 2 dy = 3 Y X D Translation A translation is applied to an object by repositioning it along a straight-line path.
Intro to 3D Models Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
CSE 681 Review: Transformations. CSE 681 Transformations Modeling transformations build complex models by positioning (transforming) simple components.
Transformations Jehee Lee Seoul National University.
Projective geometry ECE 847: Digital Image Processing Stan Birchfield Clemson University.
Geometric Camera Models
Jinxiang Chai Composite Transformations and Forward Kinematics 0.
Geometric Objects and Transformation
16/5/ :47 UML Computer Graphics Conceptual Model Application Model Application Program Graphics System Output Devices Input Devices API Function.
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)
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
3D Transformation A 3D point (x,y,z) – x,y, and z coordinates
CSCI 425/ D Mathematical Preliminaries. CSCI 425/525 2 Coordinate Systems Z X Y Y X Z Right-handed coordinate system Left-handed coordinate system.
Affine Geometry.
Computer Graphics Matrices
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
Computer Graphics I, Fall 2010 Transformations.
CS 551 / 645: Introductory Computer Graphics Viewing Transforms.
4. Affine transformations. Reading Required:  Watt, Section 1.1. Further reading:  Foley, et al, Chapter  David F. Rogers and J. Alan Adams,
Digital Image Processing CCS331 Camera Model and Imaging Geometry 1.
Modeling Transformation
3D Ojbects: Transformations and Modeling. Matrix Operations Matrices have dimensions: Vectors can be thought of as matrices: v=[2,3,4,1] is a 1x4 matrix.
Do Now.
3. Transformation
Warm Up A figure has vertices A, B, and C. After a transformation, the image of the figure has vertices A′, B′, and C′. Draw the pre-image and the image.
Review: Transformations
3D Transformations Source & Courtesy: University of Wisconsin,
Review: Transformations
Homogeneous Coordinates (Projective Space)
Geometric Camera Models
Chapter IV Spaces and Transforms
Congruence and Transformations
Reflections Geometry.
The Pinhole Camera Model
Presentation transcript:

Invariants

Definitions and Invariants A definition of a class means that given a list of properties: –For all props, all objects have that prop. –No other objects have all properties Invariant is an image property that: –For some objects, property is true for all images. –For all other objects, property is false for all images. Whiteboard Definitions are composed of invariant properties.

Invariants, a brief history Invariance has long history in perception. Each movement we make by which we alter the appearance of objects should be thought of as an experiment desgned to test whether we have understood correctly the invariant relations of the phenomena before us, that is, their existence in definite spatial relations. –Helmholtz, 1878 If invariants of the energy flux at the receptors of an organism exist, and if these invariants correspond to the permanent properties of the environment … then I think thee is new support for … a new theory of perception in psychology. –Gibson, 1967 In math, Erlanger program conceives geometry as study of invariant properties under a group of transformations.

Our Plan Projective Invariants. –Review projection. –Affine invariants (scaled orthographic projection of planar objects). –Projective invariants (planar, perspective). –Lack of invariants for 3D objects. Illumination invariants. –Planar objects. –Non for 3D objects.

The equation of projection (Forsyth & Ponce)

The equation of projection Cartesian coordinates: –We have, by similar triangles, that (x, y, z) -> (f x/z, f y/z, -f) –Ignore the third coordinate, and get

Weak perspective (scaled orthographic projection) Issue –perspective effects, but not over the scale of individual objects –collect points into a group at about the same depth, then divide each point by the depth of its group (Forsyth & Ponce)

The Equation of Weak Perspective s is constant for all points.

Projection We’ll talk about a fixed camera, and moving object. Key point: Points Some matrix The image Then:

Rotation Represents a 3D rotation of the points in P.

First, look at 2D rotation (easier) Matrix R acts on points by rotating them. Also, RR T = Identity. R T is also a rotation matrix, in the opposite direction to R.

Why does multiplying points by R rotate them? Think of the rows of R as a new coordinate system. Taking inner products of each points with these expresses that point in that coordinate system. This means rows of R must be orthonormal vectors (orthogonal unit vectors). Think of what happens to the points (1,0) and (0,1). They go to (cos theta, -sin theta), and (sin theta, cos theta). They remain orthonormal, and rotate clockwise by theta. Any other point, (a,b) can be thought of as a(1,0) + b(0,1). R(a(1,0)+b(0,1) = Ra(1,0) + Ra(0,1) = aR(1,0) + bR(0,1). So it’s in the same position relative to the rotated coordinates that it was in before rotation relative to the x, y coordinates. That is, it’s rotated.

Simple 3D Rotation Rotation about z axis. Rotates x,y coordinates. Leaves z coordinates fixed.

Full 3D Rotation Any rotation can be expressed as combination of three rotations about three axes. Rows (and columns) of R are orthonormal vectors. R has determinant 1 (not -1).

Intuitively, it makes sense that 3D rotations can be expressed as 3 separate rotations about fixed axes. Rotations have 3 degrees of freedom; two describe an axis of rotation, and one the amount. Rotations preserve the length of a vector, and the angle between two vectors. Therefore, (1,0,0), (0,1,0), (0,0,1) must be orthonormal after rotation. After rotation, they are the three columns of R. So these columns must be orthonormal vectors for R to be a rotation. Similarly, if they are orthonormal vectors (with determinant 1) R will have the effect of rotating (1,0,0), (0,1,0), (0,0,1). Same reasoning as 2D tells us all other points rotate too. Note if R has determinant -1, then R is a rotation plus a reflection.

Full 3D Motion/Projection Scale Projection 3D Translation 3D Rotation We can just write st x as t x and st y as t y.

Invariants on a line WLOG, line is y=0,z=0. Then, we can show that ||p3-p2||/||p2-p1|| is invariant to this transformation. whiteboard

||(s1x3+tx,s2x3+ty)-(s1x2+tx,s2x2+ty)|| /||(s1x2+tx,s2x2+ty)-(s1x1+tx,s2x1+ty)|| = ||(s1(x3-x2),s2(x3-x2))||/||(s1(x2-x1),s2(x2-x1))|| =sqrt(s1^2+s2^2)(x3-x2)/sqrt(s1^2+s2^2)(x2-x1) =(x3-x2)/(x2-x1)

Planar Invariants At

p1 p2 p3 p4 p4 = p1 + a(p2-p1) + b(p3-p1) A(p4)+ t = A(p1+a(p2-p1) + b(p3-p1)) + t = A(p1)+t + a(A(p2)+t – A(p1)-t) + b(A(p3)+t – A(p1)-t) p4 is linear combination of p1,p2,p3. Transformed p4 is same linear combination of transformed p1, p2, p3. We call (a,b) affine coordinates of p4.

Perspective Projection Problem: perspective is non-linear. Solution: Homogenous coordinates. –Represent points in plane as (x,y,w) –(x,y,w), (kx, ky, kw), (x/w, y/w, 1) represent same point. –If we think of these as points in 3D, they lie on a line through origin. Set of 3D points that project to same 2D point.

Perspective motion and projection

For Planar Objects The first two columns on right are orthonormal. Scale is irrelevant. So there are 6 degrees of freedom. We ignore constraints to get 8. This is called a projective transformation.

Projective Transformations Mapping from plane to plane. Form a group. –They can be composed –They have inverses. –Projective transformations equivalent to set of images of images.

Planar Projective Invariants Strategy. –Suppose P represents five points. V1 transforms P so that first 4 to canonical position, and fifth to (a,b,c). – Next, suppose we are given TP, with T unknown. Find V2 to transform first 4 points of TP to canonical position. –V2 = V1*T -1. V2P has fifth point = (a,b,c). –For this to work, V1, V2 must be uniquely determined.

Transform to Canonical Position Example: transform point 1 to (0,0,1). Three linear equations with 8+1 unknowns. Similarly, transform other points to: (1,0,1), (0,1,1), (1,1,1). Get 12 equations, 4 unknowns. Unique solution. Must be non-degenerate. This will be true if no three points collinear.

Affine Affine transformations are a subgroup of projective, with last row = (0,0,1). Note that this is equivalent to what we did in the affine case. Affine coordinates are coordinates of 4 th point after first three are transformed to (0,0), (1,0), (0,1).