CSE 167: Introduction to Computer Graphics Lecture #4: Coordinate Systems

Similar documents
CSE 167: Introduction to Computer Graphics Lecture #3: Coordinate Systems

CSE 167: Introduction to Computer Graphics Lecture #3: Projection. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

CSE 167: Introduction to Computer Graphics Lecture #3: Projection. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

Geometric transformations in 3D and coordinate frames. Computer Graphics CSE 167 Lecture 3

Today. Today. Introduction. Matrices. Matrices. Computergrafik. Transformations & matrices Introduction Matrices

CSE 167: Introduction to Computer Graphics Lecture #2: Coordinate Transformations

CSE 167: Introduction to Computer Graphics Lecture #9: Visibility. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2018

CSE 167: Lecture #4: Vertex Transformation. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

Introduction to Computer Graphics. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

Exercise Max. Points Total 80

CSE 167: Introduction to Computer Graphics Lecture #11: Visibility Culling

CSE 167: Introduction to Computer Graphics. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

CSE 167: Introduction to Computer Graphics Lecture #5: Projection. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017

Lesson 24: Matrix Notation Encompasses New Transformations!

CSE 167: Lecture #5: Rasterization. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

CSE 167: Introduction to Computer Graphics Lecture #4: Vertex Transformation

CSE 167: Introduction to Computer Graphics. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

CSE 167: Lecture #8: Lighting. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

CSE 167: Introduction to Computer Graphics Lecture #7: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2015

Camera Model and Calibration

CSE328 Fundamentals of Computer Graphics

CV: 3D sensing and calibration

CMSC427 Transformations II: Viewing. Credit: some slides from Dr. Zwicker

GEOMETRIC TRANSFORMATIONS AND VIEWING

Lecture 3 Sections 2.2, 4.4. Mon, Aug 31, 2009

CSE 167: Introduction to Computer Graphics Lecture #10: View Frustum Culling

Computer Graphics: Geometric Transformations

CSE 167: Introduction to Computer Graphics Lecture #6: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2014

CSE528 Computer Graphics: Theory, Algorithms, and Applications

CIS 580, Machine Perception, Spring 2016 Homework 2 Due: :59AM

Exercise Max. Points Total 90

CSE 167: Lecture 11: Textures 2. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

CSE 167: Introduction to Computer Graphics Lecture #13: Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017

Introduction to Computer Vision

CSE 167: Introduction to Computer Graphics Lecture #7: Textures. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2018

CSE 167: Introduction to Computer Graphics Lecture 11: Scene Graph 2. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

Camera Model and Calibration. Lecture-12

Homework 5: Transformations in geometry

CSE 167: Introduction to Computer Graphics Lecture #5: Rasterization. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2015

CSE 167: Introduction to Computer Graphics Lecture 12: Bézier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

MATRIX REVIEW PROBLEMS: Our matrix test will be on Friday May 23rd. Here are some problems to help you review.

THE VIEWING TRANSFORMATION

Module 6: Pinhole camera model Lecture 32: Coordinate system conversion, Changing the image/world coordinate system

INTRODUCTION TO COMPUTER GRAPHICS. It looks like a matrix Sort of. Viewing III. Projection in Practice. Bin Sheng 10/11/ / 52

CSE 167: Lecture #15: Procedural Modeling. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

CSE 167: Introduction to Computer Graphics Lecture #11: Bezier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

Autonomous Navigation for Flying Robots

Humanoid Robotics. Projective Geometry, Homogeneous Coordinates. (brief introduction) Maren Bennewitz

CSE 167: Lecture #6: Color. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

CSE 167: Introduction to Computer Graphics Lecture #9: Textures. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

Two-view geometry Computer Vision Spring 2018, Lecture 10

Lecture 9: Transformations. CITS3003 Graphics & Animation

CSE 167: Lecture #17: Procedural Modeling. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

CS4670: Computer Vision

Structure from Motion. Introduction to Computer Vision CSE 152 Lecture 10

Ray Tracer I: Ray Casting Due date: 12:00pm December 3, 2001

COMP 558 lecture 19 Nov. 17, 2010

Homework #1. Displays, Alpha Compositing, Image Processing, Affine Transformations, Hierarchical Modeling

CSE 167: Lecture #7: Color and Shading. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

CSE 167: Lecture #8: GLSL. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

INTRODUCTION TO COMPUTER GRAPHICS. cs123. It looks like a matrix Sort of. Viewing III. Projection in Practice 1 / 52

Basic Elements. Geometry is the study of the relationships among objects in an n-dimensional space

Example 1: Give the coordinates of the points on the graph.

Geometric transformations assign a point to a point, so it is a point valued function of points. Geometric transformation may destroy the equation

Scene Modeling for a Single View

CSE452 Computer Graphics

Perspective Projection [2 pts]

Homework #1. Displays, Image Processing, Affine Transformations, Hierarchical Modeling

Perspective projection and Transformations

Rectangular Coordinates in Space

CSE 167: Introduction to Computer Graphics Lecture #8: Scene Graph. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2015

CS 432 Interactive Computer Graphics

Today s Agenda. Geometry

Specifying Complex Scenes

Computer Science 336 Fall 2017 Homework 2

Lecture 1.3 Basic projective geometry. Thomas Opsahl

Computer Vision I Name : CSE 252A, Fall 2012 Student ID : David Kriegman Assignment #1. (Due date: 10/23/2012) x P. = z

