Brent M. Dingle, Ph.D. 2015 Game Design and Development Program Mathematics, Statistics and Computer Science University of Wisconsin - Stout Image Processing.

Slides:



Advertisements
Similar presentations
Multiscale Analysis of Images Gilad Lerman Math 5467 (stealing slides from Gonzalez & Woods, and Efros)
Advertisements

Image Interpolation CS4670: Computer Vision Noah Snavely.
Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
Slides from Alexei Efros
CS 691 Computational Photography
Computational Photography: Sampling + Reconstruction Connelly Barnes Slides from Alexei Efros and Steve Marschner.
Linear Filtering – Part II Selim Aksoy Department of Computer Engineering Bilkent University
Computational Photography CSE 590 Tamara Berg Filtering & Pyramids.
Filtering CSE P 576 Larry Zitnick
Sampling, Aliasing, & Mipmaps
Image Filtering, Part 2: Resampling Today’s readings Forsyth & Ponce, chapters Forsyth & Ponce –
Convolution, Edge Detection, Sampling : Computational Photography Alexei Efros, CMU, Fall 2006 Some slides from Steve Seitz.
Sampling and Pyramids : Rendering and Image Processing Alexei Efros …with lots of slides from Steve Seitz.
Edges and Scale Today’s reading Cipolla & Gee on edge detection (available online)Cipolla & Gee on edge detection Szeliski – From Sandlot ScienceSandlot.
Lecture 2: Edge detection and resampling
Image transformations, Part 2 Prof. Noah Snavely CS1114
Image Sampling Moire patterns
Advanced Computer Graphics (Spring 2006) COMS 4162, Lecture 3: Sampling and Reconstruction Ravi Ramamoorthi
Lecture 3: Edge detection, continued
CSCE 641 Computer Graphics: Fourier Transform Jinxiang Chai.
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)
CPSC 641 Computer Graphics: Fourier Transform Jinxiang Chai.
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 3: Sampling and Reconstruction Ravi Ramamoorthi
Computational Photography: Fourier Transform Jinxiang Chai.
Slides from Alexei Efros, Steve Marschner Filters & fourier theory.
Image Sampling Moire patterns -
Image Sampling CSE 455 Ali Farhadi Many slides from Steve Seitz and Larry Zitnick.
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean 5409 T-R 10:30am – 11:50am.
Applications of Image Filters Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 02/04/10.
Image Resampling CS4670: Computer Vision Noah Snavely.
Image Resampling CS4670: Computer Vision Noah Snavely.
Image Processing Xuejin Chen Ref:
Lecture 4: Image Resampling and Reconstruction CS4670: Computer Vision Kavita Bala.
Lecture 3: Edge detection CS4670/5670: Computer Vision Kavita Bala From Sandlot ScienceSandlot Science.
Brent M. Dingle, Ph.D Game Design and Development Program Mathematics, Statistics and Computer Science University of Wisconsin - Stout Filtering.
Brent M. Dingle, Ph.D Game Design and Development Program Mathematics, Statistics and Computer Science University of Wisconsin - Stout Quick Review.
Brent M. Dingle, Ph.D Game Design and Development Program Mathematics, Statistics and Computer Science University of Wisconsin - Stout HTML5 – Canvas.
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean 5403 T-R 3:00pm – 4:20pm.
CS559: Computer Graphics Lecture 4: Compositing and Resampling Li Zhang Spring 2008.
Digital Image Processing
Brent M. Dingle, Ph.D Game Design and Development Program Mathematics, Statistics and Computer Science University of Wisconsin - Stout Edge Detection.
Brent M. Dingle, Ph.D Game Design and Development Program Mathematics, Statistics and Computer Science University of Wisconsin - Stout Edge Detection:
Brent M. Dingle, Ph.D Game Design and Development Program Mathematics, Statistics and Computer Science University of Wisconsin - Stout More on Colors.
Digital Image Processing
Lecture 5: Image Interpolation and Features
Lecture 5: Fourier and Pyramids
Projects Project 1a due this Friday Project 1b will go out on Friday to be done in pairs start looking for a partner now.
Last Lecture photomatix.com. Today Image Processing: from basic concepts to latest techniques Filtering Edge detection Re-sampling and aliasing Image.
Brent M. Dingle, Ph.D Game Design and Development Program Mathematics, Statistics and Computer Science University of Wisconsin - Stout Color Image.
Image Resampling & Interpolation
Many slides from Steve Seitz and Larry Zitnick
Image Sampling Moire patterns
Image Warping (Geometric Transforms)
Gonzalez & Woods, and Efros)
Image transformations
Image Sampling Moire patterns
Jeremy Bolton, PhD Assistant Teaching Professor
Multiscale Analysis of Images
More Image Manipulation
CSCE 643 Computer Vision: Thinking in Frequency
Samuel Cheng Slide credits: Noah Snavely
Image Processing Today’s readings For Monday
Digital Image Processing
Filtering Part 2: Image Sampling
Image Sampling Moire patterns
Lecture 5: Resampling, Compositing, and Filtering Li Zhang Spring 2008
Image Resampling & Interpolation
Resampling.
Samuel Cheng Slide credits: Noah Snavely
Presentation transcript:

