Hank Childs, University of Oregon

Slides:



Advertisements
Similar presentations
Hank Childs, University of Oregon Oct. 22 nd, 2014 CIS 441/541: Introduction to Computer Graphics Lecture 7: Arbitrary Camera Positions.
Advertisements

Transformations We want to be able to make changes to the image larger/smaller rotate move This can be efficiently achieved through mathematical operations.
Hank Childs, University of Oregon Oct. 24th, 2014 CIS 441/541: Introduction to Computer Graphics Lecture 8: Arbitrary Camera Positions.
3D Graphics Rendering and Terrain Modeling
Hank Childs, University of Oregon Oct. 17 th, 2014 CIS 441/541: Introduction to Computer Graphics Lecture 6: Lighting Review, Arbitrary Camera Position.
CS 376 Introduction to Computer Graphics 02 / 09 / 2007 Instructor: Michael Eckmann.
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.
Lecture 3 – Transformation And Coordinate Systems
CHAPTER 7 Viewing and Transformations © 2008 Cengage Learning EMEA.
CAP4730: Computational Structures in Computer Graphics
Introduction to 3D Graphics John E. Laird. Basic Issues u Given a internal model of a 3D world, with textures and light sources how do you project it.
Geometric Intuition Randy Gaul. Vectors, Points and Basis Matrices Rotation Matrices Dot product and how it’s useful Cross product and how it’s useful.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Basics of Rendering Pipeline Based Rendering –Objects in the scene are rendered in a sequence of steps that form the Rendering Pipeline. Ray-Tracing –A.
COMP 175: Computer Graphics March 24, 2015
CS 480/680 Computer Graphics Representation Dr. Frederick C Harris, Jr. Fall 2012.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
Transformations Dr. Amy Zhang.
Week 2 - Wednesday CS361.
MIT EECS 6.837, Durand and Cutler Graphics Pipeline: Projective Transformations.
CS 376 Introduction to Computer Graphics 02 / 16 / 2007 Instructor: Michael Eckmann.
Geometric Objects and Transformation
10/3/02 (c) 2002 University of Wisconsin, CS 559 Last Time 2D Coordinate systems and transformations.
The Rendering Pipeline CS 445/645 Introduction to Computer Graphics David Luebke, Spring 2003.
1 Computer Graphics Week9 -3D Geometric Transformation.
16/5/ :47 UML Computer Graphics Conceptual Model Application Model Application Program Graphics System Output Devices Input Devices API Function.
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Affine Transformations.
Geometric Transformations
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Hank Childs, University of Oregon Volume Rendering, pt 1.
Computer Graphics, KKU. Lecture 41 The Computer Programming Laws Any given program, when running, is obsolete. Any given program costs more and.
David Luebke1/10/2016 CS 551 / 645: Introductory Computer Graphics David Luebke
Computer Graphics Matrices
Graphics Lecture 2: Slide 1 Lecture 2 Transformations for animation.
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,
Geometric Transformations Ceng 477 Introduction to Computer Graphics Computer Engineering METU.
Forward Projection Pipeline and Transformations CENG 477 Introduction to Computer Graphics.
Introduction to Computer Graphics
Hank Childs, University of Oregon
Computer Graphics Overview
CSE 167 [Win 17], Lecture 2: Review of Basic Math Ravi Ramamoorthi
Hank Childs, University of Oregon
Computer Graphics Lecture 21 Triangles and Planes Taqdees A
Math Fundamentals Maths revisit.
Geometric Transformations
Hank Childs, University of Oregon
Hank Childs, University of Oregon
Computer Graphics CC416 Week 15 3D Graphics.
Review: Transformations
CSCE 441 Computer Graphics 3-D Viewing
3D Transformations Source & Courtesy: University of Wisconsin,
Hank Childs, University of Oregon
Review: Transformations
Modeling 101 For the moment assume that all geometry consists of points, lines and faces Line: A segment between two endpoints Face: A planar area bounded.
3D Graphics Rendering PPT By Ricardo Veguilla.
Lecture 03: Linear Algebra
COMP 175: Computer Graphics February 9, 2016
3D Rendering Pipeline Hidden Surface Removal 3D Primitives
Hank Childs, University of Oregon
Chapter IV Spaces and Transforms
Computer Graphics Lecture 20
Chapter V Vertex Processing
3D Transformation CS380: Computer Graphics Sung-Eui Yoon (윤성의)
(c) University of Wisconsin, CS559
Geometric Objects and Transformations (II)
CSCE441: Computer Graphics 2D/3D Transformations
Rendering – Matrix Transformations and the Graphics Pipeline
The Pinhole Camera Model
Presentation transcript:

