Image warping introduction

Similar documents
Ray scene intersections

Computer Graphics. Texture Filtering & Sampling Theory. Hendrik Lensch. Computer Graphics WS07/08 Texturing

Hierarchical Models Josef Pelikán & Alexander Wilkie CGG MFF UK Praha

Image preprocessing in spatial domain

Motivation. The main goal of Computer Graphics is to generate 2D images. 2D images are continuous 2D functions (or signals)

Image preprocessing in spatial domain

Broad field that includes low-level operations as well as complex high-level algorithms

Distributed Ray Tracing

f(x,y) is the original image H is the degradation process (or function) n(x,y) represents noise g(x,y) is the obtained degraded image p q

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

Blacksburg, VA July 24 th 30 th, 2010 Georeferencing images and scanned maps Page 1. Georeference

Anti-aliasing and sampling

Filling Continuous Areas

Computer Graphics. Instructor: Oren Kapah. Office Hours: T.B.A.

The main goal of Computer Graphics is to generate 2D images 2D images are continuous 2D functions (or signals)

3D Geometry and Camera Calibration

Specifying Complex Scenes

Image Warping and Morphing

Reading. 18. Projections and Z-buffers. Required: Watt, Section , 6.3, 6.6 (esp. intro and subsections 1, 4, and 8 10), Further reading:

CS4670: Computer Vision

Image Processing: 3D Image Warping. Spatial Transformations. Spatial Transformations. Affine Transformations. Affine Transformations CS334

Image Warping and Morphing

Sampling, Aliasing, & Mipmaps

Image and Multidimensional Signal Processing

CS 428: Fall Introduction to. Texture mapping and filtering. Andrew Nealen, Rutgers, /18/2010 1

Introduction to Computer Vision. Week 3, Fall 2010 Instructor: Prof. Ko Nishino

DIGITAL IMAGE WARPING. abstract of Digital Image Warping. George Wolberg, IEEE Computer Society Press

Introduction to Computer Graphics

Announcements. Mosaics. Image Mosaics. How to do it? Basic Procedure Take a sequence of images from the same position =

Texture Mapping. Texture (images) lecture 16. Texture mapping Aliasing (and anti-aliasing) Adding texture improves realism.

lecture 16 Texture mapping Aliasing (and anti-aliasing)

Specification and Computation of Warping and Morphing Transformations. Bruno Costa da Silva Microsoft Corp.

Jingyi Yu CISC 849. Department of Computer and Information Science

Sampling, Aliasing, & Mipmaps

CS 112 The Rendering Pipeline. Slide 1

Single-view 3D Reconstruction

Sampling, Aliasing, & Mipmaps

Vector Algebra Transformations. Lecture 4

Image Warping and Morphing. Alexey Tikhonov : Computational Photography Alexei Efros, CMU, Fall 2007

Basic GPU techniques Josef Pelikán CGG MFF UK Praha.

Direct Rendering. Direct Rendering Goals

Spatial data structures in 2D

Practical Image and Video Processing Using MATLAB

CONSISTENT COLOR RESAMPLE IN DIGITAL ORTHOPHOTO PRODUCTION INTRODUCTION

Transforms. COMP 575/770 Spring 2013

Image Warping and Morphing. Alexey Tikhonov

Aliasing. Can t draw smooth lines on discrete raster device get staircased lines ( jaggies ):

Lecture 2: 2D Fourier transforms and applications

CSE528 Computer Graphics: Theory, Algorithms, and Applications

Ray tracing based fast refraction method for an object seen through a cylindrical glass

Geometric Image Transformations and Related Topics

Shear-Warp Volume Rendering. Volume Rendering Overview

Georeferencing & Spatial Adjustment

Sampling: Application to 2D Transformations

DIGITAL TERRAIN MODELLING. Endre Katona University of Szeged Department of Informatics

ECE-161C Cameras. Nuno Vasconcelos ECE Department, UCSD

