Computer Graphics. 2D transformations. Transforma3ons in computer graphics. Overview. Basic classes of geometric transforma3ons

Size: px
Start display at page:

Download "Computer Graphics. 2D transformations. Transforma3ons in computer graphics. Overview. Basic classes of geometric transforma3ons"

Transcription

1 Transforma3ons in computer graphics omputer Graphics Transforma3ons leksandra Piurica Goal: introduce methodolog to hange coordinate sstem Move and deform objects Principle: transforma3ons are applied to object ver3ces In 2D, point P(X,Y) is transformed to P (X,Y ); in 3D, P(X,Y,Z) à P (X,Y,Z ) L4_2 Overview 2D transforma3ons 3D transforma3ons Quaternions Transforma3ons in OpenGL 2D transformations L4_3 2D affine transforma3ons Basic classes of geometric transforma3ons General linear (preserve lines) Translate Rotate Scale Shear ffine (preserve paralelism) rbitrar shearing General scaling onformal (preserve angles) Uniform scaling Rigid (preserve lengths) Transla3on Rota3on L4_5 L4_6

2 Elementar 2D transforma3ons Transla3on T(T,T ) Matri representa3on Suppose we represent a 2D transforma3on b a matri X = X + T X Y = Y + T Scaling S(S,S ) a b = c d original point transformed point transforma3on matri = a + b = c + d X = X * S X Y = Y * S Y Wh is this useful? - sequence of transforma3ons à matri mul3plica3on Rota3on R(θ) X = X * θ Y*θ Y = X * θ + Y*θ L4_7 an we do it for an affine transform? L4_8 22 Matrices 22 Matrices Which transforma3ons can be represented b 22 matrices? - Lets look at some eamples: Which transforma3ons can be represented b 22 matrices? - Lets look at some eamples: 2D iden3t = = = 2D mirror over Y ais = - = = 2D rota3on around (,) = θ θ = θ + θ θ = θ θ θ 2D scale around (,) = S S = S = S 2D mirror over (,) = - = = - 2D Shear = + H X = + H Y = H H L4_9 L4_ 22 Matrices Which transforma3ons can be represented b 22 matrices? - an we represent transla3on b a 22 matri? 2D Transla3on = + T = + T NO 22 matri! Matri representa3on for affine 2D transforms We want a representa3on where 2D transla3on is also represented b a matri (so that we can easil combine different transforma3ons b mul3plica3on) 2D matri representa3on of transla3on does not eist! What do we do? Solu3on: use a 33 matri Onl linear 2D transforma3ons can be represented b a 22 matri Linear transforma3ons sa3sf: T (s P +s 2 P 2 )=s T (P )+s 2 T (P 2 ) are combina3ons of scale, rota3on, shear and mirror 2D Transla3on = + T = + T T = T Homogeneous coordinates L4_ L4_2

3 Homogeneous coordinates n equivalent formula3on: adding a 3 rd coordinate to 2D points such that (, ) à (W, W, W) (/W, /W) are artesian coordinates of the homogeneous point (,, W) (,, ) represents a point at infinit (,, ) not allowed 3 2 (2,3,) or (4,6,2) or (6,9,3) or (3,,) or (6,2,2) or W Homogeneous point is a line in 3D space L4_3 Homogeneous coordinates Even points infinitel far have a representa3on in homogeneous coordinates Points at infinit have their last coordinate equal to ero Eamples: P =(,,); P 2 =(,,); P 3 =(,,), P 4 =(2,,) P P P 2 P 3 L4_4 Matri form of elementar 2D transforma3ons 2D Shear transforma3on T = T Translation T(T,T ) S = S Scaling S(S,S ) General shear opera3on SH (H,H) = H H θ θ = θ θ Rotation R(θ) L4_5 Shear in the X- direc3on: H = a SH = Shear in the Y- direc3on: H = SH = b Shear can be represented as a combina3on of rota3ons and non- uniform scaling opera3ons. L4_6 Translate Rotate Eample: comple transforma3on as a sequence of elementar transforma3ons L4_7 Inverse elementar transforms T - (T X, T Y ) = T (-T X, -T Y ) S - (S X, S Y ) = S (/S X, /S Y ) R - (θ) = R (-θ) omple transforma3ons can be described as a combina3on (composi3on) of elementar transforma3ons (X, Y,) T = S (-) R (-) T (-) R (-) S (-) (X, Y, ) T Each rota3on brings an etra parameter, scaling and transla3ons two etra parameters an this be simplified? L4_8

