COMPUTER GRAPHICS COURSE Transformations

Total Page:16

File Type:pdf, Size:1020Kb

COMPUTER GRAPHICS COURSE Transformations COMPUTER GRAPHICS COURSE Transformations Georgios Papaioannou – 2016 ABOUT TRANSFORMATIONS Transformations • They are operators on vectors and points of a corresponding vector or affine space • They alter the coordinates of shape vertices • They are basic building blocks of geometric design: – Help us manipulate shapes to produce new ones – Help us express relations between coordinate systems in a virtual world Affine Transformations • An affine transformation Φ on an affine space is a transformation that preserve affine combinations 푛 푛 퐩 = ෍ 푎퐩 ⟹ Φ 퐩 = ෍ 푎Φ(퐩) =0 =0 • For shapes in 피2 and 피3 this is an important property: • To transform a shape we only need to transform its defining vertices Affine Transformations on Vertices • Example: Φ Φ(퐩1) 퐩1 퐩0 Φ Φ(퐩0) • The midpoint of the transformed endpoints is the transformed midpoint – Similarly, all transformed points on the line segment can be linearly interpolated form the transformed endpoints Affine Transformations in 2D and 3D • Mappings of the form Φ 퐩 = 퐀 ∙ 퐩 + 퐭 are affine transformations in 피2 and 피3 • 2D: – 퐀 is a 2X2 matrix and 푇 – 퐭 is an offset vector in matric column form: 퐭 = 푡푥 푡푦 • 3D: – 퐀 is a 3X3 matrix and 푇 – 퐭 is an offset vector in matric column form: 퐭 = 푡푥 푡푦 푡푧 Linear Transformations • Linear transformations are affine transformations with the following properties: – Preserve additivity: Φ 퐩 + 퐪 = Φ 퐩 + Φ 퐪 – Preserve scalar multiplication: Φ 푐퐩 = cΦ 퐩 • Important: – The affine transformation Φ 퐩 = 퐀 ∙ 퐩 + 퐭 is not linear (why?) – But the transformation Φ 퐩 = 퐀 ∙ 퐩 is! 2D TRANSFORMATIONS Geometric Transformations in 2D • The 4 common transformations that are used in computer graphics are: – Translation T(p ) Ip t – Rotation R(p ) R p – Scaling S(p ) Ssx, sy p – Shearing Sh(p ) Shsx, sy p • All of the above transformations are invertible, i.e. given Φ 퐩 , there always exists the inverse transformation Φ−1 퐩 : 퐩′ = Φ 퐩 ⟺ 퐩 = Φ−1 퐩′ 2D Translation • Moves a point on the plane 퐩′ = 퐈퐩 + 퐭Ԧ = 퐩 + 퐭Ԧ Y (푝푥 + 푡푥, 푝푦 + 푡푦) 푡푦 (푝푥, 푝푦) X 푡푥 2D Scaling ′ 푠푥 0 퐩 = 퐒푠푥,푠푦퐩 퐒푠 ,푠 = 푥 푦 0 푠푦 • When 푠푥 = 푠푦, then the scaling is isotropic (preserves angles) Y Y (3, 7) (2, 5) (4, 5) (6, 3.5) (4, 2.5) (8, 2.5) (2, 2) (4, 1) (4, 2) (8, 1) X X 2D Rotation • Rotates a point around the origin by angle θ x lcos l cos cos sin sin x cos y sin y lsin l cos sin sin cos x sin y cos Y p xy , ′ 퐩 = 퐑휃퐩 l p xy, cos 휃 − sin 휃 퐑휃 = l sin 휃 cos 휃 θ φ X 2D Rotation - Examples Rotations are always relative to the coordinate system origin! 2D Shearing • Skews the shape by translating a point in one axis proportionally to its coordinate on the other axis ′ 퐩 = 퐒퐡푦,푏퐩 ′ 퐩 = 퐒퐡푥,푎퐩 1 0 1 푎 퐒퐡푦,푏 = 퐒퐡 = 푏 1 푥,푎 0 1 Y (4, 12) Y Y (2, 8) (4, 10) b=2 α=2 (2, 4) (4, 4) (10, 4) (12, 4) (2, 6) (6, 2) (2, 2) (4, 2) (8, 2) X X X Composite Transformations • Useful transformations in computer graphics and visualization rarely consist of a single basic affine transformation • Transformation composition is the stacking of operators (function composition): Φ ∘ Γ 퐩 = Φ(Γ 퐩 ) • We can efficiently compute composite linear transformations Composite Linear Transformations (1) • A useful property of linear transformations is that a composite transformation can be expressed as matrix multiplication: Φ ∘ Γ 퐩 = 횽 ∙ 횪 ∙ 퐩 • In graphics, it allows the efficient computation of multiple composite transformations Composite Linear Transformations (2) • Example: 푅45o 푆1,2 퐩 = 퐑45o퐒1,2퐩 Composite Linear Transformations (3) • Transformations are not commutative in general! 퐑45o퐒1,2퐩 ≠ 퐑45o퐒1,2퐩 Composite Linear Transformations (4) • Unfortunately, translation cannot be expressed as a linear transformation and is therefore impossible to express it as a matrix multiplication • We must convert the transformation to a linear one Homogeneous Coordinates (1) • With homogeneous coordinates, we augment the dimensionality of the space by one • So 푥, 푦 푇 coordinates become 푥, 푦, 푤 푇 • Similarly, all transformations are now expressed as 3X3 matrices – For w=1 we get the basic representation of a point: 푥, 푦, 1 푇 – All points which are multiples of each other are equivalent – Typically, we work with the basic representation of points Homogeneous Coordinates (2) • Therefore the 2D space becomes a plane (slice) embedded in 3D space at w=1 Homogeneous Coordinates (3) • Points on the homogeneous 2D plane define an affine space and not a vector space – Adding two vectors results in a vector outside the plane (remember we also add the w coordinates!) • The origin of our homogeneous coordinate system is typically (0,0,1) (or (0,0,w) in general) • Since addition is not defined in our space, how is translation expressed? Homogeneous Transformations (1) • Translation in our augmented, homogeneous space can be expressed as a linear transformation: – (it is actually a skew (shearing) transformation of x,y w.r.t. w in 3D) ′ 1 0 푡 푥 푥 푥 푤=1 ′ ′ ′ 푦 = 0 1 푡푦 푦 푥 , 푦 = 푥, 푦 + (푡푥, 푡푦) 푤 0 0 1 푤 푥, 푦 (푡푥, 푡푦) 푤 = 1 Homogeneous Transformations (2) • Now all geometric transformations can be performed by matrix multiplication alone! • We can arbitrarily combine transformations in a unified manner 푅휃1 훵퐯1 푅휃2 훵퐯2 푆푠1,푠2 … 퐩 … = 퐑휃1 횻퐯1퐑휃2 횻퐯2퐒푠1,푠2 …퐩 Homogeneous 2D Transformations • In matrix form (3X3) the homogeneous 2D transformations become: 1 0 푡푥 1 푎 0 퐒퐡 = 퐓푡푥,푡푦 = 0 1 푡푦 푥,푎 0 1 0 0 0 1 0 0 1 푠푥 0 0 1 0 0 0 푠 0 퐒푠푥,푠푦 = 푦 퐒퐡푦,푏 = 푏 1 0 0 0 1 0 0 1 cos 휃 − sin 휃 0 퐑휃 = sin 휃 cos 휃 0 0 0 1 Representing Shape Transformations • In the following, we will apply transformations to entire shapes • This is equivalent to applying the transformations on each defining vertex of the shape • Notation: 푥1 푥2 푥3 푥4 퐌1 ∙ 퐌2 ∙ 푅푒푐푡 = 퐌1 ∙ 퐌2 ∙ 퐯1 퐯2 퐯3 퐯4 = 퐌1 ∙ 퐌2 ∙ 푦1 푦2 푦3 푦4 1 1 1 1 shape shape vertices Categorizing the Transformations • Affine: preserve linear combinations • Linear: can be expressed by a concatenation of matrices, preserve parallel lines • Similitudes: preserve ratios of distances and angles • Rigid: preserve distances Inverse Transformations • The inverse of geometric transformation is the inverse matrix 퐌−1 of the original transformation 퐌 • The inverse of a concatenated transformation is the concatenation of the inverse matrices in reverse order: −1 −1 −1 −1 −1 퐌1퐌2퐌3 … 퐌푛 = 퐌푛 … 퐌3 퐌2 퐌1 • Inverse of standard transformations: −1 −1 −1 퐑 = 퐑 퐒푠 ,푠 = 퐒 1 1 퐓푡 ,푡 = 퐓−푡 ,−푡 휃 −휃 푥 푦 , 푥 푦 푥 푦 푠푥 푠푦 Shape Composition • We can use geometric transformations to create complex shapes from simple primitive ones – We use the transformations to modify instances of the original shapes and arrange them in their pose in the composite object Original primitives (object space coords) Composite object Colored object 2D Transformation Example (1) • Given the following primitives y y 1 A B 1 x 1 x 2 • Build this: y 1 1 3 1 1 0.5 x 4 2D Transformation Example (2) • First, let us try to decompose the target shape into primitives: Three shape groups: - Chassis ? - Wheels - Windshield • Observe that in 2D we can order primitives in different layers to hide parts of the geometry • Second, locate the origin of the resulting shape and compare it to the one of the primitives 2D Transformation Example (3) y • Chassis (3XB parts) C1 C2 C3 x • Looks like no scaling is required, just translations and rotations • Now observe where the pivot point should end in each one: y C1 C2 C3 B x 2D Transformation Example (4) • C1: Rotate +90 degrees • The transformation then (remember, it is a CCW is: system) C1 = 퐓(1.0,2.5)퐑휋B • Then translate by (1, 2.5) 2 2.5 Important! y y Rightmost transformations are C1 C1 applied first to the shapes B (vertices) x 1 x Here, we first rotate then translate 2D Transformation Example (5) Important! Order of transformation does matter (remember: transformations are 퐑휋퐓(1.0,2.5)B ≠ C1 relative to origin) 2 y y C1 C1 B x x 2D Transformation Example (6) • Now lets do C2: This only requires a translation y C1 C2 C3 C2 = 퐓(3.0,0.5)B B x 2D Transformation Example (7) • C3: Rotate 180 degrees, then translate y y C1 C2 C3 C1 C2 C3 B x x C3 = 퐓(2.0,1.5)퐑휋B 2D Transformation Example (8) • The windshield Wd is a single piece • Although it is not a rotated version of B, it has a slightly different scale in the X axis, giving it a more slanted slope y Wd y Wd C1 C2 C3 C1 C2 C3 B B x x Wd = 퐓(4.0,1.5)퐒1.5,1.0B 2D Transformation Example (9) Wrong! Important! Never, ever zero the scaling If you want to leave one factors! coordinate unchanged, use a This collapses the shape and the scaling factor of 1 operation is irreversible (try inverting the corresponding scaling matrix…) y y B B x x 퐒1.5,1.0B 퐒1.5,0.0B 2D Transformation Example (10) • The wheels are easy to add since they are identical and only require a uniform scaling and translation • Room for optimization: – Create a “wheel” object (by scaling once the original shape A) – Then only perform the translation: y y Wd C1 C2 C3 A x x Wheel W1 = 퐓(1.0,0.5)Wheel Wheel = 퐒0.5,0.5A W2 = 퐓(3.0,0.5)Wheel Let us Add Some Animation (1) • What if instead of the flat-colored wheels we had a more interesting shape that would look better if rotated? • What if the car could also move forward? y y x x Let us Add Some Animation (2) • Again, we need to decompose the problem and prioritize the motion: – Clearly, the wheels must be rotated around their axis – This must take place before moving them off the origin – The wheels should move in par with the rest of the car – Therefore, the translation of the car should happen after the composition of the entire vehicle y x Let us Add Some Animation (3) • To spin the wheels, we must apply a rotation to the “wheel” entity, before translation • Uniform scale and rotation can be safely interchanged • We rotate according to a user-defined angle θ(t) • So, the new Wheel is: Wheel = 퐑 퐒 A y y −휃(푡) 0.5,0.5 -θ(t) Note: Now the angle is negative, since this is a CW rotation x x Let us Add Some Animation (4) • Now to more efficiently apply the forward motion to the entire car, let’s: – First group all of its components – Then apply the translation to the “car” group Car 푀표푣푛퐶푎푟 = 퐓(푠(푡),0.0)Car y y 푠(푡) x x Let us Add Some Animation (5) • Congratulations! You have just made your first transformation hierarchy, i.e.
Recommended publications
  • EXAM QUESTIONS (Part Two)
    Created by T. Madas MATRICES EXAM QUESTIONS (Part Two) Created by T. Madas Created by T. Madas Question 1 (**) Find the eigenvalues and the corresponding eigenvectors of the following 2× 2 matrix. 7 6 A = . 6 2 2 3 λ= −2, u = α , λ=11, u = β −3 2 Question 2 (**) A transformation in three dimensional space is defined by the following 3× 3 matrix, where x is a scalar constant. 2− 2 4 C =5x − 2 2 . −1 3 x Show that C is non singular for all values of x . FP1-N , proof Created by T. Madas Created by T. Madas Question 3 (**) The 2× 2 matrix A is given below. 1 8 A = . 8− 11 a) Find the eigenvalues of A . b) Determine an eigenvector for each of the corresponding eigenvalues of A . c) Find a 2× 2 matrix P , so that λ1 0 PT AP = , 0 λ2 where λ1 and λ2 are the eigenvalues of A , with λ1< λ 2 . 1 2 1 2 5 5 λ1= −15, λ 2 = 5 , u= , v = , P = − 2 1 − 2 1 5 5 Created by T. Madas Created by T. Madas Question 4 (**) Describe fully the transformation given by the following 3× 3 matrix. 0.28− 0.96 0 0.96 0.28 0 . 0 0 1 rotation in the z axis, anticlockwise, by arcsin() 0.96 Question 5 (**) A transformation in three dimensional space is defined by the following 3× 3 matrix, where k is a scalar constant. 1− 2 k A = k 2 0 . 2 3 1 Show that the transformation defined by A can be inverted for all values of k .
    [Show full text]
  • Two-Dimensional Geometric Transformations
    Two-Dimensional Geometric Transformations 1 Basic Two-Dimensional Geometric Transformations 2 Matrix Representations and Homogeneous Coordinates 3 Inverse Transformations 4 Two-Dimensional Composite Transformations 5 Other Two-Dimensional Transformations 6 Raster Methods for Geometric Transformations 7 OpenGL Raster Transformations 8 Transformations between Two-Dimensional Coordinate Systems 9 OpenGL Functions for Two-Dimensional Geometric Transformations 10 OpenGL Geometric-Transformation o far, we have seen how we can describe a scene in Programming Examples S 11 Summary terms of graphics primitives, such as line segments and fill areas, and the attributes associated with these primitives. Also, we have explored the scan-line algorithms for displaying output primitives on a raster device. Now, we take a look at transformation operations that we can apply to objects to reposition or resize them. These operations are also used in the viewing routines that convert a world-coordinate scene description to a display for an output device. In addition, they are used in a variety of other applications, such as computer-aided design (CAD) and computer animation. An architect, for example, creates a layout by arranging the orientation and size of the component parts of a design, and a computer animator develops a video sequence by moving the “camera” position or the objects in a scene along specified paths. Operations that are applied to the geometric description of an object to change its position, orientation, or size are called geometric transformations. Sometimes geometric transformations are also referred to as modeling transformations, but some graphics packages make a From Chapter 7 of Computer Graphics with OpenGL®, Fourth Edition, Donald Hearn, M.
    [Show full text]
  • Feature Matching and Heat Flow in Centro-Affine Geometry
    Symmetry, Integrability and Geometry: Methods and Applications SIGMA 16 (2020), 093, 22 pages Feature Matching and Heat Flow in Centro-Affine Geometry Peter J. OLVER y, Changzheng QU z and Yun YANG x y School of Mathematics, University of Minnesota, Minneapolis, MN 55455, USA E-mail: [email protected] URL: http://www.math.umn.edu/~olver/ z School of Mathematics and Statistics, Ningbo University, Ningbo 315211, P.R. China E-mail: [email protected] x Department of Mathematics, Northeastern University, Shenyang, 110819, P.R. China E-mail: [email protected] Received April 02, 2020, in final form September 14, 2020; Published online September 29, 2020 https://doi.org/10.3842/SIGMA.2020.093 Abstract. In this paper, we study the differential invariants and the invariant heat flow in centro-affine geometry, proving that the latter is equivalent to the inviscid Burgers' equa- tion. Furthermore, we apply the centro-affine invariants to develop an invariant algorithm to match features of objects appearing in images. We show that the resulting algorithm com- pares favorably with the widely applied scale-invariant feature transform (SIFT), speeded up robust features (SURF), and affine-SIFT (ASIFT) methods. Key words: centro-affine geometry; equivariant moving frames; heat flow; inviscid Burgers' equation; differential invariant; edge matching 2020 Mathematics Subject Classification: 53A15; 53A55 1 Introduction The main objective in this paper is to study differential invariants and invariant curve flows { in particular the heat flow { in centro-affine geometry. In addition, we will present some basic applications to feature matching in camera images of three-dimensional objects, comparing our method with other popular algorithms.
    [Show full text]
  • Geometric Transformation Techniques for Digital I~Iages: a Survey
    GEOMETRIC TRANSFORMATION TECHNIQUES FOR DIGITAL I~IAGES: A SURVEY George Walberg Department of Computer Science Columbia University New York, NY 10027 [email protected] December 1988 Technical Report CUCS-390-88 ABSTRACT This survey presents a wide collection of algorithms for the geometric transformation of digital images. Efficient image transformation algorithms are critically important to the remote sensing, medical imaging, computer vision, and computer graphics communities. We review the growth of this field and compare all the described algorithms. Since this subject is interdisci­ plinary, emphasis is placed on the unification of the terminology, motivation, and contributions of each technique to yield a single coherent framework. This paper attempts to serve a dual role as a survey and a tutorial. It is comprehensive in scope and detailed in style. The primary focus centers on the three components that comprise all geometric transformations: spatial transformations, resampling, and antialiasing. In addition, considerable attention is directed to the dramatic progress made in the development of separable algorithms. The text is supplemented with numerous examples and an extensive bibliography. This work was supponed in part by NSF grant CDR-84-21402. 6.5.1 Pyramids 68 6.5.2 Summed-Area Tables 70 6.6 FREQUENCY CLAMPING 71 6.7 ANTIALIASED LINES AND TEXT 71 6.8 DISCUSSION 72 SECTION 7 SEPARABLE GEOMETRIC TRANSFORMATION ALGORITHMS 7.1 INTRODUCTION 73 7.1.1 Forward Mapping 73 7.1.2 Inverse Mapping 73 7.1.3 Separable Mapping 74 7.2 2-PASS TRANSFORMS 75 7.2.1 Catmull and Smith, 1980 75 7.2.1.1 First Pass 75 7.2.1.2 Second Pass 75 7.2.1.3 2-Pass Algorithm 77 7.2.1.4 An Example: Rotation 77 7.2.1.5 Bottleneck Problem 78 7.2.1.6 Foldover Problem 79 7.2.2 Fraser, Schowengerdt, and Briggs, 1985 80 7.2.3 Fant, 1986 81 7.2.4 Smith, 1987 82 7.3 ROTATION 83 7.3.1 Braccini and Marino, 1980 83 7.3.2 Weiman, 1980 84 7.3.3 Paeth, 1986/ Tanaka.
    [Show full text]
  • Transformation Groups in Non-Riemannian Geometry Charles Frances
    Transformation groups in non-Riemannian geometry Charles Frances To cite this version: Charles Frances. Transformation groups in non-Riemannian geometry. Sophus Lie and Felix Klein: The Erlangen Program and Its Impact in Mathematics and Physics, European Mathematical Society Publishing House, pp.191-216, 2015, 10.4171/148-1/7. hal-03195050 HAL Id: hal-03195050 https://hal.archives-ouvertes.fr/hal-03195050 Submitted on 10 Apr 2021 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Transformation groups in non-Riemannian geometry Charles Frances Laboratoire de Math´ematiques,Universit´eParis-Sud 91405 ORSAY Cedex, France email: [email protected] 2000 Mathematics Subject Classification: 22F50, 53C05, 53C10, 53C50. Keywords: Transformation groups, rigid geometric structures, Cartan geometries. Contents 1 Introduction . 2 2 Rigid geometric structures . 5 2.1 Cartan geometries . 5 2.1.1 Classical examples of Cartan geometries . 7 2.1.2 Rigidity of Cartan geometries . 8 2.2 G-structures . 9 3 The conformal group of a Riemannian manifold . 12 3.1 The theorem of Obata and Ferrand . 12 3.2 Ideas of the proof of the Ferrand-Obata theorem . 13 3.3 Generalizations to rank one parabolic geometries .
    [Show full text]
  • Geometric Transformation of Finite Element Methods: Theory and Applications
    GEOMETRIC TRANSFORMATION OF FINITE ELEMENT METHODS: THEORY AND APPLICATIONS MICHAEL HOLST AND MARTIN LICHT Abstract. We present a new technique to apply finite element methods to partial differential equations over curved domains. A change of variables along a coordinate transformation satisfying only low regularity assumptions can translate a Poisson problem over a curved physical domain to a Poisson prob- lem over a polyhedral parametric domain. This greatly simplifies both the geo- metric setting and the practical implementation, at the cost of having globally rough non-trivial coefficients and data in the parametric Poisson problem. Our main result is that a recently developed broken Bramble-Hilbert lemma is key in harnessing regularity in the physical problem to prove higher-order finite el- ement convergence rates for the parametric problem. Numerical experiments are given which confirm the predictions of our theory. 1. Introduction The computational theory of partial differential equations has been in a paradoxi- cal situation from its very inception: partial differential equations over domains with curved boundaries are of theoretical and practical interest, but numerical methods are generally conceived only for polyhedral domains. Overcoming this geomet- ric gap continues to inspire much ongoing research in computational mathematics for treating partial differential equations with geometric features. Computational methods for partial differential equations over curved domains commonly adhere to the philosophy of approximating the physical domain of the partial differential equation by a parametric domain. We mention isoparametric finite element meth- ods [2], surface finite element methods [10, 8, 3], or isogeometric analysis [14] as examples, which describe the parametric domain by a polyhedral mesh whose cells are piecewise distorted to approximate the physical domain closely or exactly.
    [Show full text]
  • MATH 9 HOMEWORK ASSIGNMENT GIVEN on FEBRUARY 3, 2019. CIRCLE INVERSION Circle Inversion Circle Inversion (Or Simply Inversion) I
    MATH 9 HOMEWORK ASSIGNMENT GIVEN ON FEBRUARY 3, 2019. CIRCLE INVERSION Circle inversion Circle inversion (or simply inversion) is a geometric transformation of the plane. One can think of the inversion as of reflection with respect to a circle which is analogous to a reflection with respect to a straight line. See wikipedia article on Inversive geometry. Definition of inversion Definition. Given a circle S with the center at point O and having a radius R consider the transformation of the plane taking each point P to a point P 0 such that (i) the image P 0 belongs to a ray OP (ii) the distance jOP 0j satisfies jOP j · jOP 0j = R2. Remark. Strictly speaking the inversion is the transformation not of the whole plane but a plane without point O. The point O does not have an image. It is convenient to think of an “infinitely remote" point O0 added to a euclidian plane so that O and O0 are mapped to each other by the inversion. Basic properties of inversion We formulated and proved some basic properties of the inversion. The most important properties are that the inversion • maps circles and straight lines onto circles and straight lines • preserves angles These properties are stated as homework problems below. Try to prove them indepen- dently. In the following we denote the center of inversion as O, the circle of inversion as S and we use prime to denote the images of various objects under inversion. Classwork Problems The properties presented in problems 1-3 are almost obvious.
    [Show full text]
  • Geometric Transformations
    Chapter 4 Geometric transformations • geometric transformations deal with “moving pixels around” !Fig. 4.1 Fig. 4.1: Some examples for geometric transformations: Rotations, mirroring, distortion, map projection. – shift – rotation – scaling – other distortions • Note: pixels of a digital image must be in a regular (Cartesian, equidistant) grid – i.e., pixel coordinates must be integer 22 Chapter 4. Geometric transformations • BUT: transformation might cause pixels to end up in a different grid – non-integer pixel coordinates !Fig. 4.2 Fig. 4.2: Pixels of rotated image (red) are between the positions of the original pixels (blue) – in other words, they have non-integer pixel coordinates. ) interpolation needed to get new pixels in a new regular grid with integer coordinates ) Geometric transformation of digital images = two separate operations: 1. spatial transformation: rotation, shift, scaling etc. 2. grey-level interpolation: f (x;y) : input image (original image) g(x;y) : output image (resulting image after transformation) x,y: integers (pixel coordinates) g(x;y) = f (x0;y0) = f (a(x;y);b(x;y)) (4.1) i.e., x0 = a(x;y) (4.2) y0 = b(x;y) (4.3) 4.1 Grey level interpolation “Grey level” = pixel value There are two ways to solve the interpolation problem: 1. forward-mapping approach (pixel carry-over): V0.9.93, April 19, 2017 page 23 Melsheimer/Spreen Digital Image Processing Summer 2017 • if a pixel from input image f maps to non-integer coordinates (between four integer pixel positions): divide its grey-level among these four pixels !Fig. 4.3 Fig. 4.3: Pixel carry-over (from Castleman, 1996, Fig.
    [Show full text]
  • Article Which He Wrote for the five-Volume Entsik- Lopedia Elementarnoy Matematiki
    A CURIOUS GEOMETRIC TRANSFORMATION NIKOLAI IVANOV BELUHOV Abstract. An expansion is a little-known geometric transformation which maps directed circles to directed circles. We explore the applications of ex- pansion to the solution of various problems in geometry by elementary means. In his book Geometricheskie Preobrazovaniya, Isaac Moiseevich Yaglom de- scribes one curious geometric transformation called expansion 1. A few years after coming across this transformation, the author of the present paper was rather surprised to discover that it leads to quite appealing geometrical solutions of a number of problems otherwise very difficult to treat by elementary means. Most of these originated in Japanese sangaku – wooden votive tablets which Japanese mathematicians of the Edo period painted with the beautiful and extraordinary theorems they discovered and then hung in Buddhist temples and Shinto shrines. Researching the available literature prior to compiling this paper brought an- other surprise: that expansion was not mentioned in almost any other books on geometry. Only two references were uncovered – one more book by I. M. Ya- glom [7] and an encyclopedia article which he wrote for the five-volume Entsik- lopedia Elementarnoy Matematiki. Therefore, we begin our presentation with an informal introduction to expan- sion and the geometry of cycles and rays. 1. Introduction We call an oriented circle a cycle. Whenever a circle k of radius R is oriented positively (i.e., counterclockwise), we label the resulting cycle k+ and say that it is of radius R. Whenever k is oriented negatively (i.e., clockwise), we label the resulting cycle k− and say that it is of radius R.
    [Show full text]
  • Lecture 5 Geometric Transformations and Image Registration
    Lecture 5 Geometric Transformations and Image Registration Lin ZHANG, PhD School of Software Engineering Tongji University Spring 2014 Lin ZHANG, SSE, 2014 Contents • Transforming points •Hierarchy of geometric transformations • Applying geometric transformations to images •Image registration Lin ZHANG, SSE, 2014 Transforming Points •Geometric transformations modify the spatial relationship between pixels in an image •The images can be shifted, rotated, or stretched in a variety of ways •Geometric transformations can be used to •create thumbnail views • change digital video resolution • correct distortions caused by viewing geometry • align multiple images of the same scene Lin ZHANG, SSE, 2014 Transforming Points Suppose (w, z) and (x, y) are two spatial coordinate systems input space output space A geometric transformation T that maps the input space to output space (,x yTwz ) ( ,) T is called a forward transformation or forward mapping (,)wz T1 (,) xy T-1 is called a inverse transformation or inverse mapping Lin ZHANG, SSE, 2014 Transforming Points z (,x yTwz ) ( ,) y (,)wz T1 (,) xy w x Lin ZHANG, SSE, 2014 Transforming Points An example (,xy ) T ( wz ,) ( w /2,/2) z (,)wz T1 (,) xy (2,2) x y Lin ZHANG, SSE, 2014 Contents • Transforming points •Hierarchy of geometric transformations • Applying geometric transformations to images •Image Registration Lin ZHANG, SSE, 2014 Hierarchy of Geometric Transformations • Class I: Isometry transformation If only rotation and translation are considered xx' cos sin t 1 ' y sin cos yt2 In homogeneous
    [Show full text]
  • 17.Matrices and Matrix Transformations (SC)
    17. MATRICES AND MATRIX TRANSFORMATIONS MATRICES ⎛ 2 1 3 0 ⎞ A matrix is a rectangular array of numbers (or M = ⎜ 5 7 −6 8 ⎟ 3 × 4 symbols) enclosed in brackets either curved or ⎜ ⎟ ⎜ 9 −2 6 −3 ⎟ square. The constituents of a matrix are called entries ⎝ ⎠ or elements. A matrix is usually named by a letter for ⎛ 4 5 7 ⎞ convenience. Some examples are shown below. ⎜ −2 3 6 ⎟ N = ⎜ ⎟ 4 × 3 ⎜ −7 1 0 ⎟ æö314 ⎝⎜ 9 −5 8 ⎠⎟ X = ç÷ èø270- Note that the orders 3 × 4 and 4 × 3 are NOT the æö31426- same. A = ç÷ èø00105- Row matrices ⎡ a b ⎤ F = ⎢ ⎥ ⎣ c d ⎦ If a matrix is composed only of one row, then it is called a row matrix (regardless of its number of ⎡ 4 1 2 ⎤ elements). The matrices �, � and � are row matrices, ⎢ ⎥ Y = ⎢ 3 −1 5 ⎥ ⎢ 6 −2 10 ⎥ J = ()413 L =(30- 42) ⎣ ⎦ K = 21 ⎛ 1 0 ⎞ () I = ⎝⎜ 0 1 ⎠⎟ Column matrices Rows and Columns If a matrix is composed of only one column, then it is called a column matrix (regardless of the number of The elements of a matrix are arranged in rows and elements). The matrices �, � and � are column columns. Elements that are written from left to right matrices. (horizontally) are called rows. Elements that are written from top to bottom (vertically) are called ⎛ ⎞ columns. The first row is called ‘row 1’, the second ⎛ ⎞ 6 4 ⎜ ⎟ ‘row 2’, and so on. The first column is called ⎛ 1 ⎞ ⎜ ⎟ 7 P = ⎜ ⎟ Q = 0 R=⎜ ⎟ ‘column 1, the second ‘column 2’, and so on.
    [Show full text]
  • Activity 1 Isometries of the Plane We Will Investigate Transformations Of
    Making Mathematical Connections Activity 1 6/3/2002 Activity 1 Isometries of the Plane We will investigate transformations of the plane that preserve distance. These transformations will take the entire plane onto a "copy" of itself. For this activity you will need to draw a scalene triangle on a two transparencies so that you have two "identical" triangles. Here's a definition. Definition: A one-to-one, onto function f from the plane to the plane is called an isometry of the plane if, for any two points P and Q, the segment PQ is congruent to the segment fPfQ()(). 1. Give an explanation of the meaning of congruent as used above. Try to be precise. 2. Using your transparencies, experiment to find ways to move a triangle from one location to another. How many types of isometries of the plane can you identify? Is there one that is a combination of two others? What properties of your triangles are preserved by the isometries? 3. Consider an isometry of the plane as a function from the plane to itself. Craft a careful definition for each type of isometry of the plane. 4. Is there a type of transformation of the plane that is not an isometry but preserves some of the same properties preserved by isometries? Making Mathematical Connections Activity 1 6/3/2002 Teacher's Notes for Activity 1 • Allot a 50-minute class period for this activity. • Students should work in groups of three or four. • The idea of congruent triangles on transparency sheets is to give the students the image of a transformation taking the entire plane to itself.
    [Show full text]