Coordinate transformations. 5554: Packet 8 1

Similar documents
2D TRANSFORMATIONS AND MATRICES

2D Image Transforms Computer Vision (Kris Kitani) Carnegie Mellon University

Modeling Transformations

Hello, welcome to the video lecture series on Digital Image Processing. So in today's lecture

Interactive Computer Graphics. Hearn & Baker, chapter D transforms Hearn & Baker, chapter 5. Aliasing and Anti-Aliasing

UNIT 2 2D TRANSFORMATIONS

2D and 3D Transformations AUI Course Denbigh Starkey

Supplementary Material: The Rotation Matrix

Image Warping. Some slides from Steve Seitz

Transformations. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

Image Warping : Computational Photography Alexei Efros, CMU, Fall Some slides from Steve Seitz

COMP30019 Graphics and Interaction Three-dimensional transformation geometry and perspective

Image warping , , Computational Photography Fall 2017, Lecture 10

Graphics and Interaction Transformation geometry and homogeneous coordinates

COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates

3D Mathematics. Co-ordinate systems, 3D primitives and affine transformations

Game Engineering CS S-05 Linear Transforms

Computer Graphics: Geometric Transformations

Transforms. COMP 575/770 Spring 2013

Last week. Machiraju/Zhang/Möller/Fuhrmann

Computer Graphics Geometric Transformations

Transformations Week 9, Lecture 18

Interactive Computer Graphics. Warping and morphing. Warping and Morphing. Warping and Morphing. Lecture 14+15: Warping and Morphing. What is.

