EE465: Introduction to Digital Image Processing 1 Image Interpolation Introduction –What is image interpolation? (D-A conversion) –Why do we need it? Interpolation.

Slides:



Advertisements
Similar presentations
Digital Image Processing
Advertisements

Computer Vision, Robert Pless
QR Code Recognition Based On Image Processing
Image Interpolation CS4670: Computer Vision Noah Snavely.
Week 7 - Wednesday.  What did we talk about last time?  Transparency  Gamma correction  Started texturing.
Image is NOT Perfect Sometimes
1 pb.  camera model  calibration  separation (int/ext)  pose Don’t get lost! What are we doing? Projective geometry Numerical tools Uncalibrated cameras.
IMAGE UPSAMPLING VIA IMPOSED EDGE STATISTICS Raanan Fattal. ACM Siggraph 2007 Presenter: 이성호.
Interpolation Prof. Noah Snavely CS1114
Image Sampling Moire patterns
Lecture 9: Image alignment CS4670: Computer Vision Noah Snavely
Lecture 4: Image Resampling CS4670: Computer Vision Noah Snavely.
Lecture 3: Image Resampling CS4670: Computer Vision Noah Snavely Nearest-neighbor interpolation Input image 3x upsample hq3x interpolation (ZSNES)
Chapter 6 Numerical Interpolation
Image Sampling Moire patterns -
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean 5409 T-R 10:30am – 11:50am.
Computer Graphics Inf4/MSc Computer Graphics Lecture 9 Antialiasing, Texture Mapping.
Image Registration January 2001 Gaia3D Inc. Sanghee Gaia3D Seminar Material.
What is an image? f(x,y):2 
Orthogonal moments Motivation for using OG moments Stable calculation by recurrent relations Easier and stable image reconstruction - set of orthogonal.
Image Formation. Input - Digital Images Intensity Images – encoding of light intensity Range Images – encoding of shape and distance They are both a 2-D.
Chapter 3: Image Restoration Geometric Transforms.
By Meidika Wardana Kristi, NRP  Digital cameras used to take picture of an object requires three sensors to store the red, blue and green color.
Image Warping / Morphing
$100 When was the first photography in the world taken? – A) 1816 – B) 1826 – C) 1836 – D) 1866.
Regression analysis Control of built engineering objects, comparing to the plan Surveying observations – position of points Linear regression Regression.
Image Preprocessing: Geometric Correction Image Preprocessing: Geometric Correction Jensen, 2003 John R. Jensen Department of Geography University of South.
Digital Image Processing Lecture 7: Geometric Transformation March 16, 2005 Prof. Charlene Tsai.
Image Resampling CS4670: Computer Vision Noah Snavely.
Digital Image Processing Lecture 6: Image Geometry
Edge-Directed Image Interpolation Nickolaus Mueller, Yue Lu, and Minh N. Do “In theory, there is no difference between theory and practice; In practice,
Application (I): Impulse Noise Removal Impulse noise.
Interpolation Prof. Noah Snavely CS1114
3. Image Sampling & Quantisation 3.1 Basic Concepts To create a digital image, we need to convert continuous sensed data into digital form. This involves.
EE565 Advanced Image Processing Copyright Xin Li Motivating Applications HDTV Internet video Artistic reproduction Widescreen movie.
EE465 Midterm Review Mar. 23, MATLAB-based Midterm Exam Research-oriented learning Just like MATH, MATLAB is another tool (use it wisely) All Roads.
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean 5403 T-R 3:00pm – 4:20pm.
Digital Media Dr. Jim Rowan ITEC 2110 Chapter 3. Roll call.
GEOMETRIC OPERATIONS. Transformations and directions Affine (linear) transformations Translation, rotation and scaling Non linear (Warping transformations)
CS559: Computer Graphics Lecture 8: Warping, Morphing, 3D Transformation Li Zhang Spring 2010 Most slides borrowed from Yungyu ChuangYungyu Chuang.
Photo VR Editor: A Panoramic and Spherical Environment Map Authoring Tool for Image-Based VR Browsers Jyh-Kuen Horng, Ming Ouhyoung Communications and.
Hough transform and geometric transform
Brent M. Dingle, Ph.D Game Design and Development Program Mathematics, Statistics and Computer Science University of Wisconsin - Stout Image Processing.
SuperResolution (SR): “Classical” SR (model-based) Linear interpolation (with post-processing) Edge-directed interpolation (simple idea) Example-based.
Speaker Min-Koo Kang March 26, 2013 Depth Enhancement Technique by Sensor Fusion: MRF-based approach.
Instructor: Mircea Nicolescu Lecture 7
Instructor: Mircea Nicolescu Lecture 5 CS 485 / 685 Computer Vision.
IS502:M ULTIMEDIA D ESIGN FOR I NFORMATION S YSTEM D IGITAL S TILL I MAGES Presenter Name: Mahmood A.Moneim Supervised By: Prof. Hesham A.Hefny Winter.
Arithmetic and Geometric Transformations (Chapter 2) CS474/674 – Prof. Bebis.
IS502:M ULTIMEDIA D ESIGN FOR I NFORMATION S YSTEM D IGITAL S TILL I MAGES Presenter Name: Mahmood A.Moneim Supervised By: Prof. Hesham A.Hefny Winter.
Image Resampling & Interpolation
EE465: Introduction to Digital Image Processing Copyright Xin Li'2003
COSC579: Image Align, Mosaic, Stitch
Image Sampling Moire patterns
Lecture 7: Image alignment
Image and Video Processing – An Introduction
EE465: Introduction to Digital Image Processing
Image Sampling Moire patterns
Lecture 3: Camera Rotations and Homographies
Geometric and Point Transforms
Samuel Cheng Slide credits: Noah Snavely
2D transformations (a.k.a. warping)
Filtering Part 2: Image Sampling
Image Sampling Moire patterns
Image Resampling & Interpolation
Resampling.
Samuel Cheng Slide credits: Noah Snavely
Image Stitching Linda Shapiro ECE/CSE 576.
Image Processing 고려대학교 컴퓨터 그래픽스 연구실 kucg.korea.ac.kr.
Image Stitching Linda Shapiro ECE P 596.
Presentation transcript:

