Image and Multidimensional Signal Processing

Similar documents
Interpolation is a basic tool used extensively in tasks such as zooming, shrinking, rotating, and geometric corrections.

Georeferencing & Spatial Adjustment 2/13/2018

Lecture 2 Image Processing and Filtering

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

Georeferencing & Spatial Adjustment

CS4670: Computer Vision

The Problem. Georeferencing & Spatial Adjustment. Nature of the problem: For Example: Georeferencing & Spatial Adjustment 2/4/2014

Geometric Image Transformations and Related Topics

Lecture 6 Geometric Transformations and Image Registration. Lin ZHANG, PhD School of Software Engineering Tongji University Spring 2013

Chapter 18. Geometric Operations

Digital Image Processing, 3rd ed. Gonzalez & Woods

Practical Image and Video Processing Using MATLAB

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

CoE4TN3 Medical Image Processing

Warping. 12 May 2015

EC-433 Digital Image Processing

CS 335 Graphics and Multimedia. Geometric Warping

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

Image Analysis. Rasmus R. Paulsen DTU Compute. DTU Compute

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

What will we learn? Geometric Operations. Mapping and Affine Transformations. Chapter 7 Geometric Operations

Rotation and Interpolation

CS1114 Assignment 5, Part 1

3D Geometry and Camera Calibration

COORDINATE TRANSFORMATION. Lecture 6

CS1114 Assignment 5 Part 1

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

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

N-Views (1) Homographies and Projection

LAB 2: Resampling. Maria Magnusson, 2012 (last update August 2016) with contributions from Katarina Flood, Qingfen Lin and Henrik Turbell

Digital Image Processing

Brightness and geometric transformations

MONO-IMAGE INTERSECTION FOR ORTHOIMAGE REVISION

Lecture 25: Affine Transformations and Barycentric Coordinates

Image warping introduction

Image transformations. Prof. Noah Snavely CS Administrivia

MODULE 3 LECTURE NOTES 2 GROUND CONTROL POINTS AND CO-REGISTRATION

Image and Multidimensional Signal Processing

Image warping , , Computational Photography Fall 2017, Lecture 10

Image Warping: A Review. Prof. George Wolberg Dept. of Computer Science City College of New York

CSE 527: Introduction to Computer Vision

RESAMPLING DIGITAL IMAGERY TO EPIPOLAR GEOMETRY

Digital Image Processing COSC 6380/4393

Georeferencing in ArcGIS

Image Stitching. Slides from Rick Szeliski, Steve Seitz, Derek Hoiem, Ira Kemelmacher, Ali Farhadi

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

Lecture 1 Introduction & Fundamentals

Image Warping. August 20, Abstract

EECS 556 Image Processing W 09. Interpolation. Interpolation techniques B splines

Computer Vision Projective Geometry and Calibration. Pinhole cameras

Image Warping. Srikumar Ramalingam School of Computing University of Utah. [Slides borrowed from Ross Whitaker] 1

Image warping and stitching

02501 Image analysis, vision and computer graphics Exercise 05 - Image Warping

SIFT: SCALE INVARIANT FEATURE TRANSFORM SURF: SPEEDED UP ROBUST FEATURES BASHAR ALSADIK EOS DEPT. TOPMAP M13 3D GEOINFORMATION FROM IMAGES 2014

Midterm Examination CS 534: Computational Photography

EE795: Computer Vision and Intelligent Systems

Mosaics. Today s Readings

Image warping and stitching

CS4670: Computer Vision

Geoprocessing and georeferencing raster data

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

Image Warping and Mosacing

Geometric Rectification of Remote Sensing Images

Computer Graphics and Image Processing

Linear Algebra and Image Processing: Additional Theory regarding Computer Graphics and Image Processing not covered by David C.

RIGID IMAGE REGISTRATION

CPSC 4040/6040 Computer Graphics Images. Joshua Levine

Introduction to Computer Vision

Exercise #5b - Geometric Correction of Image Data

Rectification and Distortion Correction

Geometric Correction of Imagery

Surface shading: lights and rasterization. Computer Graphics CSE 167 Lecture 6

Matching. Compare region of image to region of image. Today, simplest kind of matching. Intensities similar.

CS1114: Study Guide 2

ions and tion III Transforming Points Preview

Image Transformations

Computer Assisted Image Analysis TF 3p and MN1 5p Lecture 1, (GW 1, )

2D transformations Homogeneous coordinates. Uses of Transformations

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

Geometric Transformations and Image Warping

Image Warping and Morphing. Alexey Tikhonov

Image georeferencing is the process of developing a model to transform from pixel coordinates into GIS coordinates such as meters on the ground.

Manual image registration in BrainVoyager QX Table of Contents

Rotation and Scaling Image Using PCA

Image warping and stitching

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

Automatic Image Alignment (feature-based)

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

Colorado School of Mines. Computer Vision. Professor William Hoff Dept of Electrical Engineering &Computer Science.

Feature Tracking and Optical Flow

SCALE INVARIANT TEMPLATE MATCHING

Lecture #3. MATLAB image processing (cont.) Histograms Mathematics of image processing Geometric transforms Image Warping.

Data handling 2: Transformations

Vector Algebra Transformations. Lecture 4

Digital Image Fundamentals II

1 of 8 8/17/00 3:06 PM

Edge Detection. Computer Vision Shiv Ram Dubey, IIIT Sri City

1. Stereo Correspondence. (100 points)