Hank Childs, University of Oregon CIS 441/541: Introduction to Computer Graphics Lecture 11: Camera Transform Hank Childs, University of Oregon Oct. 19th, 2016

Announcements

Class Cancellation Class cancelled on Monday, October 24th Will do YouTube lecture (if necessary) to stay on track

Review

Shading Our goal: 3 types of lighting to consider: For each pixel, calculate a shading factor Shading factor typically between 0 and 1, but sometimes >1 Shading >1 makes a surface more white 3 types of lighting to consider: Ambient Diffuse Specular Light everwhere Our game plan: Calculate all 3 and combine them. rough surface smooth surface

Phong Model Combine three lighting effects: ambient, diffuse, specular

Phong Model Simple version: 1 light, with “full intensity” (i.e., don’t add an intensity term) Phong model Shading_Amount = Ka + Kd*Diffuse + Ks*Specular Signature: double CalculatePhongShading(LightingParameters &, double *viewDirection, double *normal) What should view direction be?

Lighting parameters

Project #1E (6%) (due Oct 24th) Goal: add Phong shading Extend your project1D code File proj1e_geometry.vtk available on web (9MB) File “reader1e.cxx” has code to read triangles from file. No Cmake, project1e.cxx

Changes to data structures class Triangle { public: double X[3], Y[3], Z[3]; double colors[3][3]; double normals[3][3]; }; reader1e.cxx will not compile until you make these changes reader1e.cxx will initialize normals at each vertex

Now Let’s Start On Arbitrary Camera Positions Note: Ken Joy’s graphics notes are fantastic

Basic Transforms

Context Models stored in “world space” Pick an origin, store all points relative to that origin We have been rasterizing in “device space” Our goal: transform from world space to device space We will do this using matrix multiplications Multiply point by matrix to get new point

Starting easy … two-dimensional MP = P’ Matrix M transforms point P to make new point P’. (a b) (x) (a*x + b*y) (c d) X (y) = (c*x + d*y) M takes point (x,y) to point (a*x+b*y, c*x+d*y)

MP = P’ Matrix M transforms point P to make new point P. (1 0) (x) (x) (0 1) X (y) = (y) Identity Matrix

MP = P’ Matrix M transforms point P to make new point P. (x,y) (2x,y) (2 0) (x) (2x) (0 1) X (y) = (y) Scale in X, not in Y

Scale in both dimensions MP = P’ Matrix M transforms point P to make new point P. (x,y) (s 0) (x) (sx) (0 t) X (y) = (ty) (sx,ty) Scale in both dimensions

MP = P’ Matrix M transforms point P to make new point P. (x,y) (0 1) (x) (y) (1 0) X (y) = (x) (y,x) Switch X and Y

Rotate 90 degrees clockwise MP = P’ Matrix M transforms point P to make new point P. (x,y) (0 1) (x) (y) (-1 0) X (y) = (-x) (y,-x) Rotate 90 degrees clockwise

Rotate 90 degrees counter-clockwise MP = P’ Matrix M transforms point P to make new point P. (x,y) (0 -1) (x) (-y) (1 0) X (y) = (x) (-y,x) Rotate 90 degrees counter-clockwise

Rotate “a” degrees counter-clockwise MP = P’ Matrix M transforms point P to make new point P. (x’, y’) (x,y) a (cos(a) sin(a)) (x) (cos(a)*x+sin(a)*y)) (-sin(a) cos(a)) X (y) = (-sin(a)*x+cos(a)*y) Rotate “a” degrees counter-clockwise

Combining transformations How do we rotate by 90 degrees clockwise and then scale X by 2? Answer: multiply by matrix that multiplies by 90 degrees clockwise, then multiple by matrix that scales X by 2. But can we do this efficiently? (0 1) (2 0) (0 1) (-1 0) X (0 1) = (-2 0)

Reminder: matrix multiplication (a b) (e f) (a*e+b*g a*f+b*h) (c d) X (g h) = (c*e+d*g c*f+d*h)