Brent M. Dingle, Ph.D Game Design and Development Program Mathematics, Statistics and Computer Science University of Wisconsin - Stout Image Processing Image Interpolation public domain image from wikipedia

Lecture Objectives Previously – What a Digital Image is – Acquisition of Digital Images – Human Perception of Digital Images – Digital Representation of Images – Various HTML5 and JavaScript Code Pixel manipulation Image Loading Filtering Today – Image Interpolation Sub-Sampling – Aliasing – Gaussian Blur Fix Up-Sampling – Interpolation – Examples of Using Interpolation

Lecture Objectives Previously – What a Digital Image is – Acquisition of Digital Images – Human Perception of Digital Images – Digital Representation of Images – Various HTML5 and JavaScript Code Pixel manipulation Image Loading Filtering Today – Image Interpolation Sub-Sampling – Aliasing – Pre-Filtering Up-Sampling – Interpolation – Examples of Using Interpolation

Image Scaling This image is too big to fit on the screen. How can we generate a half-sized version? Source: S. Seitz Slide from: Noah Snavely, 2012, Cornell

Image sub-sampling scaled to ¼ size (2x zoom) scaled to 1/8 size (4x zoom) Why do these reduced sizes look bad? scaled to ½ size Source: S. Seitz Slide from: Noah Snavely, 2012, Cornell

Image sub-sampling public domain images from wikipedia What happened here?

Even worse for synthetic images Source: L. Zhang And what happened here?

Aliasing Occurs when your sampling rate is not high enough to capture the amount of detail in your image Can give you the wrong signal/image—an alias To do sampling right, need to understand the structure of your signal/image Hello Fourier! To avoid aliasing: – sampling rate ≥ 2 * max frequency in the image said another way: ≥ two samples per cycle – This minimum sampling rate is called the Nyquist rate Source: L. Zhang