EE465: Introduction to Digital Image Processing 1 Image Interpolation Introduction –What is image interpolation? (D-A conversion) –Why do we need it? Interpolation Techniques –1D zero-order, first-order, third-order –2D = two sequential 1D (divide-and-conquer) –Directional(Adaptive) interpolation* Interpolation Applications –Digital zooming (resolution enhancement) –Image inpainting (error concealment) –Geometric transformations (where your imagination can fly)

EE465: Introduction to Digital Image Processing 2 Introduction What is image interpolation? –An image f(x,y) tells us the intensity values at the integral lattice locations, i.e., when x and y are both integers –Image interpolation refers to the “ guess ” of intensity values at missing locations, i.e., x and y can be arbitrary –Note that it is just a guess (Note that all sensors have finite sampling distance)

A Sentimental Comment Haven’t we just learned from discrete sampling (A-D conversion)? Yes, image interpolation is about D-A conversion Recall the gap between biological vision and artificial vision systems –Digital: camera + computer –Analog: retina + brain EE465: Introduction to Digital Image Processing 3

4 Engineering Motivations Why do we need image interpolation? –We want BIG images When we see a video clip on a PC, we like to see it in the full screen mode –We want GOOD images If some block of an image gets damaged during the transmission, we want to repair it –We want COOL images Manipulate images digitally can render fancy artistic effects as we often see in movies

EE465: Introduction to Digital Image Processing 5 Scenario I: Resolution Enhancement Low-Res. High-Res.

EE465: Introduction to Digital Image Processing 6 Scenario II: Image Inpainting Non-damagedDamaged

EE465: Introduction to Digital Image Processing 7 Scenario III: Image Warping You will work on a digital fun mirror in CA#3

