2D transformations and homogeneous coordinates

Similar documents
Geometric Model of Camera

CSE328 Fundamentals of Computer Graphics: Theory, Algorithms, and Applications

Two Dimensional Viewing

3D Geometry and Camera Calibration

Computer Graphics. Geometric Transformations

Computer Graphics. Geometric Transformations

Homogeneous Coordinates

3D graphics rendering pipeline (1) 3D graphics rendering pipeline (3) 3D graphics rendering pipeline (2) 8/29/11

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

CS 335 Graphics and Multimedia. Geometric Warping

Modeling Transformations

Modeling Transformations

Image Warping. Some slides from Steve Seitz

3D Coordinates & Transformations

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

Modeling Transformations

Transforms II. Overview. Homogeneous Coordinates 3-D Transforms Viewing Projections. Homogeneous Coordinates. x y z w

Computer Graphics. P04 Transformations. Aleksandra Pizurica Ghent University

GEOMETRIC TRANSFORMATIONS AND VIEWING

Modeling Transformations Revisited

Modeling Transformations

3D Computer Vision II. Reminder Projective Geometry, Transformations. Nassir Navab. October 27, 2009

Must first specify the type of projection desired. When use parallel projections? For technical drawings, etc. Specify the viewing parameters

Scene Graphs & Modeling Transformations COS 426

CS559: Computer Graphics

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

3-Dimensional Viewing

How is project #1 going?

Image Warping. Some slides from Steve Seitz

Editing and Transformation

2D TRANSFORMATIONS AND MATRICES

Modeling Transformations

CS F-07 Objects in 2D 1

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

To Do. Course Outline. Course Outline. Goals. Motivation. Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 3: Transformations 1

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

CS770/870 Spring 2017 Transformations

Matrix Transformations. Affine Transformations

Image Metamorphosis By Affine Transformations

Transformations II. Week 2, Wed Jan 17

Today s class. Geometric objects and transformations. Informationsteknologi. Wednesday, November 7, 2007 Computer Graphics - Class 5 1

What and Why Transformations?

4. Two Dimensional Transformations

[ ] [ ] Orthogonal Transformation of Cartesian Coordinates in 2D & 3D. φ = cos 1 1/ φ = tan 1 [ 2 /1]

Affine Transformation. Edith Law & Mike Terry

Affine Transformations Computer Graphics Scott D. Anderson

Image Warping CSE399b, Spring 07 Computer Vision

Projections. Let us start with projections in 2D, because there are easier to visualize.

Image Warping (Szeliski Sec 2.1.2)

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

CS Computer Graphics: Transformations & The Synthetic Camera

3D Viewing and Projec5on. Taking Pictures with a Real Camera. Steps: Graphics does the same thing for rendering an image for 3D geometric objects

Image warping. image filtering: change range of image. image warping: change domain of image g(x) = f(h(x)) h(y)=0.5y+0.5. h([x,y])=[x,y/2] f h

CS4670: Computer Vision

Computer Graphics. Geometric. Transformations. by Brian Wyvill University of Calgary. Lecture 2 Geometric. Transformations. Lecture 2 Geometric

Image Warping, mesh, and triangulation CSE399b, Spring 07 Computer Vision

More on Transformations. COS 426, Spring 2019 Princeton University

Chapter 1. Limits and Continuity. 1.1 Limits