Linear algebra deals with matrixes: two-dimensional arrays of values. Here s a matrix: [ x + 5y + 7z 9x + 3y + 11z

Affine Transformation. Edith Law & Mike Terry

2D transformations: An introduction to the maths behind computer graphics

CS 4204 Computer Graphics

MATHEMATICS FOR ENGINEERING TUTORIAL 5 COORDINATE SYSTEMS

Penrose World. Group member. CSEE4840 Embedded System Design 03/26/2014 Project Design. Yuanhui Luo(yl3026) Yao Luo(yl3028) Cong Zhu(cz2311)

+ i a y )( cosφ + isinφ) ( ) + i( a x. cosφ a y. = a x

Chapter 2 - Basic Mathematics for 3D Computer Graphics

Lecture 6 Sections 4.3, 4.6, 4.7. Wed, Sep 9, 2009

Coordinate Frames and Transforms

Rotation of Ellipsoid

Computer Graphics. Chapter 5 Geometric Transformations. Somsak Walairacht, Computer Engineering, KMITL

Matrix Transformations. Affine Transformations

521493S Computer Graphics Exercise 2 Solution (Chapters 4-5)

PreCalculus Unit 1: Unit Circle Trig Quiz Review (Day 9)

Image Warping. Many slides from Alyosha Efros + Steve Seitz. Photo by Sean Carroll

Lecture 4: Transforms. Computer Graphics CMU /15-662, Fall 2016

2D and 3D Coordinate Systems and Transformations

Computer Graphics 7: Viewing in 3-D

CSC418 / CSCD18 / CSC2504

Motion Control (wheeled robots)

Content. Coordinate systems Orthographic projection. (Engineering Drawings)

Kinematics of Wheeled Robots

Linear transformations Affine transformations Transformations in 3D. Graphics 2009/2010, period 1. Lecture 5: linear and affine transformations

DD2423 Image Analysis and Computer Vision IMAGE FORMATION. Computational Vision and Active Perception School of Computer Science and Communication

Vector Algebra Transformations. Lecture 4

GEOMETRIC TRANSFORMATIONS AND VIEWING

Specifying Complex Scenes

Computer Science 336 Fall 2017 Homework 2

EEE 187: Robotics Summary 2

Representing 2D Transformations as Matrices

Transformations: 2D Transforms

3D Transformation. In 3D, we have x, y, and z. We will continue use column vectors:. Homogenous systems:. x y z. x y z. glvertex3f(x, y,z);

Linear and Affine Transformations Coordinate Systems

N-Views (1) Homographies and Projection

CS4670: Computer Vision

Homogeneous Coordinates and Transformations of the Plane

2D Object Definition (1/3)

EECE 478. Learning Objectives. Learning Objectives. Linear Algebra and 3D Geometry. Linear algebra in 3D. Coordinate systems

Game Engineering: 2D

Supplementary Information. Design of Hierarchical Structures for Synchronized Deformations

Computer Vision. Coordinates. Prof. Flávio Cardeal DECOM / CEFET- MG.

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

Overview. Affine Transformations (2D and 3D) Coordinate System Transformations Vectors Rays and Intersections

Computer Graphics. P04 Transformations. Aleksandra Pizurica Ghent University

Transformation Algebra

INF3320 Computer Graphics and Discrete Geometry

To graph the point (r, θ), simply go out r units along the initial ray, then rotate through the angle θ. The point (1, 5π 6

AP CALCULUS BC 2014 SCORING GUIDELINES

Computer Graphics: Viewing in 3-D. Course Website:

Object Representation Affine Transforms. Polygonal Representation. Polygonal Representation. Polygonal Representation of Objects

Math 7 Elementary Linear Algebra PLOTS and ROTATIONS

DD2429 Computational Photography :00-19:00

Overview of Transformations (18 marks) In many applications, changes in orientations, size, and shape are accomplished with

CMSC 425: Lecture 6 Affine Transformations and Rotations

RIGID IMAGE REGISTRATION

Computer Science 426 Midterm 3/11/04, 1:30PM-2:50PM

1. We ll look at: Types of geometrical transformation. Vector and matrix representations

Lecture 9: Transformations. CITS3003 Graphics & Animation

Visual Recognition: Image Formation

3D Computer Graphics. Jared Kirschner. November 8, 2010

CT5510: Computer Graphics. Transformation BOCHANG MOON

For each question, indicate whether the statement is true or false by circling T or F, respectively.

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

CALCULATING TRANSFORMATIONS OF KINEMATIC CHAINS USING HOMOGENEOUS COORDINATES

Camera Projection Models We will introduce different camera projection models that relate the location of an image point to the coordinates of the

Camera Model and Calibration

Section III: TRANSFORMATIONS

2.1 Three Dimensional Concepts

The Graphics Pipeline and OpenGL I: Transformations!

GEOMETRICAL IMAGE MODIFICATION

Digital Image Fundamentals II

CS4733 Class Notes, Computer Vision

3D Transformations World Window to Viewport Transformation Week 2, Lecture 4

Chapter 5. Transformations of Objects

Homogeneous Coordinates

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

Transcription:

Coordinate transformations 5554: Packet 8 1

Overview Rigid transformations are the simplest Translation, rotation Preserve sizes and angles Affine transformation is the most general linear case Homogeneous coordinates allow for convenient matrix representation 5554: Packet 8 2

2D coordinate transformations 5554: Packet 8 3

Translation y ( x, y ) T ( t, ) x ty T ( xy, ) T x x x t x = + y y t y 5554: Packet 8 4

Two interpretations Translate a point relative to the given coordinate system = vector addition Find the point's location relative to a new coordinate system 5554: Packet 8 5

y y x x t x = + y y t y ( xy, ) T x ( t, ) x ty T 5554: Packet 8 6 x

y Rotation r ( x, y ) T x cosθ sinθ x = y sinθ cosθ y θ r ( xy, ) T x 5554: Packet 8 7

y r ( x, y ) T r = x 2 + y 2 θ ϕ r ( xy, ) T x Solve for x' and y' : x = rcos + = r cos cos sin sin ( ϕ θ) ( ϕ θ ϕ θ) y = rsin + = r sin cos + cos sin ( ϕ θ) ( ϕ θ ϕ θ) 5554: Packet 8 8

x = rcos ϕ + θ = rcosϕcosθ rsinϕsinθ ( ) ( ) y = rsin ϕ + θ = rsinϕcosθ + rcosϕsinθ Solve for x and y: x = r cosϕ y = r sinϕ Combine: x = xcosθ ysinθ y = xsinθ + ycosθ 5554: Packet 8 9

Two interpretations Rotate a point relative to the given coordinate system Find the point's location relative to a new coordinate system (rotated about the origin of the original coordinate system) 5554: Packet 8 10

y y θ x cosθ sinθ x = y sinθ cosθ y p θ x x 5554: Packet 8 11

Translation and rotation combined x cosθ sinθ x t x = + y sinθ cosθ y t y One interpretation: Rotate the point (x, y) by the angle θ about the origin (counterclockwise if θ > 0), then translate by ( t, ) x ty T 5554: Packet 8 12

Another interpretation: Transform point locations to a new coordinate system that is translated by ( t, ) x ty and then rotated by angle θ (clockwise if θ > 0) T 5554: Packet 8 13

If several points are involved, then the distance between each pair of points remains the same; this is an example of rigid transformation 5554: Packet 8 14

Homogeneous coordinate representation Re-write matrix multiplication and addition 5554: Packet 8 15

x cosθ sinθ x t x = + y sinθ cosθ y t y We can write this another way: x cosθ sinθ t x x y = sinθ cosθ t y y 1 0 0 1 1 5554: Packet 8 16

Homogeneous coordinates Re-write matrix multiplication and addition as multiplication alone Must increase the dimensionality by 1 Primary motivation: simplifies a sequence of transformations 5554: Packet 8 17

x x y = M MM y n 2 1 1 1 x x y = M y (Associative, but not commutative) 1 1 5554: Packet 8 18

2D affine transformation x = a x + a y + a 11 12 13 y = a x + a y + a 21 22 23 Most general linear transformation involving 2 variables Translation and rotation are special cases of this 5554: Packet 8 19

2D affine transformation (homogeneous form) x a a a x 11 12 13 y = a a a y 21 22 23 1 0 0 1 1 5554: Packet 8 20

Scaling x s 0 0 x x y = 0 s 0 y y 1 0 0 1 1 5554: Packet 8 21

Similarity transformation x a b 0 x y = b a 0 y 1 0 0 1 1 Rotates and scales Angles are preserved 5554: Packet 8 22

Shear in x-direction x 1 k 0 x x y = 0 1 0 y 1 0 0 1 1 5554: Packet 8 23

Shear in y-direction x 1 0 0 x y = k 1 0 y y 1 0 0 1 1 5554: Packet 8 24

Reflection about x-axis x 1 0 0 x y = 0 1 0 y 1 0 0 1 1 5554: Packet 8 25

Mapping 3D to 2D sx f 0 0 x sy = 0 f 0 y s 0 0 1 z Solve for x' and y' by eliminating s Does this look familiar? 5554: Packet 8 26

2D affine transformation x a a a x 11 12 13 y = a a a y 21 22 23 1 0 0 1 1 Planar perspective projection sx a a a x 11 12 13 sy = a a a y 21 22 23 s a a 1 1 31 32 5554: Packet 8 27

An application: image warping Create a new image Inew from a given image I using arbitrary mappings g and h: new ( ) (, ) (, ), (, ) I xy = I g xy h xy Example: rotation g xy, = xcosθ ysinθ ( ) ( ) h xy, = xsinθ + ycosθ 5554: Packet 8 28

Higher-order (quadratic, cubic) mappings are common 5554: Packet 8 29

3D coordinate transformations 5554: Packet 8 30

3D translation x x t x y = y + t y z z t z 5554: Packet 8 31

about z axis about x axis Rotation x cosθ sinθ 0 x y = sinθ cosθ 0 y z 0 0 1 z x 1 0 0 x y = 0 cosθ sinθ y z 0 sinθ cosθ z 5554: Packet 8 32

about y axis Rotation x cosθ 0 sinθ x y = 0 1 0 y z sinθ 0 cosθ z 5554: Packet 8 33

Rotation about arbitrary axis through the origin: u = x u u u x 11 12 13 y = u u u y 21 22 23 z u u u z 31 32 33 ( u, u, u ) 1 11 12 13 T is a unit vector in the direction of the new x-axis (etc.) 5554: Packet 8 34

Homogeneous coordinates Arbitrary 3D rigid transformation: x u u u t x 11 12 13 x y u u u t y = 21 22 23 y z u u u t z 31 32 33 z 1 0 0 0 1 1 5554: Packet 8 35

This can be abbreviated as follows: x x y R t y = z T 1 z 0 1 1 5554: Packet 8 36

3D affine transformation x a a a a x 11 12 13 14 y a a a a y = 21 22 23 24 z a a a a z 31 32 33 34 1 0 0 0 1 1 5554: Packet 8 37

Summary Coordinate transformations (2D and 3D) have many applications Image warping is very common Affine transformation is the most general linear case Homogeneous coordinates allow for convenient matrix representation 5554: Packet 8 38