EE465: Introduction to Digital Image Processing 8 Image Interpolation Introduction –What is image interpolation? –Why do we need it? Interpolation Techniques –1D linear interpolation (elementary algebra) –2D = 2 sequential 1D (divide-and-conquer) –Directional(adaptive) interpolation* Interpolation Applications –Digital zooming (resolution enhancement) –Image inpainting (error concealment) –Geometric transformations

EE465: Introduction to Digital Image Processing 9 1D Zero-order (Replication) n f(n) x f(x)

EE465: Introduction to Digital Image Processing 10 1D First-order Interpolation (Linear) n f(n) x f(x)

EE465: Introduction to Digital Image Processing 11 Linear Interpolation Formula a 1-a f(n) f(n+1) f(n+a) f(n+a)=(1-a)f(n)+af(n+1), 0<a<1 Heuristic: the closer to a pixel, the higher weight is assigned Principle: line fitting to polynomial fitting (analytical formula) Note: when a=0.5, we simply have the average of two

EE465: Introduction to Digital Image Processing 12 Numerical Examples f(n)=[0,120,180,120,0] f(x)=[0,60,120,150,180,150,120,60,0], x=n/2 f(x)=[0,20,40,60,80,100,120,130,140,150,160,170,180, … ], x=n/6 Interpolate at 1/2-pixel Interpolate at 1/3-pixel

EE465: Introduction to Digital Image Processing 13 n x f(n) f(x) Cubic spline fitting 1D Third-order Interpolation (Cubic)*

EE465: Introduction to Digital Image Processing 14 From 1D to 2D  Engineers’ wisdom: divide and conquer  2D interpolation can be decomposed into two sequential 1D interpolations.  The ordering does not matter (row-column = column-row)  Such separable implementation is not optimal but enjoys low computational complexity “If you don’t know how to solve a problem, there must be a related but easier problem you know how to solve. See if you can reduce the problem to the easier one.” - rephrased from G. Polya’s “How to Solve It”

EE465: Introduction to Digital Image Processing 15 Graphical Interpretation of Interpolation at Half-pel rowcolumn f(m,n)g(m,n)

EE465: Introduction to Digital Image Processing 16 Numerical Examples abcdabcd a ab b c cd d zero-order first-order a (a+b)/2b (a+c)/2 (a+b+c+d)/4(b+d)/2 c (c+d)/2d

EE465: Introduction to Digital Image Processing 17 Numerical Examples (Con ’ t) X(m,n) row m row m+1 Col n Col n+1 X(m,n+1) X(m+1,n+1)X(m+1,n) Y a1-a b 1-b Q: what is the interpolated value at Y? Ans.: (1-a)(1-b)X(m,n)+(1-a)bX(m+1,n) +a(1-b)X(m,n+1)+abX(m+1,n+1)

EE465: Introduction to Digital Image Processing 18 Bicubic Interpolation*

EE465: Introduction to Digital Image Processing 19 Limitation with bilinear/bicubic Edge blurring Jagged artifacts X Z X Z Edge blurring

EE465: Introduction to Digital Image Processing 20 Edge-Sensitive Interpolation Step 1: interpolate the missing pixels along the diagonal black or white? Step 2: interpolate the other half missing pixels a b cd Since |a-c|=|b-d| x x has equal probability of being black or white a b c d Since |a-c|>|b-d| x=(b+d)/2=black x Please refer to esi1.m and esi2.m in interp.zip

EE565 Advanced Image Processing Copyright Xin Li NEDI Step 1: Interpolate diagonal pixels* -Formulate LS estimation problem with pixels at low resolution and solve {a 1,a 2,a 3,a 4 } -Use {a 1,a 2,a 3,a 4 } to interpolate the pixel 0 at the high resolution Implementation: Please refer to sri1.m in interp.zip

EE565 Advanced Image Processing Copyright Xin Li NEDI Step 2: Interpolate the Other Half* -Formulate LS estimation problem with pixels at low resolution and solve {a 1,a 2,a 3,a 4 } -Use {a 1,a 2,a 3,a 4 } to interpolate the pixel 0 at the high resolution Implementation: Please refer to sri2.m in interp.zip

Geometric Duality EE465: Introduction to Digital Image Processing 23 Step-I Step-I after rotation of 45-degree Step-II