Wagon-wheel effect (See Source: L. Zhang

Wagon Wheel Variations Images from: Which way is the train going? Which way does the middle dancer spin? Focus on the left – middle matches Focus on the right – middle matches

Nyquist limit – 2D example Good sampling Bad sampling sampling rate < 2*(max freq)

Aliasing When downsampling by a factor of two – Original image has frequencies that are too high How can we fix this?

Gaussian pre-filtering G 1/4 G 1/8 Gaussian 1/2 Solution: filter the image, then subsample Source: S. Seitz

Subsampling with Gaussian pre-filtering G 1/4G 1/8Gaussian 1/2 Solution: filter the image, then subsample Source: S. Seitz

Compare with... 1/4 (2x zoom) 1/8 (4x zoom) 1/2 Source: S. Seitz

Gaussian pre- filtering Solution: filter the image, then subsample blur F 0 H * * subsample blur subsample … F1F1 F1F1 F 1 H * * F2F2 F2F2 F0F0 F0F0

blur F 0 H * * subsample blur subsample … F1F1 F1F1 F 1 H * * F2F2 F2F2 F0F0 F0F0 { Gaussian pyramid

Gaussian pyramids [Burt and Adelson, 1983] In computer graphics, a mip map [Williams, 1983] A precursor to wavelet transform Gaussian Pyramids have all sorts of applications in computer graphics, vision, imaging… Source: S. Seitz

Gaussian pyramids [Burt and Adelson, 1983] How much space does a Gaussian pyramid take compared to the original image? Source: S. Seitz

Gaussian Pyramid

Questions so far? Questions on Sub-Sampling – Aliasing? – Gaussian pre-filter?

Upsampling This image is too small for this screen: How can we make it 10 times as big? Simplest approach: repeat each row and column 10 times (“Nearest neighbor interpolation”) Slide from: Noah Snavely, 2012, Cornell

Image interpolation Recall how a digital image is formed It is a discrete point-sampling of a continuous function If we could somehow reconstruct the original function, any new image could be generated, at any resolution and scale Adapted from: S. Seitz d = 1 in this example Slide from: Noah Snavely, 2012, Cornell

Image interpolation d = 1 in this example Recall how a digital image is formed It is a discrete point-sampling of a continuous function If we could somehow reconstruct the original function, any new image could be generated, at any resolution and scale Adapted from: S. Seitz Slide from: Noah Snavely, 2012, Cornell

Image interpolation Convert to a continuous function: Reconstruct by convolution with a reconstruction filter, h What if we don’t know ? Guess an approximation: Can be done in a principled way: filtering d = 1 in this example Adapted from: S. Seitz Slide from: Noah Snavely, 2012, Cornell

Image interpolation “Ideal” reconstruction Nearest-neighbor interpolation Linear interpolation Gaussian reconstruction Source: B. Curless Slide from: Noah Snavely, 2012, Cornell

Reconstruction filters What does the 2D version of this hat function look like? 3x3 Matrix for 2D tent filter might look like: performs linear interpolation (tent function) performs bilinear interpolation Derived from: Noah Snavely, 2012, Cornell

Reconstruction filters What does the 2D version of this hat function look like? More information, start at: Better filters give better resampled images Bicubic is common choice performs linear interpolation (tent function) performs bilinear interpolation Cubic reconstruction filter Slide from: Noah Snavely, 2012, Cornell

Image interpolation Nearest-neighbor interpolationBilinear interpolationBicubic interpolation Original image: x 10 Slide from: Noah Snavely, 2012, Cornell

Image interpolation Also used for resampling Slide from: Noah Snavely, 2012, Cornell

Examples of Interpolation Usage Image Bayer De-mosaicking Image Error Correction/Fill Image Reconstruction/Inpainting Merging/Mosaicking/Panoramic Splicing

Demosaicing Image Example Ad-hoc CFA Interpolation Advanced CFA Interpolation

Error Correction/Fill damagedinterpolated

Image Inpainting/Restoration

Image Mosaicing/Merging

Summary: Image Interpolation Image Interpolation – Fundamental tool in digital processing of images bridges the continuous world and the discrete world – Wide range of application use

Challenge: Bayer De-Mosaicking Separate an image into its color planes (RGB)

Challenge: Bayer De-Mosaicking Reduce panes to Bayer Pattern Equivalent

Challenge: Bayer De-Mosaicking Reduce panes to Bayer Pattern Equivalent

Challenge: Bayer De-Mosaicking Reduce panes to Bayer Pattern Equivalent

Challenge: Bayer De-Mosaicking Interpolate each pane and re-composite

Questions? Beyond D2L – Examples and information can be found online at: Continue to more stuff as needed

Extra Reference Stuff Follows

Credits Much of the content derived/based on slides for use with the book: – Digital Image Processing, Gonzalez and Woods Some layout and presentation style derived/based on presentations by – Donald House, Texas A&M University, 1999 – Bernd Girod, Stanford University, 2007 – Shreekanth Mandayam, Rowan University, 2009 – Noah Snavely, Cornell University, 2012 – Igor Aizenberg, TAMUT, 2013 – Xin Li, WVU, 2014 – George Wolberg, City College of New York, 2015 – Yao Wang and Zhu Liu, NYU-Poly, 2015 – Sinisa Todorovic, Oregon State, 2015