Motivation. General Idea. Goals. (Nonuniform) Scale. Outline. Foundations of Computer Graphics. s x Scale(s x. ,s y. 0 s y. 0 0 s z.

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

Transformations. Examples of transformations: shear. scaling

To Do. Demo (Projection Tutorial) Motivation. What we ve seen so far. Outline. Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 5: Viewing

Viewing and Projection

GRAPHICS OUTPUT PRIMITIVES

Affine and Projective Transformations

To Do. Computer Graphics (Fall 2004) Course Outline. Course Outline. Motivation. Motivation

Uses of Transformations. 2D transformations Homogeneous coordinates. Transformations. Transformations. Transformations. Transformations and matrices

Basic commands using the "Insert" menu: To insert a two-dimensional (2D) graph, use: To insert a three-dimensional (3D) graph, use: Insert > Plot > 3D

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

Kinematic Synthesis. October 6, 2015 Mark Plecnik

To Do. Motivation. Demo (Projection Tutorial) What we ve seen so far. Computer Graphics. Summary: The Whole Viewing Pipeline

What does OpenGL do?

Motivation. What we ve seen so far. Demo (Projection Tutorial) Outline. Projections. Foundations of Computer Graphics

20 Calculus and Structures

Computer Graphics. 2D Transforma5ons. Review Vertex Transforma5ons 2/3/15. adjust the zoom. posi+on the camera. posi+on the model

15.4 Constrained Maxima and Minima

Announcements. Equation of Perspective Projection. Image Formation and Cameras

Image warping/morphing

Last Lecture. Edge Detection. Filtering Pyramid

Transformations III. Week 2, Fri Jan 19

Polynomials. Math 4800/6080 Project Course

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

MEM380 Applied Autonomous Robots Winter Robot Kinematics

The 3-D Graphics Rendering Pipeline

Determining the 2d transformation that brings one image into alignment (registers it) with another. And

Matrix Representations

General Purpose Computation (CAD/CAM/CAE) on the GPU (a.k.a. Topics in Manufacturing)

CALCULATING TRANSFORMATIONS OF KINEMATIC CHAINS USING HOMOGENEOUS COORDINATES

Transformations Computer Graphics I Lecture 4

Image warping , , Computational Photography Fall 2017, Lecture 10

CS770/870 Spring 2017 Transformations

TABLE OF CONTENTS CHAPTER 1 LIMIT AND CONTINUITY... 26

Introduction to Homogeneous Transformations & Robot Kinematics

Name: [20 points] Consider the following OpenGL commands:

CS 2770: Intro to Computer Vision. Multiple Views. Prof. Adriana Kovashka University of Pittsburgh March 14, 2017

1.1 Horizontal & Vertical Translations

Warping, Morphing and Mosaics

Image Warping. Computational Photography Derek Hoiem, University of Illinois 09/28/17. Photo by Sean Carroll

Midterm Review. Wen-Chieh (Steve) Lin Department of Computer Science

CSE528 Computer Graphics: Theory, Algorithms, and Applications

Transcription:

2D transformations and homogeneous coordinates Dr Nicolas Holzschuch Universit of Cape Ton e-mail: holzschu@cs.uct.ac.za

Map of the lecture Transformations in 2D: vector/matri notation eample: translation, scaling, rotation Homogeneous coordinates: consistant notation several other good points (later) Composition of transformations Transformations for the indo sstem

Transformations in 2D In the application model: a 2D description of an object (vertices) a transformation to appl Each verte is modified: f(,) g(,) Epress the modification

Translations Each verte is modified: +t +t Before After

Translations: vector notation Use vector for the notation: makes things simpler A point is a vector: A translation is merel a vector sum: P P + T

Scaling in 2D Coordinates multiplied b the scaling factor: s s Before After

Scaling in 2D, matri notation Scaling is a matri multiplication: P SP s 0 0 s

Rotating in 2D Ne coordinates depend on both and cosθ - sinθ sinθ + cosθ θ Before After

Rotating in 2D, matri notation A rotation is a matri multiplication: P RP cosθ sinθ sinθ cosθ

2D transformations, summar Vector-matri notation siplifies riting: translation is a vector sum rotation and scaling are matri-vector mult I ould like a consistent notation: that epresses all three identicall that epresses combination of these also identicall Ho to do this?

Homogeneous coordinates Introduced in mathematics: for projections and draings used in artiller, architecture used to be classified material (in the 1850s) Add a third coordinate, A 2D point is a 3 coordinates vector:

Homogeneous coordinates (2) To points are equal if and onl if: / / and / / 0: points at infinit useful for projections and curve draing Homogenize divide b. Homogenized points: 1

Translations ith homogeneous 1 0 t 0 1 t 0 0 1 + t + t +t +t

Scaling ith homogeneous s 0 0 0 s 0 0 0 1 s s s s

Rotation ith homogeneous cosθ sinθ 0 sinθ cosθ 0 0 0 1 cosθ sinθ sin θ + cosθ cosθ sinθ sinθ + cosθ

Composition of transformations To compose transformations, multipl the matrices: composition of a rotation and a translation: M RT all transformations can be epressed as matrices even transformations that are not translations, rotations and scaling

Rotation around a point Q Rotation about a point Q: translate Q to origin (T Q ), rotate about origin (R Θ ) translate back to Q (- T Q ). P (-T Q )R Θ T Q P

Beare! Matri multiplication is not commutative The order of the transformations is vital Rotation folloed b translation isver different from translation folloed b rotation careful ith the order of the matrices! Small commutativit: rotation commute ith rotation, translation ith translation

From World to Windo Inside the application: application model coordinates related to the model possibl floating point On the screen: piel coordinates integer restricted vieport: umin/uma, vmin/vma

From Model to Vieport ma min min ma

From Model to Vieport Model is (min,min)-(ma,ma) Vieport is (umin,vmin)-(uma,vma) Translate b (-min,-min) Scale b (, ) uma-umin ma-min vma-vmin ma-min Translate b (umin,vmin) M T ST

From Model to Vieport Piel Coordinates u Model Coordinates v M

Mouse position: inverse problem Mouse click: coordinates in piels We ant the equivalent in World Coord because the user has selected an object to dra something for interaction Ho can e convert from indo coordinates to model coordinates?

Mouse click: inverse problem Simpl inverse the matri: M 1 ( T ST ) 1 Model Coordinates u M 1 v Piels coordinates

2D transformations: conclusion Simple, consistent matri notation using homogeneous coordinates all transformations epressed as matrices Used b the indo sstem: for conversion from model to indo for conversion from indo to model Used b the application: for modelling transformations