Announcements. Image Matching! Source & Destination Images. Image Transformation 2/ 3/ 16. Compare a big image to a small image

Texture Mapping and Sampling

Lecture 16: Computer Vision

Lecture 16: Computer Vision

CSE328 Fundamentals of Computer Graphics

Georeferencing & Spatial Adjustment 2/13/2018

Advanced Computer Graphics Transformations. Matthias Teschner

Texturing Theory. Overview. All it takes is for the rendered image to look right. -Jim Blinn 11/10/2018

Georeferencing in ArcGIS

Announcements. Mosaics. How to do it? Image Mosaics

Transformations for Virtual Worlds. (thanks, Greg Welch)

The Problem. Georeferencing & Spatial Adjustment. Nature Of The Problem: For Example: Georeferencing & Spatial Adjustment 9/20/2016

Translations. Geometric Image Transformations. Two-Dimensional Geometric Transforms. Groups and Composition

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

Geometric Modeling of Curves

Computer Graphics Introduction. Taku Komura

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

Chapter 18. Geometric Operations

Image Warping and Morphing. Alexey Tikhonov

Digital Image Processing COSC 6380/4393

Rectification and Distortion Correction

Image-Based Rendering

MET71 COMPUTER AIDED DESIGN

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

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

Texture Mapping 1/34

Fig. 3.1: Interpolation schemes for forward mapping (left) and inverse mapping (right, Jähne, 1997).

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

Dr Pavan Chakraborty IIIT-Allahabad

POSITIONING A PIXEL IN A COORDINATE SYSTEM

Terrain correction. Backward geocoding. Terrain correction and ortho-rectification. Why geometric terrain correction? Rüdiger Gens

Central Slice Theorem

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

Motion. 1 Introduction. 2 Optical Flow. Sohaib A Khan. 2.1 Brightness Constancy Equation

Camera Model and Calibration

Resampling radially captured images for perspectively correct stereoscopic display

2D Object Definition (1/3)

Homogeneous Coordinates. Lecture18: Camera Models. Representation of Line and Point in 2D. Cross Product. Overall scaling is NOT important.

CS4670: Computer Vision

2D Transforms. Lecture 4 CISC440/640 Spring Department of Computer and Information Science

Digital Image Processing, 3rd ed. Gonzalez & Woods

COORDINATE TRANSFORMATION. Lecture 6

THE VIEWING TRANSFORMATION

Deforming Objects. Deformation Techniques. Deforming Objects. Examples

Transcription:

Image warping introduction 1997-2015 Josef Pelikán CGG MFF UK Praha pepca@cgg.mff.cuni.cz http://cgg.mff.cuni.cz/~pepca/ Warping 2015 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 1 / 22

Warping.. image deformation texture mapping in 3D rendering (after rasterization) perspective distortion, mapping textures to arbitrary shapes correction of geometric distortion (digital image acquirement) satellite and aerial photography scanning of deformed documents special effects in TV, film and advertisement Warping 2015 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 2 / 22

Mathematical model image function f: U R 2 R n y U f: x, y a 1, a 2,... a n x position on the plane image attributes (color, transparency) Warping 2015 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 3 / 22

Spatial discretization Digitized raster image: I: 0.. m 1 0.. n 1 R n Digitization using filter d: I i, j f x, y d x i, y j dx dy f 2 R d.. device characteristics (optical system, CCD element) Warping 2015 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 4 / 22

Digital image reproduction Reconstruction of a discrete image: r m1 n1 i0 j0 f x, y I i, j r i x, j y f r.. output device characteristics (impulse response).. we need f r to be similar to f (in frequency range defined by the Nyquist law) Warping 2015 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 5 / 22

Geometric transform y f U g y f x 2 2 g: R R, f g x, y f x y x 1,, f g u v f u v But what about raster images? G I f I f Warping 2015 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 6 / 22