Combining transformations How do we rotate by 90 degrees clockwise and then scale X by 2? Answer: multiply by matrix that rotates by 90 degrees clockwise, then multiply by matrix that scales X by 2. But can we do this efficiently? (0 1) (2 0) (0 1) (-1 0) X (0 1) = (-2 0)

Combining transformations How do we scale X by 2 and then rotate by 90 degrees clockwise? Answer: multiply by matrix that scales X by 2, then multiply by matrix that rotates 90 degrees clockwise. (2 0) (0 1) (0 2) (0 1) X (-1 0) = (-1 0) (0 1) (2 0) (0 1) (-1 0) X (0 1) = (-2 0) Multiply then scale Order matters!!

Translations Translation is harder: (a) (c) (a+c) (b) + (d) = (b+d) But this doesn’t fit our nice matrix multiply model… What to do??

Homogeneous Coordinates (1 0 0) (x) (x) (0 1 0) X (y) = (y) (0 0 1) (1) = (1) Add an extra dimension. A math trick … don’t overthink it.

Homogeneous Coordinates (1 0 dx) (x) (x+dx) (0 1 dy) X (y) = (y+dy) (0 0 1) (1) (1) Translation We can now fit translation into our matrix multiplication system.

Arbitrary Camera Positions

How do we specify a camera? The “viewing pyramid” or “view frustum”. Frustum: In geometry, a frustum (plural: frusta or frustums) is the portion of a solid (normally a cone or pyramid) that lies between two parallel planes cutting it.

New terms Coordinate system: Example: (3, 4, 6) really means… A system that uses coordinates to establish position Example: (3, 4, 6) really means… 3x(1,0,0) 4x(0,1,0) 6x(0,0,1) Since we assume the Cartesian coordinate system

New terms Frame: Cartesian example: (3,4,6) A way to place a coordinate system into a specific location in a space Cartesian example: (3,4,6) It is assumed that we are speaking in reference to the origin (location (0,0,0)). A frame F is a collection of n vectors and a location (v1, v2, …, vn, O) over a space if (v1, v2, … vn) form a basis over that space. What is a basis??  linear algebra term

What does it mean to form a basis? For any vector v, there are unique coordinates (c1, …, cn) such that v = c1*v1 + c2*v2 + … + cn*vn

What does it mean to form a basis? For any vector v, there are unique coordinates (c1, …, cn) such that v = c1*v1 + c2*v2 + … + cn*vn (also more to the definition) Consider some point P. The basis has an origin O There is a vector v such that O+v = P We know we can construct v using a combination of vi’s Therefore we can represent P in our frame using the coordinates (c1, c2, …, cn)

Example of Frames Frame F = (v1, v2, O) What are F’s coordinates for the point (6, 6)?

Example of Frames Frame F = (v1, v2, O) What are F’s coordinates for the point (6, 6)? Answer: (-2, 3)

Our goal Camera space: Camera located at origin, looking down -Z Triangle coordinates relative to camera frame O O World space: Triangles in native Cartesian coordinates Camera located anywhere Image space: All viewable objects within -1 <= x,y,z <= +1 x y z Screen space: All viewable objects within -1 <= x, y <= +1 Device space: All viewable objects within 0<=x<=width, 0 <=y<=height

Our goal Camera space: Camera located at origin, looking down -Z Triangle coordinates relative to camera frame O O World space: Triangles in native Cartesian coordinates Camera located anywhere Image space: All viewable objects within -1 <= x,y,z <= +1 x y z Screen space: All viewable objects within -1 <= x, y <= +1 Device space: All viewable objects within 0<=x<=width, 0 <=y<=height

World Space World Space is the space defined by the user’s coordinate system. This space contains the portion of the scene that is transformed into image space by the camera transform. Many of the spaces have “bounds”, meaning limits on where the space is valid With world space 2 options: No bounds User specifies the bound

Our goal Camera Transform Camera space: Camera located at origin, looking down -Z Triangle coordinates relative to camera frame O Camera Transform O World space: Triangles in native Cartesian coordinates Camera located anywhere Image space: All viewable objects within -1 <= x,y,z <= +1 x y z Screen space: All viewable objects within -1 <= x, y <= +1 Device space: All viewable objects within 0<=x<=width, 0 <=y<=height

World Space World Space is the space defined by the user’s coordinate system. This space contains the portion of the scene that is transformed into image space by the camera transform. Many of the spaces have “bounds”, meaning limits on where the space is valid With world space 2 options: No bounds User specifies the bound