EE465: Introduction to Digital Image Processing 24 Image Interpolation Introduction Interpolation Techniques –1D zero-order, first-order, third-order –2D zero-order, first-order, third-order –Directional interpolation* Interpolation Applications –Digital zooming (resolution enhancement) –Image inpainting (error concealment) –Geometric transformations (where your imagination can fly)

EE465: Introduction to Digital Image Processing 25 Pixel Replication low-resolution image (100×100) high-resolution image (400×400)

EE465: Introduction to Digital Image Processing 26 low-resolution image (100×100) Bilinear Interpolation high-resolution image (400×400)

EE465: Introduction to Digital Image Processing 27 Bicubic Interpolation low-resolution image (100×100) high-resolution image (400×400)

EE465: Introduction to Digital Image Processing 28 Edge-Directed Interpolation (Li&Orchard ’ 2000) low-resolution image (100×100) high-resolution image (400×400)

EE465: Introduction to Digital Image Processing 29 Image Demosaicing ( Color-Filter-Array Interpolation ) Bayer Pattern

EE465: Introduction to Digital Image Processing 30 Image Example Ad-hoc CFA Interpolation Advanced CFA Interpolation

EE465: Introduction to Digital Image Processing 31 Error Concealment* damagedinterpolated

EE465: Introduction to Digital Image Processing 32 Image Inpainting*

Image Mosaicing* EE465: Introduction to Digital Image Processing 33

EE465: Introduction to Digital Image Processing 34 Geometric Transformation In the virtual space, you can have any kind of apple you want! MATLAB functions: griddata, interp2, maketform, imtransform

EE465: Introduction to Digital Image Processing 35 Basic Principle (x,y)  (x ’,y ’ ) is a geometric transformation We are given pixel values at (x,y) and want to interpolate the unknown values at (x ’,y ’ ) Usually (x ’,y ’ ) are not integers and therefore we can use linear interpolation to guess their values MATLAB implementation: z ’ =interp2(x,y,z,x ’,y ’,method);

EE465: Introduction to Digital Image Processing 36 Rotation x y x’ y’ θ

EE465: Introduction to Digital Image Processing 37 MATLAB Example % original coordinates [x,y]=meshgrid(1:256,1:256); z=imread('cameraman.tif'); % new coordinates a=2; for i=1:256;for j=1:256; x1(i,j)=a*x(i,j); y1(i,j=y(i,j)/a; end;end % Do the interpolation z1=interp2(x,y,z,x1,y1,'cubic');

EE465: Introduction to Digital Image Processing 38 Rotation Example θ=3 o

EE465: Introduction to Digital Image Processing 39 Scale a=1/2

EE465: Introduction to Digital Image Processing 40 Affine Transform square parallelogram

EE465: Introduction to Digital Image Processing 41 Affine Transform Example

EE465: Introduction to Digital Image Processing 42 Shear square parallelogram

EE465: Introduction to Digital Image Processing 43 Shear Example

EE465: Introduction to Digital Image Processing 44 Projective Transform quadrilateralsquare A B CD A’ B’ C’ D’

EE465: Introduction to Digital Image Processing 45 Projective Transform Example [ 0 0; 1 0; 1 1; 0 1] [-4 2; -8 -3; -3 -5; 6 3]

EE465: Introduction to Digital Image Processing 46 Polar Transform

EE465: Introduction to Digital Image Processing 47 Iris Image Unwrapping r 

EE465: Introduction to Digital Image Processing 48 Use Your Imagination r -> sqrt(r)

EE465: Introduction to Digital Image Processing 49 Free Form Deformation Seung-Yong Lee et al., “Image Metamorphosis Using Snakes and Free-Form Deformations,”SIGGRAPH’1985, Pages

EE465: Introduction to Digital Image Processing 50 Application into Image Metamorphosis

EE465: Introduction to Digital Image Processing 51 Summary of Image Interpolation A fundamental tool in digital processing of images: bridging the continuous world and the discrete world Wide applications from consumer electronics to biomedical imaging Remains a hot topic after the IT bubbles break