Rectification of distorted elemental image array using four markers in three-dimensional integral imaging

Chapter 2 - Fundamentals. Comunicação Visual Interactiva

Transcription:

Image and Multidimensional Signal Processing Professor William Hoff Dept of Electrical Engineering &Computer Science http://inside.mines.edu/~whoff/

Interpolation and Spatial Transformations 2

Image Interpolation (Sect 2.4.4) We often need to estimate (interpolate) the value of an image at a non-integer location Example: expanding a 500x500 image to 1000x1000 pixel spacing is different We can do this by looking at the values nearby. Methods include: Nearest neighbor just take the value of the closest neighbor Bilinear take a combination of the four closest neighbors Bicubic use the closest 16 neighbors (most computationally expensive, but best results) f(2,1) f(3,1) f(4,1) f(2,2) f(2,3) Values at integer locations f(3,2) f(3,3) f(4,2) What is the value here, for f(2.5, 2.5)? 3

Application: Resizing an Image Input image I1 Output image I2 We need to assign values to each pixel in the output image So scan through the output image; at each pixel calculate the value from the input image at the corresponding location If not at an integer position in the input image, we need to interpolate 4

Mapping function Assume Image I 1 has size M 1 xn 1 Image I 2 has size M 2 xn 2 Image I 1 (v,w) M 1 M 2 Image I 2 (x,y) Then x = c x v y = c y w where cx,cy are the scaling factors: c x = N2/N1 c y = M2/N1 N 1 N 2 We actually want the inverse function v = x/c x w = y/c y 5

Matlab example Nearest Neighbor Interpolation clear all close all I1 = imread('cameraman.tif'); M1 = size(i1,1); % Number of rows in I N1 = size(i1,2); % Number of columns in I % Pick size of output image M2 = 300; N2 = 100; I2 = zeros(m2,n2); % Allocate output image cx = N2/N1; % Scale in x cy = M2/M1; % Scale in y for x=1:n2 for y=1:m2 % Calculate position in input image v = x/cx; w = y/cy; % We'll just pick the nearest neighbor to (v,w) v = round(v); w = round(w); end end I2(y,x) = I1(w,v); 6

Bilinear interpolation The value at (x,y) is f(x,y) = ax + by + cxy + d where a,b,c,d are coefficients determined by the four closest neighbors Equivalent to doing linear interpolation in one dimension, then the other To find the value at P, if we know values at the Q s First interpolate horizontally to find values at R1,R2 Then interpolate vertically If corners are at (0,0), (0,1), (1,0), (1,1) http://en.wikipedia. org/wiki/bilinear_in terpolation 7

Geometric Transformations (2.6.5) Example applications Rotation De-warp to undo lens distortion Register two images (e.g., satellite images of the same patch of ground) Also called rubber sheet transformations A transformation is a function that maps pixel coordinates (x,y) = T(v,w) where (v,w) are pixel coordinates in the original image (x,y) are the corresponding pixel coordinates in the transformed image Example: T(x,y) = (v/2, w/2) shrinks the image by a factor of 2 Remember that we actually need (v,w) = T -1 (x,y) 8

Matrix Representation We can often represent the transformation T as a matrix It is convenient to append a 1 to the pixel coordinates Example: A common transformation is the affine transform t11 t12 0 x y 1 u v 1 u v 1 t21 t22 0 t31 t32 1 T 9

10

Estimating parameters of the transformation If you want to register one image to another, you need to estimate the parameters of the transformation function You can do this if you know the correspondences for a few control points ( tiepoints ) in each image I.e., (x 1,y 1 ) corresponds to (v 1,w 1 ), (x 2,y 2 ) corresponds to (v 2,w 2 ), etc (v,w) Original (source) image T (x,y) Transformed (destination) image For the affine transformation: t11 t12 0 x y 1 v w 1 v w 1 t21 t22 0 t31 t32 1 T There are six unknowns we need at least three pairs of tiepoints (each yields two equations) 11

Geometric Transformations Recall that we actually need the inverse mapping, from transformed image to source image (v,w) = T -1 (x,y) This is because what we really need is the values of the pixels at the integer locations in the transformed image (v,w) Original (source) image T -1 (x,y) Transformed (destination) image We need to do gray level interpolation to find the values in the original image 12

Estimating parameters of the transformation If we have three tie points x1 y1 1 u1 v1 1 x y 1 u v 1-1 T or X UT. Then T = U X 2 2 2 2 x3 y3 1 u3 v3 1 If we have more than three tie points (more is better for accuracy) x1 y1 1 u1 v1 1 x y 1 u v 1 2 2 2 2 x3 y3 1 u3 v3 1 T : : xn yn 1 un vn 1 X = UT T T U X = U UT T U U 1 T U X = T 13

Example from Matlab We want to transform the new image on the left to register (align) it to the old image on the right (to compare them for changes, for example) See Image Processing Toolbox>Examples>Image registration westconcordaerial.png westconcordorthophoto.png 14

See Matlab functions cpselect, cp2tform, imtransform 15

diff = imabsdiff(registeredoriginal, registered(:,:,1)); Can look at the 3x3 affine transformation matrix 16

Summary / Questions To do a spatial transformation, we need to (a) specify a function that maps points from one image to the other, and (b) interpolate intensity values at non-integer positions. Affine transformations can perform rotation, translation, scaling, and shear. When performing the transformation to generate the new image, why is the inverse mapping useful? 17