Transform with interpolation digitization = sampling digitizing filter = Dirac delta attributes (color) of transformed pixel computed by approximation or interpolation inverse transform function g -1 is needed rounding, polynomial interpolation bilinear to bicubic interpolation/approximation is sufficient Warping 2015 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 7 / 22

Interpolation in source coord. system i+1 j i i+1 g -1 (u,v) Warping 2015 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 8 / 22

Transform with filtering pixel-area model digitizing filter has areal support (e.g. box or conical filter) source pixels are projected to target coordinate system only g is needed suitable also for contractive transforms isometric transform image is blurred big contraction high computing time (speedup needed) Warping 2015 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 9 / 22

Transform with filtering v+1 v v-1 u-1 u u+1 g(i,j) Warping 2015 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 10 / 22

MIP map (multum in parvo) pyramidal representation of the source image (hierarchy) preprocessing = pre-filtering useful mostly for transforms with big contraction substantial speedup used mostly for texture mapping on the GPU (distant objects) compact storage only 4/3 size of original RGB image Warping 2015 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 11 / 22

MIP map G 0 R 0 B 0 G 1 R 1 B 1 G 2 R 2 B 2 Warping 2015 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 12 / 22

Multi-pass algorithms transform is factored into several consecutive steps each step works either on rows or on columns of an image faster computation simpler filtering two 1D filters are faster than a 2D one bottleneck problem partial mapping is highly contractive or even non-injective Warping 2015 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 13 / 22

Two-pass rotation [x,y] [u,v] = f(x,y) = [f 1 (x,y),y] [r,s] = g(u,v) = [u,g 1 (u,v)] = [f 1 (x,y),g 1 (f 1 (x,y),v)] f [u,v] g [r,s] Warping 2015 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 14 / 22

Derivation Target transform (rotation by ): r x cos y sin s x sin y cos First transform f: u f x y v y 1, Second transform g: r u f x, y s g u, v g f x, y, y 1 1 1 1 Warping 2015 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 15 / 22

Derivation Horizontal shear for the first pass: f x y x y 1, cos sin Vertical shear for the second pass: g u v x y x v 1, sin cos sin cos u f 1 x, v x cos v sin x u v sin cos g u v u v 1, tan sec Warping 2015 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 16 / 22

Three-pass rotation Rotation matrix factoring: cos sin sin cos 1 tan 2 1 0 0 1 sin 1 1 tan 2 0 1 sufficient for angles: 2 2 Warping 2015 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 17 / 22

Arbitrary angle multi-pass methods cannot be used for wide range of angles. Suitable angle ranges: -45 o 45 o for two-pass rotation -90 o 90 o for three-pass rotation auxiliary rotation (multiple of 90 o ) simple, fast no image degradation Warping 2015 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 18 / 22

General separable transform Separable transform: h x, y h x, y, h x, y g f x, y f x, y f x, y, y, u, g u, v g u v 1 1 2 1 f x, y h x, y 1 1 g u, v h u, v, v 1 2 if (u,v) such that x u, v Warping 2015 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 19 / 22

Image degradation Inapplicable areas: low values of the derivative h 1 x, y x or high values of the derivative g 1 u, v v Sometimes even the inverse function could not be defined (u,v)! concurrent processing of images I and I T Warping 2015 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 20 / 22

Optimized algorithm concurrent processing of original I and transposed I T image both branches use the same method (two-pass algorithm using separable transforms h and h T ) result pixels are composed from h(i) and (h T (I T )) T comparing degradation pixel by pixel even for non-injective deformations! image folding.. Warping 2015 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 21 / 22

The End More info: J. Foley, A. van Dam, S. Feiner, J. Hughes: Computer Graphics, Principles and Practice, 815-832 J. Gomes et al.: Warping and Morphing of Graphical Objects, Course Notes - SIGGRAPH 95 Warping 2015 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 22 / 22