Our goal Camera space: Camera located at origin, looking down -Z Triangle coordinates relative to camera frame O O World space: Triangles in native Cartesian coordinates Camera located anywhere Image space: All viewable objects within -1 <= x,y,z <= +1 x y z Screen space: All viewable objects within -1 <= x, y <= +1 Device space: All viewable objects within 0<=x<=width, 0 <=y<=height

How do we specify a camera? The “viewing pyramid” or “view frustum”. Frustum: In geometry, a frustum (plural: frusta or frustums) is the portion of a solid (normally a cone or pyramid) that lies between two parallel planes cutting it.

Our goal View Transform Camera space: Camera located at origin, looking down -Z Triangle coordinates relative to camera frame O O World space: Triangles in native Cartesian coordinates Camera located anywhere View Transform Image space: All viewable objects within -1 <= x,y,z <= +1 x y z Screen space: All viewable objects within -1 <= x, y <= +1 Device space: All viewable objects within 0<=x<=width, 0 <=y<=height

Our goal Camera space: Camera located at origin, looking down -Z Triangle coordinates relative to camera frame O O World space: Triangles in native Cartesian coordinates Camera located anywhere Image space: All viewable objects within -1 <= x,y,z <= +1 x y z Screen space: All viewable objects within -1 <= x, y <= +1 Device space: All viewable objects within 0<=x<=width, 0 <=y<=height

Image Space {(x,y,z) : −1≤x≤1,−1≤y≤1, −1≤z≤1} (or −1≤z≤0) Image Space is the three-dimensional coordinate system that contains screen space. It is the space where the camera transformation directs its output. The bounds of Image Space are 3-dimensional cube. {(x,y,z) : −1≤x≤1,−1≤y≤1, −1≤z≤1} (or −1≤z≤0)

Image Space Diagram Y=1 Up X = -1 Z = -1 Z=1 X=1 Y = -1

Our goal Camera space: Camera located at origin, looking down -Z Triangle coordinates relative to camera frame O O World space: Triangles in native Cartesian coordinates Camera located anywhere Image space: All viewable objects within -1 <= x,y,z <= +1 x y z Screen space: All viewable objects within -1 <= x, y <= +1 Device space: All viewable objects within 0<=x<=width, 0 <=y<=height

Screen Space Screen Space is the intersection of the xy-plane with Image Space. Points in image space are mapped into screen space by projecting via a parallel projection, onto the plane z = 0 . Example: a point (0, 0, z) in image space will project to the center of the display screen

Screen Space Diagram +1 Y -1 -1 X +1

Our goal Camera space: Camera located at origin, looking down -Z Triangle coordinates relative to camera frame O O World space: Triangles in native Cartesian coordinates Camera located anywhere Image space: All viewable objects within -1 <= x,y,z <= +1 x y z Screen space: All viewable objects within -1 <= x, y <= +1 Device space: All viewable objects within 0<=x<=width, 0 <=y<=height

Device Space Device Space is the lowest level coordinate system and is the closest to the hardware coordinate systems of the device itself. Device space is usually defined to be the n × m array of pixels that represent the area of the screen. A coordinate system is imposed on this space by labeling the lower-left-hand corner of the array as (0,0), with each pixel having unit length and width.

Device Space Example

Device Space With Depth Information Extends Device Space to three dimensions by adding z-coordinate of image space. Coordinates are (x, y, z) with 0 ≤ x ≤ n 0 ≤ y ≤ m z arbitrary (but typically -1 ≤ z ≤ +1 or -1 ≤ z ≤ 0 )

Easiest Transform Camera space: Camera located at origin, looking down -Z Triangle coordinates relative to camera frame O O World space: Triangles in native Cartesian coordinates Camera located anywhere Image space: All viewable objects within -1 <= x,y,z <= +1 x y z Screen space: All viewable objects within -1 <= x, y <= +1 Device space: All viewable objects within 0<=x<=width, 0 <=y<=height

Image Space to Device Space (x, y, z)  ( x’, y’, z’), where x’ = n*(x+1)/2 y’ = m*(y+1)/2 z’ = z (for an n x m image) Matrix: (x’ 0 0 0) (0 y’ 0 0) (0 0 z’ 0) (0 0 0 1)

(a little more review) Note: I left these slides in so I don’t forget them for Friday’s lecture I do not anticipate to make it this far in Wednesday’s lecture. I know that they duplicate slides earlier in the lecture