4 We tr to simplif such epressions b ombining transforma3ons, if possible hanging the order of transforma3ons in order to make the combina3ons possible Transla3on and rota3on pseudo- commute T (T X,T Y ) R (θ) = R (θ) T (T X2,T Y2 ) Sequen3al elementar transforms of the same tpe absorb each other T (T X, T Y ) T (T X2, T Y2 ) = T (T X +T X2, T Y +T Y2 ) S (S X, S Y ) S (S X2, S Y2 ) = S (S X. S X2, S Y. S Y2 ) R (θ ) R (θ 2 ) = R (θ +θ 2 ) hanging transforma3on order is not alwas possible! Transforma3ons that commute are onl Two elementar transforma3ons of the same tpe Scaling with S =S and Rota3on T (T X2,T Y2 ) R (θ) R (θ) T (T X,T Y ) L4_9 L4_2 Transla3on and scaling pseudo- commute S (S X, S Y ) T (T X,T Y ) = T (T X2,T Y2 ) S (S X, S Y ) Hpothesis: Most general affine transform can alwas be represented as R (θ ) S (S X, S Y ) R (θ 2 ) T (T X,T Y ) T (T X,T Y ) S (.5,3.) This means: a unit square in the centre is reshaped to an arbitrar parallelogram, brought to an arbitrar posi3on and rotated b an arbitrar angle S (.5,3.) T (T X2,T Y2 ) No similar propert for rota3on and scaling X = ax + by + c Y = dx + ey + f Prove the hpothesis formall Set c=t, f=t Determine the parameters θ, θ 2, S X, S Y as a func3on of a, b, d, e L4_2 L4_22 Efficienc: matri calcula3ons Efficienc: crea3ng successive views The most general affine transforma3on a = d b e c f Mul3plica3on of a 33 matri with column vector requires 9 mul3plies and 6 addi3ons ctuall we need onl 4 mul3plies and 4 addi3ons X = ax + by + c Y = dx + ey + f Even though matri representa3on is useful, prac3cal applica3on should make use of the special structure of the matri, for efficienc L4_23 To produce an impression of a dnamicall rota3ng object, man successive views are needed = θ θ = θ + θ The angle difference between the successive views is ver small (a few degrees). an we simplif the calcula3on? Solu3on : Use approima3on θ : = θ = θ + What is wrong with this solu3on? beser solu3on = θ = θ + heck the determinant of the matri in both cases! L4_24

5 3- D Transforma3ons Generalia3on of 2D transforma3ons Same principle: appl to ver3ces (which are now 3D points) P(X,Y,Z) is transformed to P (X,Y,Z ) 3D transformations We consider general 3D affine transforma3on X = ax + by + cz + d Y = ex + fy + gz + h Z = ix + jy + kz + l Proper3es analogous to 2D case Lines map to lines (plane segments map to plane segments) Parallelism preserved unit cube centered in the origin is transformed into an arbitrar parallelepiped, arbitraril posi3oned in space L4_26 3D transforma3ons 3D rota3on onven3on that we will adopt: Right- hand side sstem 3D rota3on of a rigid object is described b three parameters, such as three angles of Euler In Euler angle formula3on an arbitrar rota3on is represented as a composi3on of three elemental rota3ons, each around a gle coordinate ais L4_27 L4_28 3D rota3on The rota3ons around, and ais are also known as Roll, Pitch and Yaw ( heading ); terms coming from flight dnamics Pitch Yaw 3D transforma3ons Three elementar transforms Elementar transla3on Three elementar rota3ons round the X- ais, Y- ais and Z- ais Elementar scaling In X-, Y-, en Z- direc3on Roll Ver3cal Lateral Longitudinal L4_29 Matri representa3on 4 4 matrices for 3- D, analogous to 3 3 matrices for 2- D ug homogeneous coordinates W W ; W W usual notation W = : Each point in 3D space à a line throught the origin in 4D space L4_3