Assignment 2 : Projection and Homography

Viewing with Computers (OpenGL)

Assignment 1 due 4/13/2017 at 11:59PM Topic: Getting Started with WebGL and Transformations

Image warping , , Computational Photography Fall 2017, Lecture 10

3D Geometry and Camera Calibration

3.6: First Person Computer Games

Scene Modeling for a Single View

CSE 167: Introduction to Computer Graphics Lecture #8: Textures. Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2016

CSE 167: Introduction to Computer Graphics Lecture #5: Visibility, OpenGL

UNIT 2 2D TRANSFORMATIONS

CSE 167: Lecture #6: Color. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

Math background. 2D Geometric Transformations. Implicit representations. Explicit representations. Read: CS 4620 Lecture 6

Homework 5: Transformations in geometry

CSE 167: Introduction to Computer Graphics Lecture #6: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

Epipolar Geometry Prof. D. Stricker. With slides from A. Zisserman, S. Lazebnik, Seitz

EECS 4330/7330 Introduction to Mechatronics and Robotic Vision, Fall Lab 1. Camera Calibration

CIS 580, Machine Perception, Spring 2015 Homework 1 Due: :59AM

Camera model and multiple view geometry

Image Analysis. Rasmus R. Paulsen DTU Compute. DTU Compute

Single View Geometry. Camera model & Orientation + Position estimation. What am I?

The Graphics Pipeline and OpenGL I: Transformations!

CSE 252B: Computer Vision II

7.1:Transformations And Symmetry 7.2: Properties of Isometries. Pre-Image:original figure. Image:after transformation. Use prime notation

Transcription:

CSE 167: Introduction to Computer Graphics Lecture #4: Coordinate Systems Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017

Announcements Friday: homework 1 due at 2pm Upload to TritonEd Demonstrate in CSE basement labs Thursday: TA Jean teaching class 2

Lecture Overview Coordinate Transformation Typical Coordinate Systems 3

Coordinate System Given point p in homogeneous : Coordinates describe the point s 3D position in a coordinate system with basis vectors x, y, z and origin o: 4

Rectangular and Polar Coordinates 5

Coordinate Transformation Original xyzo coordinate system New uvwq coordinate system Goal: Find of p xyz in new uvwq coordinate system 6

Coordinate Transformation Express of xyzo reference frame with respect to uvwq reference frame: 7

Coordinate Transformation Point p expressed in new uvwq reference frame: 8

Coordinate Transformation 9

Coordinate Transformation Inverse transformation Given point P uvw w.r.t. reference frame uvwq: Coordinates P xyz w.r.t. reference frame xyzo are calculated as: 10

Lecture Overview Coordinate Transformation Typical Coordinate Systems 11

Typical Coordinate Systems In computer graphics, we typically use at least three coordinate systems: World coordinate system Camera coordinate system Object coordinate system Camera Object World

World Coordinates Common reference frame for all objects in the scene No standard for coordinate system orientation If there is a ground plane, usually x/y is horizontal and z points up (height) Otherwise, x/y is often screen plane, z points out of the screen Camera Object World 13

Object Coordinates Local in which points and other object geometry are given Often origin is in geometric center, on the base, or in a corner of the object Depends on how object is generated or used. Camera Object Source: http://motivate.maths.org World 14

Object Transformation The transformation from object to world is different for each object. Defines placement of object in scene. Given by model matrix (model-to-world transformation) M. Camera Object World 15

Camera Coordinate System Origin defines center of projection of camera x-y plane is parallel to image plane z-axis is perpendicular to image plane Camera Object World 16

Camera Coordinate System The Camera Matrix defines the transformation from camera to world Placement of camera in world Camera World Object 17

Camera Matrix Given: u Center point of projection e Look at point d Camera up vector u e Camera d 18 World

Camera Matrix Construct x c, y c, z c u e Camera d 19 World

Camera Matrix Step 1: z-axis zz CC = ee dd ee dd Step 2: x-axis xx CC = uu zz CC uu zz CC Step 3: y-axis yy CC = zz CC xx CC = uu uu Camera Matrix: CC = xx CC yy CC zz CC ee 0 0 0 1 20

Transforming Object to Camera Coordinates Object to world : M Camera to world : C Point to transform: p Resulting transformation equation: p = C -1 M p Camera Object World 21

Tips for Notation Indicate coordinate systems with every point or matrix Point: p object Matrix: M object world Resulting transformation equation: p camera = (C camera world ) -1 M object world p object In source code use similar names: Point: p_object or p_obj or p_o Matrix: object2world or obj2wld or o2w Resulting transformation equation: wld2cam = inverse(cam2wld); p_cam = p_obj * obj2wld * wld2cam; 22

Inverse of Camera Matrix How to calculate the inverse of camera matrix C -1? Generic matrix inversion is complex and computeintensive! Solution: affine transformation matrices can be inverted more easily Observation: Camera matrix consists of translation and rotation: T x R Inverse of rotation: R -1 = R T Inverse of translation: T(t) -1 = T(-t) Inverse of camera matrix: C -1 = R -1 x T -1 23

Objects in Camera Coordinates We have things lined up the way we like them on screen x points to the right y points up -z into the screen (i.e., z points out of the screen) Objects to look at are in front of us, i.e., have negative z values But objects are still in 3D Next step: project scene to 2D plane 24