New terms Coordinate system: Example: (3, 4, 6) really means… A system that uses coordinates to establish position Example: (3, 4, 6) really means… 3x(1,0,0) 4x(0,1,0) 6x(0,0,1) Since we assume the Cartesian coordinate system

New terms Frame: Cartesian example: (3,4,6) A way to place a coordinate system into a specific location in a space Cartesian example: (3,4,6) It is assumed that we are speaking in reference to the origin (location (0,0,0)). A frame F is a collection (v1, v2, …, vn, O) is a frame over a space if (v1, v2, … vn) form a basis over that space. What is a basis??  linear algebra term

What does it mean to form a basis? For any vector v, there are unique coordinates (c1, …, cn) such that v = c1*v1 + c2*v2 + … + cn*vn

What does it mean to form a basis? For any vector v, there are unique coordinates (c1, …, cn) such that v = c1*v1 + c2*v2 + … + cn*vn Consider some point P. The basis has an origin O There is a vector v such that O+v = P We know we can construct v using a combination of vi’s Therefore we can represent P in our frame using the coordinates (c1, c2, …, cn)

Example of Frames Frame F = (v1, v2, O) What are F’s coordinates for the point (6, 6)?

Example of Frames Frame F = (v1, v2, O) What are F’s coordinates for the point (6, 6)? Answer: (-2, 3)

Translations Translation is harder: (a) (c) (a+c) (b) + (d) = (b+d) But this doesn’t fit our nice matrix multiply model… What to do??

Homogeneous Coordinates (1 0 0) (x) (x) (0 1 0) X (y) = (y) (0 0 1) (1) = (1) Add an extra dimension. A math trick … don’t overthink it.

Homogeneous Coordinates (1 0 dx) (x) (x+dx) (0 1 dy) X (y) = (y+dy) (0 0 1) (1) (1) Translation We can now fit translation into our matrix multiplication system.

(now new content)

Homogeneous Coordinates Defined: a system of coordinates used in projective geometry, as Cartesian coordinates are used in Euclidean geometry Primary uses: 4 × 4 matrices to represent general 3-dimensional transformations it allows a simplified representation of mathematical functions – the rational form – in which rational polynomial functions can be simply represented We only care about the first I don’t really even know what the second use means

Interpretation of Homogeneous Coordinates 4D points: (x, y, z, w) Our typical frame: (x, y, z, 1)

Interpretation of Homogeneous Coordinates 4D points: (x, y, z, w) Our typical frame: (x, y, z, 1) So how to treat points not along the w=1 line? Our typical frame in the context of 4D points

Projecting back to w=1 line Let P = (x, y, z, w) be a 4D point with w != 1 Goal: find P’ = (x’, y’, z’, 1) such P projects to P’ (We have to define what it means to project) Idea for projection: Draw line from P to origin. If Q is along that line (and Q.w == 1), then Q is a projection of P

Projecting back to w==1 line Idea for projection: Draw line from P to origin. If Q is along that line (and Q.w == 1), then Q is a projection of P

So what is Q? Similar triangles argument: x’ = x/w y’ = y/w z’ = z/w

Our goal Need to construct a Camera Frame Camera space: Camera located at origin, looking down -Z Triangle coordinates relative to camera frame O O -Z World space: Triangles in native Cartesian coordinates Camera located anywhere Need to construct a Camera Frame Need to construct a matrix to transform points from Cartesian Frame to Camera Frame Transform triangle by transforming its three vertices

Basis pt 2 (more linear algebra-y this time) Camera frame must be a basis: Spans space … can get any point through a linear combination of basis functions Every member must be linearly independent

Camera frame construction Must choose (v1,v2,v3,O) O = camera position v3 = O-focus Not “focus-O”, since we want to look down -Z O -Z Camera space: Camera located at origin, looking down -Z Triangle coordinates relative to camera frame

What is the up axis? Up axis is the direction from the base of your nose to your forehead Up

What is the up axis? Up axis is the direction from the base of your nose to your forehead Up + =

What is the up axis? Up axis is the direction from the base of your nose to your forehead (if you lie down while watching TV, the screen is sideways) Up + =

Camera frame construction Must choose (v1,v2,v3,O) O = camera position v3 = O-focus v2 = up v1 = up x (O-focus) O -Z Camera space: Camera located at origin, looking down -Z Triangle coordinates relative to camera frame