6 3D Transla3on and Scaling Transla3on L4_3 T (T X, T Y, T Z ) = T T T X = X + T X Y = Y + T Y Z = Z + T Z Elementar scaling S (S X, S Y, S Z ) = S S S Y Y X X = S X X Y = S Y Y Z = S Z Z 3D Rotation Rota3on around - ais L4_32 θ θ θ θ R X (θ ) = R Y (ϕ) = R Z (ψ) = ϕ ϕ ϕ ϕ ψ ψ ψ ψ X = X Y = Y (θ) - Z (θ) Z = Y (θ) + Z (θ Similarl for rota3ons around other two aes: 3D Shear Shear around the Z- ais X = X + H X Z Y = Y + H Y Z Z = Z an be represented in matri form as L4_33 = H H Shear around the X- ais and Y- ais have a similar form 3D Transforma3ons: proper3es Inverse transforms are defined as T - (T X, T Y, T Z ) = T (-T X, -T Y, -T Z ) S - (S X, S Y, S Z ) = S (/S X, /S Y, /S Z ) R X - (θ) = R X (-θ); R Y - (φ) = R Y (-φ); R Z - (ψ) = R X (-ψ) The same absorp3on and pseudo- commuta3on are valid like in the 2D case Transla3on pseudo- commutes with scaling and with three rota3ons Scaling and rota3ons do not pseudo- commute ddi3onal proper3es, specific for 3D (without proof) Two (different) rota3ons do not pseudo- commute (not even with an addi3onal transla3on) Three (different) rota3ons and a transla3on do pseudo commute L4_34 3D Transforma3ons: proper3es general posi3oning transforma3on involves 6 parameters T (T X, T Y, T Z ) R X (θ) R Y (φ) R Z (ψ) Object deforma3on: 6 other parameters (scaling + rota3on) general affine transforma3on involves thus 2 parameters R X (θ) R Y (φ) R Z (ψ) S (S X,S Y,S Z ) R X (θ ) R Y (φ ) R Z (ψ ) T (T X,T Y,T Z ) There are man equivalent forms L4_35. rbitrar displacement in 3D B Ini3al posi3on B Desired posi3on () B B (2) (4) B (3) B L4_36 See eercises

7 omposi3ons of 3D transforma3ons Rota3on about arbitrar point: in this eample about - ais Quaternions and 3D rotation From the book of Edward ngel: Interactive omputer Graphics Top-Down pproach Ug OpenGL L4_37 omple numbers and rota3on Polar representa3on of a comple number iθ 2 2 c = a + ib = re r = a + b, θ = arctan( b/ a) Denote b c the result of rota3ng c about the origin b φ: iθ iφ i( θ + φ) c = re e = re Quaternions (Sir William Rowan Hamilton, 843) are etensions of comple numbers in 3D, ielding elegant rota3ons in 3D a = ( q, q); q = qi + q2j + q3k i = j = k = ijk = L4_39 omple numbers and rota3on point in space p = (, p) Rota3on of the point p b θ about the vector v: where: θ θ r =, v, 2 2 p = rpr θ θ r =, v 2 2 Wh are quaternions interes3ng for 3D rota3ons in computer graphics? Euler angle representa3on suffers from Gimbal lock Simpler representa3on Lower computa3onal compleit, but not necessaril awer conversion to matri form L4_4 Gimbal lock Transformations in OpenGL When the aes of two of the three gimbals align, "locking" into rota3on in a degenerate 2D space. Eample: when the pitch (green) and aw (magenta) gimbals become aligned, changes to roll (blue) and aw appl the same rota3on to the airplane. L4_4

8 OpenGL func3on format func3on name dimensions Transforma3ons in OpenGL We can load matri with the func3on glloadmatri(pointer_to_matri) glverte3f(,,),, are floats belongs to GL librar glverte3fv(p) p is a pointer to an arra Or set a matri to iden3t matri with the func3on glloadidentit() Rota3on, transla3on and scaling are provided through glrotatef(angle,v,v,v) gltranslatef(d,d,d) glscalef(s,s,s) ngel: Interac3ve omputer Graphics 4E ddison- Wesle 25 L4_43 L4_44 Summar 2D transforma3ons arbitrar 2D affine transforma3on 6 parameters comple transforma3ons as composi3ons of the elementar ones 3D transforma3ons arbitrar 3D affine transforma3on 2 parameters comple transforma3ons as composi3ons of the elementar ones Euler angles Quaternions advantage over Euler angle representa3on (Gimbal lock avoided) Transforma3ons in OpenGL L4_45

Computer Graphics. P04 Transformations. Aleksandra Pizurica Ghent University

Computer Graphics. P04 Transformations. Aleksandra Pizurica Ghent University Computer Graphics P4 Transformations Aleksandra Pizurica Ghent Universit Telecommunications and Information Processing Image Processing and Interpretation Group Transformations in computer graphics Goal:

More information

Homogeneous Coordinates

Homogeneous Coordinates COMS W4172 3D Math 2 Steven Feiner Department of Computer Science Columbia Universit New York, NY 127 www.cs.columbia.edu/graphics/courses/csw4172 Februar 1, 218 1 Homogeneous Coordinates w X W Y X W Y

More information

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

CSE328 Fundamentals of Computer Graphics: Theory, Algorithms, and Applications CSE328 Fundamentals of Computer Graphics: Theor, Algorithms, and Applications Hong in State Universit of New York at Ston Brook (Ston Brook Universit) Ston Brook, New York 794-44 Tel: (63)632-845; Fa:

More information

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

Computer Graphics. 2D Transforma5ons. Review Vertex Transforma5ons 2/3/15. adjust the zoom. posi+on the camera. posi+on the model /3/5 Computer Graphics D Transforma5ons Review Verte Transforma5ons posi+on the model posi+on the camera adjust the zoom verte shader input verte shader output, transformed /3/5 From Object to World Space

More information

Modeling Transformations

Modeling Transformations Modeling Transformations Michael Kazhdan (601.457/657) HB Ch. 5 FvDFH Ch. 5 Overview Ra-Tracing so far Modeling transformations Ra Tracing Image RaTrace(Camera camera, Scene scene, int width, int heigh,

More information

Modeling Transformations

Modeling Transformations Modeling Transformations Michael Kazhdan (601.457/657) HB Ch. 5 FvDFH Ch. 5 Announcement Assignment 2 has been posted: Due: 10/24 ASAP: Download the code and make sure it compiles» On windows: just build

More information

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

Image Warping : Computational Photography Alexei Efros, CMU, Fall Some slides from Steve Seitz Image Warping http://www.jeffre-martin.com Some slides from Steve Seitz 5-463: Computational Photograph Aleei Efros, CMU, Fall 2 Image Transformations image filtering: change range of image g() T(f())

More information

1/29/13. Computer Graphics. Transformations. Simple Transformations

1/29/13. Computer Graphics. Transformations. Simple Transformations /29/3 Computer Graphics Transformations Simple Transformations /29/3 Contet 3D Coordinate Sstems Right hand (or counterclockwise) coordinate sstem Left hand coordinate sstem Not used in this class and

More information

Image Warping. Some slides from Steve Seitz

Image Warping.   Some slides from Steve Seitz Image Warping http://www.jeffre-martin.com Some slides from Steve Seitz 5-463: Computational Photograph Aleei Efros, CMU, Fall 26 Image Warping image filtering: change range of image g() T(f()) f T f image

More information

Image Warping. Some slides from Steve Seitz

Image Warping.   Some slides from Steve Seitz Image Warping http://www.jeffre-martin.com Some slides from Steve Seitz 5-463: Computational Photograph Aleei Efros, CMU, Spring 2 Image Transformations image filtering: change range of image g() = T(f())

More information

Chapter 3 : Computer Animation

Chapter 3 : Computer Animation Chapter 3 : Computer Animation Histor First animation films (Disne) 30 drawings / second animator in chief : ke frames others : secondar drawings Use the computer to interpolate? positions orientations

More information

Modeling Transformations Revisited

Modeling Transformations Revisited Modeling Transformations Revisited Basic 3D Transformations Translation Scale Shear Rotation 3D Transformations Same idea as 2D transformations o Homogeneous coordinates: (,,z,w) o 44 transformation matrices

More information

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

Uses of Transformations. 2D transformations Homogeneous coordinates. Transformations. Transformations. Transformations. Transformations and matrices Uses of Transformations 2D transformations Homogeneous coordinates odeling: position and resie parts of a comple model; Viewing: define and position the virtual camera Animation: define how objects move/change

More information

Image Warping (Szeliski Sec 2.1.2)

Image Warping (Szeliski Sec 2.1.2) Image Warping (Szeliski Sec 2..2) http://www.jeffre-martin.com CS94: Image Manipulation & Computational Photograph Aleei Efros, UC Berkele, Fall 7 Some slides from Steve Seitz Image Transformations image

More information

Modeling Transformations

Modeling Transformations Transformations Transformations Specif transformations for objects o Allos definitions of objects in on coordinate sstems o Allos use of object definition multiple times in a scene Adam Finkelstein Princeton

More information

Modeling Transformations

Modeling Transformations Modeling Transformations Thomas Funkhouser Princeton Universit CS 426, Fall 2 Modeling Transformations Specif transformations for objects Allos definitions of objects in on coordinate sstems Allos use

More information

GLOBAL EDITION. Interactive Computer Graphics. A Top-Down Approach with WebGL SEVENTH EDITION. Edward Angel Dave Shreiner

GLOBAL EDITION. Interactive Computer Graphics. A Top-Down Approach with WebGL SEVENTH EDITION. Edward Angel Dave Shreiner GLOBAL EDITION Interactive Computer Graphics A Top-Down Approach with WebGL SEVENTH EDITION Edward Angel Dave Shreiner This page is intentionall left blank. 4.10 Concatenation of Transformations 219 in

More information

Image Warping CSE399b, Spring 07 Computer Vision

Image Warping CSE399b, Spring 07 Computer Vision Image Warping CSE399b, Spring 7 Computer Vision http://maps.a9.com http://www.cs.ubc.ca/~mbrown/autostitch/autostitch.html http://www.cs.ubc.ca/~mbrown/autostitch/autostitch.html Autostiching on A9.com

More information

What and Why Transformations?

What and Why Transformations? 2D transformations What and Wh Transformations? What? : The geometrical changes of an object from a current state to modified state. Changing an object s position (translation), orientation (rotation)

More information

Scene Graphs & Modeling Transformations COS 426

Scene Graphs & Modeling Transformations COS 426 Scene Graphs & Modeling Transformations COS 426 3D Object Representations Points Range image Point cloud Surfaces Polgonal mesh Subdivision Parametric Implicit Solids Voels BSP tree CSG Sweep High-level

More information

(x, y) (ρ, θ) ρ θ. Polar Coordinates. Cartesian Coordinates

(x, y) (ρ, θ) ρ θ. Polar Coordinates. Cartesian Coordinates Coordinate Sstems Point Representation in two dimensions Cartesian Coordinates: (; ) Polar Coordinates: (; ) (, ) ρ θ (ρ, θ) Cartesian Coordinates Polar Coordinates p = CPS1, 9: Computer Graphics D Geometric

More information

Transformations II. Week 2, Wed Jan 17

Transformations II. Week 2, Wed Jan 17 Universit of British Columbia CPSC 34 Computer Graphics Jan-Apr 27 Tamara Munzner Transformations II Week 2, Wed Jan 7 http://www.ugrad.cs.ubc.ca/~cs34/vjan27 Readings for Jan 5-22 FCG Chap 6 Transformation

More information

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

1. We ll look at: Types of geometrical transformation. Vector and matrix representations Tob Howard COMP272 Computer Graphics and Image Processing 3: Transformations Tob.Howard@manchester.ac.uk Introduction We ll look at: Tpes of geometrical transformation Vector and matri representations

More information

Computer Graphics. Geometric Transformations

Computer Graphics. Geometric Transformations Contents coordinate sstems scalar values, points, vectors, matrices right-handed and left-handed coordinate sstems mathematical foundations transformations mathematical descriptions of geometric changes,

More information

Transformations III. Week 2, Fri Jan 19

Transformations III. Week 2, Fri Jan 19 Universit of British Columbia CPSC 34 Computer Graphics Jan-Apr 2007 Tamara Munzner Transformations III Week 2, Fri Jan 9 http://www.ugrad.cs.ubc.ca/~cs34/vjan2007 Readings for Jan 5-22 FCG Chap 6 Transformation

More information

Computer Graphics. Geometric Transformations

Computer Graphics. Geometric Transformations Computer Graphics Geometric Transformations Contents coordinate sstems scalar values, points, vectors, matrices right-handed and left-handed coordinate sstems mathematical foundations transformations mathematical

More information

Modeling Transformations

Modeling Transformations שיעור 3 גרפיקה ממוחשבת תשס"ח ב ליאור שפירא Modeling Transformations Heavil based on: Thomas Funkhouser Princeton Universit CS 426, Fall 2 Modeling Transformations Specif transformations for objects Allows

More information

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

Image Warping. Many slides from Alyosha Efros + Steve Seitz. Photo by Sean Carroll Image Warping Man slides from Alosha Efros + Steve Seitz Photo b Sean Carroll Morphing Blend from one object to other with a series of local transformations Image Transformations image filtering: change

More information

How is project #1 going?

How is project #1 going? How is project # going? Last Lecture Edge Detection Filtering Pramid Toda Motion Deblur Image Transformation Removing Camera Shake from a Single Photograph Rob Fergus, Barun Singh, Aaron Hertzmann, Sam

More information

CMSC 425: Lecture 6 Affine Transformations and Rotations

CMSC 425: Lecture 6 Affine Transformations and Rotations CMSC 45: Lecture 6 Affine Transformations and Rotations Affine Transformations: So far we have been stepping through the basic elements of geometric programming. We have discussed points, vectors, and

More information

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

Name: [20 points] Consider the following OpenGL commands: Name: 2 1. [20 points] Consider the following OpenGL commands: glmatrimode(gl MODELVIEW); glloadidentit(); glrotatef( 90.0, 0.0, 1.0, 0.0 ); gltranslatef( 2.0, 0.0, 0.0 ); glscalef( 2.0, 1.0, 1.0 ); What

More information

CS770/870 Spring 2017 Transformations

CS770/870 Spring 2017 Transformations CS770/870 Spring 2017 Transformations Coordinate sstems 2D Transformations Homogeneous coordinates Matrices, vectors, points Coordinate Sstems Coordinate sstems used in graphics Screen coordinates: the

More information

4. Two Dimensional Transformations

4. Two Dimensional Transformations 4. Two Dimensional Transformations CS362 Introduction to Computer Graphics Helena Wong, 2 In man applications, changes in orientations, sizes, and shapes are accomplished with geometric transformations

More information

High Dimensional Rendering in OpenGL

High Dimensional Rendering in OpenGL High Dimensional Rendering in OpenGL Josh McCo December, 2003 Description of Project Adding high dimensional rendering capabilit to the OpenGL graphics programming environment is the goal of this project

More information

Rotation and Orientation: Fundamentals. Perelyaev Sergei VARNA, 2011

Rotation and Orientation: Fundamentals. Perelyaev Sergei VARNA, 2011 Rotation and Orientation: Fundamentals Perelyaev Sergei VARNA, 0 What is Rotation? Not intuitive Formal definitions are also confusing Many different ways to describe Rotation (direction cosine) matri

More information

Two Dimensional Viewing

Two Dimensional Viewing Two Dimensional Viewing Dr. S.M. Malaek Assistant: M. Younesi Two Dimensional Viewing Basic Interactive Programming Basic Interactive Programming User controls contents, structure, and appearance of objects

More information

3-Dimensional Viewing

3-Dimensional Viewing CHAPTER 6 3-Dimensional Vieing Vieing and projection Objects in orld coordinates are projected on to the vie plane, hich is defined perpendicular to the vieing direction along the v -ais. The to main tpes

More information

Editing and Transformation

Editing and Transformation Lecture 5 Editing and Transformation Modeling Model can be produced b the combination of entities that have been edited. D: circle, arc, line, ellipse 3D: primitive bodies, etrusion and revolved of a profile

More information

Last Lecture. Edge Detection. Filtering Pyramid

Last Lecture. Edge Detection. Filtering Pyramid Last Lecture Edge Detection Filtering Pramid Toda Motion Deblur Image Transformation Removing Camera Shake from a Single Photograph Rob Fergus, Barun Singh, Aaron Hertzmann, Sam T. Roweis and William T.

More information

Geometric Transformations

Geometric Transformations CS INTRODUCTION TO COMPUTER GRAPHICS Geometric Transformations D and D Andries an Dam 9/9/7 /46 CS INTRODUCTION TO COMPUTER GRAPHICS How do we use Geometric Transformations? (/) Objects in a scene at the

More information

Computer Graphics Geometric Transformations

Computer Graphics Geometric Transformations Computer Graphics 2016 6. Geometric Transformations Hongxin Zhang State Key Lab of CAD&CG, Zhejiang University 2016-10-31 Contents Transformations Homogeneous Co-ordinates Matrix Representations of Transformations

More information

Transformations II. Arbitrary 3D Rotation. What is its inverse? What is its transpose? Can we constructively elucidate this relationship?

Transformations II. Arbitrary 3D Rotation. What is its inverse? What is its transpose? Can we constructively elucidate this relationship? Utah School of Computing Fall 25 Transformations II CS46 Computer Graphics From Rich Riesenfeld Fall 25 Arbitrar 3D Rotation What is its inverse? What is its transpose? Can we constructivel elucidate this

More information

CAP5415-Computer Vision Lecture 8-Mo8on Models, Feature Tracking, and Alignment. Ulas Bagci

CAP5415-Computer Vision Lecture 8-Mo8on Models, Feature Tracking, and Alignment. Ulas Bagci CAP545-Computer Vision Lecture 8-Mo8on Models, Feature Tracking, and Alignment Ulas Bagci bagci@ucf.edu Readings Szeliski, R. Ch. 7 Bergen et al. ECCV 92, pp. 237-252. Shi, J. and Tomasi, C. CVPR 94, pp.593-6.

More information

MEM380 Applied Autonomous Robots Winter Robot Kinematics

MEM380 Applied Autonomous Robots Winter Robot Kinematics MEM38 Applied Autonomous obots Winter obot Kinematics Coordinate Transformations Motivation Ultimatel, we are interested in the motion of the robot with respect to a global or inertial navigation frame

More information

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

Determining the 2d transformation that brings one image into alignment (registers it) with another. And Last two lectures: Representing an image as a weighted combination of other images. Toda: A different kind of coordinate sstem change. Solving the biggest problem in using eigenfaces? Toda Recognition

More information

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

Today s class. Geometric objects and transformations. Informationsteknologi. Wednesday, November 7, 2007 Computer Graphics - Class 5 1 Toda s class Geometric objects and transformations Wednesda, November 7, 27 Computer Graphics - Class 5 Vector operations Review of vector operations needed for working in computer graphics adding two

More information

Animation. Keyframe animation. CS4620/5620: Lecture 30. Rigid motion: the simplest deformation. Controlling shape for animation

Animation. Keyframe animation. CS4620/5620: Lecture 30. Rigid motion: the simplest deformation. Controlling shape for animation Keyframe animation CS4620/5620: Lecture 30 Animation Keyframing is the technique used for pose-to-pose animation User creates key poses just enough to indicate what the motion is supposed to be Interpolate

More information

CS559: Computer Graphics

CS559: Computer Graphics CS559: Computer Graphics Lecture 8: 3D Transforms Li Zhang Spring 28 Most Slides from Stephen Chenne Finish Color space Toda 3D Transforms and Coordinate sstem Reading: Shirle ch 6 RGB and HSV Green(,,)

More information

Geometric Model of Camera

Geometric Model of Camera Geometric Model of Camera Dr. Gerhard Roth COMP 42A Winter 25 Version 2 Similar Triangles 2 Geometric Model of Camera Perspective projection P(X,Y,Z) p(,) f X Z f Y Z 3 Parallel lines aren t 4 Figure b

More information

3D Kinematics. Consists of two parts

3D Kinematics. Consists of two parts D Kinematics Consists of two parts D rotation D translation The same as D D rotation is more complicated than D rotation (restricted to z-ais) Net, we will discuss the treatment for spatial (D) rotation

More information

Transformations Week 9, Lecture 18

Transformations Week 9, Lecture 18 CS 536 Computer Graphics Transformations Week 9, Lecture 18 2D Transformations David Breen, William Regli and Maxim Peysakhov Department of Computer Science Drexel University 1 3 2D Affine Transformations

More information

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

Last week. Machiraju/Zhang/Möller/Fuhrmann Last week Machiraju/Zhang/Möller/Fuhrmann 1 Geometry basics Scalar, point, and vector Vector space and affine space Basic point and vector operations Sided-ness test Lines, planes, and triangles Linear

More information

CS F-07 Objects in 2D 1

CS F-07 Objects in 2D 1 CS420-2010F-07 Objects in 2D 1 07-0: Representing Polgons We want to represent a simple polgon Triangle, rectangle, square, etc Assume for the moment our game onl uses these simple shapes No curves for

More information

CS612 - Algorithms in Bioinformatics

CS612 - Algorithms in Bioinformatics Fall 2017 Structural Manipulation November 22, 2017 Rapid Structural Analysis Methods Emergence of large structural databases which do not allow manual (visual) analysis and require efficient 3-D search

More information

2D and 3D Coordinate Systems and Transformations

2D and 3D Coordinate Systems and Transformations Graphics & Visualization Chapter 3 2D and 3D Coordinate Systems and Transformations Graphics & Visualization: Principles & Algorithms Introduction In computer graphics is often necessary to change: the

More information

CS Computer Graphics: Transformations & The Synthetic Camera

CS Computer Graphics: Transformations & The Synthetic Camera CS 543 - Computer Graphics: Transformations The Snthetic Camera b Robert W. Lindeman gogo@wpi.edu (with help from Emmanuel Agu ;-) Introduction to Transformations A transformation changes an objects Size

More information

Warping, Morphing and Mosaics

Warping, Morphing and Mosaics Computational Photograph and Video: Warping, Morphing and Mosaics Prof. Marc Pollefes Dr. Gabriel Brostow Toda s schedule Last week s recap Warping Morphing Mosaics Toda s schedule Last week s recap Warping

More information

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

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 Image warping Image warping image filtering: change range of image g() () = h(f()) h(f()) f h g h()=0.5+0.5 image warping: change domain of image g() = f(h()) f h g h([,])=[,/2] Parametric (global) warping

More information

Image Metamorphosis By Affine Transformations

Image Metamorphosis By Affine Transformations Image Metamorphosis B Affine Transformations Tim Mers and Peter Spiegel December 16, 2005 Abstract Among the man was to manipulate an image is a technique known as morphing. Image morphing is a special

More information

3D Transformations. CS 4620 Lecture Kavita Bala w/ prior instructor Steve Marschner. Cornell CS4620 Fall 2015 Lecture 11

3D Transformations. CS 4620 Lecture Kavita Bala w/ prior instructor Steve Marschner. Cornell CS4620 Fall 2015 Lecture 11 3D Transformations CS 4620 Lecture 11 1 Announcements A2 due tomorrow Demos on Monday Please sign up for a slot Post on piazza 2 Translation 3 Scaling 4 Rotation about z axis 5 Rotation about x axis 6

More information

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

3D Viewing and Projec5on. Taking Pictures with a Real Camera. Steps: Graphics does the same thing for rendering an image for 3D geometric objects 3D Vieing and Projec5on Taking Pictures ith a Real Camera Steps: Iden5 interes5ng objects Rotate and translate the camera to desired viepoint Adjust camera seings such as ocal length Choose desired resolu5on

More information

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

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

More information

Transforms. COMP 575/770 Spring 2013

Transforms. COMP 575/770 Spring 2013 Transforms COMP 575/770 Spring 2013 Transforming Geometry Given any set of points S Could be a 2D shape, a 3D object A transform is a function T that modifies all points in S: T S S T v v S Different transforms

More information

5.8.3 Oblique Projections

5.8.3 Oblique Projections 278 Chapter 5 Viewing y (, y, ) ( p, y p, p ) Figure 537 Oblique projection P = 2 left right 0 0 left+right left right 0 2 top bottom 0 top+bottom top bottom far+near far near 0 0 far near 2 0 0 0 1 Because

More information

Reading. Topics in Articulated Animation. Character Representation. Animation. q i. t 1 t 2. Articulated models: Character Models are rich, complex

Reading. Topics in Articulated Animation. Character Representation. Animation. q i. t 1 t 2. Articulated models: Character Models are rich, complex Shoemake, Quaternions Tutorial Reading Topics in Articulated Animation 2 Articulated models: rigid parts connected by joints Animation They can be animated by specifying the joint angles (or other display

More information

CMSC 425: Lecture 10 Basics of Skeletal Animation and Kinematics

CMSC 425: Lecture 10 Basics of Skeletal Animation and Kinematics : Lecture Basics of Skeletal Animation and Kinematics Reading: Chapt of Gregor, Game Engine Architecture. The material on kinematics is a simplification of similar concepts developed in the field of robotics,

More information

CS354 Computer Graphics Rotations and Quaternions

CS354 Computer Graphics Rotations and Quaternions Slide Credit: Don Fussell CS354 Computer Graphics Rotations and Quaternions Qixing Huang April 4th 2018 Orientation Position and Orientation The position of an object can be represented as a translation

More information

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

CS 2770: Intro to Computer Vision. Multiple Views. Prof. Adriana Kovashka University of Pittsburgh March 14, 2017 CS 277: Intro to Computer Vision Multiple Views Prof. Adriana Kovashka Universit of Pittsburgh March 4, 27 Plan for toda Affine and projective image transformations Homographies and image mosaics Stereo

More information

CS4670: Computer Vision

CS4670: Computer Vision CS467: Computer Vision Noah Snavely Lecture 8: Geometric transformations Szeliski: Chapter 3.6 Reading Announcements Project 2 out today, due Oct. 4 (demo at end of class today) Image alignment Why don

More information

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

Transformations. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico Transformations Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico Angel: Interactive Computer Graphics 4E Addison-Wesley 25 1 Objectives

More information

CT5510: Computer Graphics. Transformation BOCHANG MOON

CT5510: Computer Graphics. Transformation BOCHANG MOON CT5510: Computer Graphics Transformation BOCHANG MOON 2D Translation Transformations such as rotation and scale can be represented using a matrix M.., How about translation? No way to express this using

More information

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

2D Image Transforms Computer Vision (Kris Kitani) Carnegie Mellon University 2D Image Transforms 16-385 Computer Vision (Kris Kitani) Carnegie Mellon University Extract features from an image what do we do next? Feature matching (object recognition, 3D reconstruction, augmented

More information

GEOMETRIC TRANSFORMATIONS AND VIEWING

GEOMETRIC TRANSFORMATIONS AND VIEWING GEOMETRIC TRANSFORMATIONS AND VIEWING 2D and 3D 1/44 2D TRANSFORMATIONS HOMOGENIZED Transformation Scaling Rotation Translation Matrix s x s y cosθ sinθ sinθ cosθ 1 dx 1 dy These 3 transformations are

More information

Announcements. Equation of Perspective Projection. Image Formation and Cameras

Announcements. Equation of Perspective Projection. Image Formation and Cameras Announcements Image ormation and Cameras Introduction to Computer Vision CSE 52 Lecture 4 Read Trucco & Verri: pp. 22-4 Irfanview: http://www.irfanview.com/ is a good Windows utilit for manipulating images.

More information

CS 450: COMPUTER GRAPHICS 2D TRANSFORMATIONS SPRING 2016 DR. MICHAEL J. REALE

CS 450: COMPUTER GRAPHICS 2D TRANSFORMATIONS SPRING 2016 DR. MICHAEL J. REALE CS 45: COMUTER GRAHICS 2D TRANSFORMATIONS SRING 26 DR. MICHAEL J. REALE INTRODUCTION Now that we hae some linear algebra under our resectie belts, we can start ug it in grahics! So far, for each rimitie,

More information

Transformations. Examples of transformations: shear. scaling

Transformations. Examples of transformations: shear. scaling Transformations Eamples of transformations: translation rotation scaling shear Transformations More eamples: reflection with respect to the y-ais reflection with respect to the origin Transformations Linear

More information

Rotations in 3D Graphics and the Gimbal Lock

Rotations in 3D Graphics and the Gimbal Lock Rotations in 3D Graphics and the Gimbal Lock Valentin Koch Autodesk Inc. January 27, 2016 Valentin Koch (ADSK) IEEE Okanagan January 27, 2016 1 / 37 Presentation Road Map 1 Introduction 2 Rotation Matrices

More information

4.7 INVERSE TRIGONOMETRIC FUNCTIONS

4.7 INVERSE TRIGONOMETRIC FUNCTIONS Section 4.7 Inverse Trigonometric Functions 4 4.7 INVERSE TRIGONOMETRIC FUNCTIONS NASA What ou should learn Evaluate and graph the inverse sine function. Evaluate and graph the other inverse trigonometric

More information

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

Image Warping, mesh, and triangulation CSE399b, Spring 07 Computer Vision http://grail.cs.washington.edu/projects/rotoscoping/ Image Warping, mesh, and triangulation CSE399b, Spring 7 Computer Vision Man of the slides from A. Efros. Parametric (global) warping Eamples of parametric

More information

3D Viewing. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

3D Viewing. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller 3D Viewing CMPT 361 Introduction to Computer Graphics Torsten Möller Reading Chapter 4 of Angel Chapter 6 of Foley, van Dam, 2 Objectives What kind of camera we use? (pinhole) What projections make sense

More information

CS5620 Intro to Computer Graphics

CS5620 Intro to Computer Graphics CS56 and Quaternions Piar s Luo Jr. A New Dimension - Time 3 4 Principles of Traditional Specifing Anticipation Suash/Stretch Secondar Action 5 6 C. Gotsman, G. Elber,. Ben-Chen Page CS56 Keframes anual

More information

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

Today. Today. Introduction. Matrices. Matrices. Computergrafik. Transformations & matrices Introduction Matrices Computergrafik Matthias Zwicker Universität Bern Herbst 2008 Today Transformations & matrices Introduction Matrices Homogeneous Affine transformations Concatenating transformations Change of Common coordinate

More information

More on Transformations. COS 426, Spring 2019 Princeton University

More on Transformations. COS 426, Spring 2019 Princeton University More on Transformations COS 426, Spring 2019 Princeton Universit Agenda Grab-bag of topics related to transformations: General rotations! Euler angles! Rodrigues s rotation formula Maintaining camera transformations!

More information

Topic 7: Transformations. General Transformations. Affine Transformations. Introduce standard transformations

Topic 7: Transformations. General Transformations. Affine Transformations. Introduce standard transformations Tpic 7: Transfrmatins CITS33 Graphics & Animatin E. Angel and D. Shreiner: Interactive Cmputer Graphics 6E Addisn-Wesle 22 Objectives Intrduce standard transfrmatins Rtatin Translatin Scaling Shear Derive

More information

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

Image Warping. Computational Photography Derek Hoiem, University of Illinois 09/28/17. Photo by Sean Carroll Image Warping 9/28/7 Man slides from Alosha Efros + Steve Seitz Computational Photograph Derek Hoiem, Universit of Illinois Photo b Sean Carroll Reminder: Proj 2 due monda Much more difficult than project

More information

Think About. Unit 5 Lesson 3. Investigation. This Situation. Name: a Where do you think the origin of a coordinate system was placed in creating this

Think About. Unit 5 Lesson 3. Investigation. This Situation. Name: a Where do you think the origin of a coordinate system was placed in creating this Think About This Situation Unit 5 Lesson 3 Investigation 1 Name: Eamine how the sequence of images changes from frame to frame. a Where do ou think the origin of a coordinate sstem was placed in creating

More information

Graphics and Interaction Transformation geometry and homogeneous coordinates

Graphics and Interaction Transformation geometry and homogeneous coordinates 433-324 Graphics and Interaction Transformation geometry and homogeneous coordinates Department of Computer Science and Software Engineering The Lecture outline Introduction Vectors and matrices Translation

More information

Introduction to Homogeneous Transformations & Robot Kinematics

Introduction to Homogeneous Transformations & Robot Kinematics Introduction to Homogeneous Transformations & Robot Kinematics Jennifer Ka Rowan Universit Computer Science Department. Drawing Dimensional Frames in 2 Dimensions We will be working in -D coordinates,

More information

COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates

COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates Department of Computer Science and Software Engineering The Lecture outline Introduction Vectors and matrices Translation

More information

Systems of Linear Equations

Systems of Linear Equations Sstems of Linear Equations Gaussian Elimination Tpes of Solutions A linear equation is an equation that can be written in the form: a a a n n b The coefficients a i and the constant b can be real or comple

More information

Viewing and Projection

Viewing and Projection Viewing and Projection Sheelagh Carpendale Camera metaphor. choose camera position 2. set up and organie objects 3. choose a lens 4. take the picture View Volumes what gets into the scene perspective view

More information

Transformations using matrices

Transformations using matrices Transformations using matrices 6 sllabusref eferenceence Core topic: Matrices and applications In this cha 6A 6B 6C 6D 6E 6F 6G chapter Geometric transformations and matri algebra Linear transformations

More information

CALCULATING TRANSFORMATIONS OF KINEMATIC CHAINS USING HOMOGENEOUS COORDINATES

CALCULATING TRANSFORMATIONS OF KINEMATIC CHAINS USING HOMOGENEOUS COORDINATES CALCULATING TRANSFORMATIONS OF KINEMATIC CHAINS USING HOMOGENEOUS COORDINATES YINGYING REN Abstract. In this paper, the applications of homogeneous coordinates are discussed to obtain an efficient model

More information

CS770/870 Spring 2017 Transformations

CS770/870 Spring 2017 Transformations CS770/870 Spring 2017 Transformations Coordinate sstems 2D Transformations Homogeneous coordinates Matrices, vectors, points 01/29/2017 1 Coordinate Sstems Coordinate sstems used in graphics Screen coordinates:

More information

Chap 7, 2009 Spring Yeong Gil Shin

Chap 7, 2009 Spring Yeong Gil Shin Three-Dimensional i Viewingi Chap 7, 29 Spring Yeong Gil Shin Viewing i Pipeline H d fi i d? How to define a window? How to project onto the window? Rendering "Create a picture (in a snthetic camera) Specification

More information

IMAGE-BASED RENDERING AND ANIMATION

IMAGE-BASED RENDERING AND ANIMATION DH2323 DGI17 INTRODUCTION TO COMPUTER GRAPHICS AND INTERACTION IMAGE-BASED RENDERING AND ANIMATION Christopher Peters CST, KTH Royal Institute of Technology, Sweden chpeters@kth.se http://kth.academia.edu/christopheredwardpeters

More information

Geometric Transformations

Geometric Transformations Geometric Transformations CS 4620 Lecture 9 2017 Steve Marschner 1 A little quick math background Notation for sets, functions, mappings Linear and affine transformations Matrices Matrix-vector multiplication

More information

2D Object Definition (1/3)

2D Object Definition (1/3) 2D Object Definition (1/3) Lines and Polylines Lines drawn between ordered points to create more complex forms called polylines Same first and last point make closed polyline or polygon Can intersect itself

More information

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

EECE 478. Learning Objectives. Learning Objectives. Linear Algebra and 3D Geometry. Linear algebra in 3D. Coordinate systems EECE 478 Linear Algebra and 3D Geometry Learning Objectives Linear algebra in 3D Define scalars, points, vectors, lines, planes Manipulate to test geometric properties Coordinate systems Use homogeneous

More information

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

Geometric transformations in 3D and coordinate frames. Computer Graphics CSE 167 Lecture 3 Geometric transformations in 3D and coordinate frames Computer Graphics CSE 167 Lecture 3 CSE 167: Computer Graphics 3D points as vectors Geometric transformations in 3D Coordinate frames CSE 167, Winter

More information