But wait … what if dot(v2,v3) != 0? Up O-focus We can get around this with two cross products: v1 = Up x (O-focus) v2 = (O-focus) x v1

Camera frame summarized O = camera position v1 = Up x (O-focus) v2 = (O-focus) x v1 v3 = O-focus

Our goal Need to construct a Camera Frame  ✔ Camera space: Camera located at origin, looking down -Z Triangle coordinates relative to camera frame O O -Z World space: Triangles in native Cartesian coordinates Camera located anywhere Need to construct a Camera Frame  ✔ Need to construct a matrix to transform points from Cartesian Frame to Camera Frame Transform triangle by transforming its three vertices

The Two Frames of the Camera Transform Our two frames: Cartesian: <1,0,0> <0,1,0> <0,0,1> (0,0,0) Camera: v1 = up x (O-focus) v2 = (O-focus) x u v3 = (O-focus) O

The Two Frames of the Camera Transform Our two frames: Cartesian: <1,0,0> <0,1,0> <0,0,1> (0,0,0) Camera: v1 = up x (O-focus) v2 = (O-focus) x u v3 = (O-focus) O Camera is a Frame, so we can express any vector in Cartesian as a combination of v1, v2, and v3.

Converting From Cartesian Frame To Camera Frame The Cartesian vector <1,0,0> can be represented as some combination of the Camera basis functions v1, v2, v3: <1,0,0> = e1,1 * v1 + e1,2 * v2 + e1,3 * v3 So can the Cartesian vector <0,1,0> <0,1,0> = e2,1 * v1 + e2,2 * v2 + e2,3 * v3 So can the Cartesian vector <0,0,1> <0,0,1> = e3,1 * v1 + e3,2 * v2 + e3,3 * v3 So can the vector: Cartesian origin – Camera origin (0,0,0) - O = e4,1 * v1 + e4,2 * v2 + e4,3 * v3  (0,0,0) = e4,1 * v1 + e4,2 * v2 + e4,3 * v3 + O

Putting Our Equations Into Matrix Form <1,0,0> = e1,1 * v1 + e1,2 * v2 + e1,3 * v3 <0,1,0> = e2,1 * v1 + e2,2 * v2 + e2,3 * v3 <0,0,1> = e3,1 * v1 + e3,2 * v2 + e3,3 * v3 (0,0,0) = e4,1 * v1 + e4,2 * v2 + e4,3 * v3 + O  [<1,0,0>] [e1,1 e1,2 e1,3 0] [v1] [<0,1,0>] [e2,1 e2,2 e2,3 0] [v2] [<0,0,1>] = [e3,1 e3,2 e3,3 0] [v3] (0,0,0) [e4,1 e4,2 e4,3 1] [O]

Here Comes The Trick… Consider the meaning of Cartesian coordinates (x,y,z): [x y z 1][<1,0,0>] [<0,1,0>] = (x,y,z) [<0,0,1>] [(0,0,0)] But: [<1,0,0>] [e1,1 e1,2 e1,3 0] [v1] [<0,1,0>] [e2,1 e2,2 e2,3 0] [v2] [<0,0,1>] = [e3,1 e3,2 e3,3 0] [v3] (0,0,0) [e4,1 e4,2 e4,3 1] [O]

Here Comes The Trick… But: [<1,0,0>] [e1,1 e1,2 e1,3 0] [v1] [x y z 1][<0,1,0>] [x y z 1] [e2,1 e2,2 e2,3 0] [v2] [<0,0,1>] = [e3,1 e3,2 e3,3 0] [v3] [(0,0,0)] [e4,1 e4,2 e4,3 1] [O] Coordinates of (x,y,z) with respect to Camera frame. So this matrix is the camera transform!! Coordinates of (x,y,z) with respect to Cartesian frame.

Solving the Camera Transform [e1,1 e1,2 e1,3 0] [v1.x v2.x v3.x 0] [e2,1 e2,2 e2,3 0] [v1.y v2.y v3.y 0] [e3,1 e3,2 e3,3 0] = [v1.z v2.z v3.z 0] [e4,1 e4,2 e4,3 1] [v1.t v2.t v3.t 1] Where t = (0,0,0)-O How do we know?: Cramer’s Rule + simplifications Want to derive?: http://www.idav.ucdavis.edu/education/ GraphicsNotes/Camera-Transform/Camera- Transform.html