Sampling and Pyramids 15-463: Rendering and Image Processing Alexei Efros …with lots of slides from Steve Seitz.

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.
15-463: Computational Photography Alexei Efros, CMU, Spring 2010 Most slides from Steve Marschner Sampling and Reconstruction.
Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
MIT EECS 6.837, Durand and Cutler Sampling, Aliasing, & Mipmaps.
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.
Convolution. Spatial Filtering Operations g(x,y) = 1/M  f(n,m) (n,m) in  S Example 3 x 3 5 x 5.
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.
CSCE 641 Computer Graphics: Image Sampling and Reconstruction Jinxiang Chai.
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
CSCE 641 Computer Graphics: Image Sampling and Reconstruction Jinxiang Chai.
Image Pyramids and Blending
Image Sampling Moire patterns
Lecture 4: Image Resampling CS4670: Computer Vision Noah Snavely.
15-463: Computational Photography Alexei Efros, CMU, Fall 2011 Many slides from Steve Marschner Sampling and Reconstruction.
Convolution. Convolution Properties Commutative: f*g = g*f Associative: (f*g)*h = f*(g*h) Homogeneous : f*( g)= f*g Additive (Distributive): f*(g+h)=
Lecture 3: Image Resampling CS4670: Computer Vision Noah Snavely Nearest-neighbor interpolation Input image 3x upsample hq3x interpolation (ZSNES)
Image Pyramids and Blending : Computational Photography Alexei Efros, CMU, Fall 2005 © Kenneth Kwan.
Slides from Alexei Efros, Steve Marschner Filters & fourier theory.
Image Sampling Moire patterns -
Fourier Analysis : Rendering and Image Processing Alexei Efros.
Image Pyramids and Blending
Recap from Friday Pinhole camera model Perspective projections Lenses and their flaws Focus Depth of field Focal length and field of view.
Image Sampling CSE 455 Ali Farhadi Many slides from Steve Seitz and Larry Zitnick.
CSC589 Introduction to Computer Vision Lecture 9 Sampling, Gaussian Pyramid Bei Xiao.
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean 5409 T-R 10:30am – 11:50am.
2D Image Fourier Spectrum.
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.
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean 5403 T-R 3:00pm – 4:20pm.
2D Image Fourier Spectrum.
Lecture 5: Image Interpolation and Features
Brent M. Dingle, Ph.D Game Design and Development Program Mathematics, Statistics and Computer Science University of Wisconsin - Stout Image Processing.
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.
Recall: Gaussian smoothing/sampling G 1/4 G 1/8 Gaussian 1/2 Solution: filter the image, then subsample Filter size should double for each ½ size reduction.
Convolution.
Image Resampling & Interpolation
Many slides from Steve Seitz and Larry Zitnick
Image Sampling Moire patterns
Gonzalez & Woods, and Efros)
Image Sampling Moire patterns
Jeremy Bolton, PhD Assistant Teaching Professor
Multiscale Analysis of Images
More Image Manipulation
Sampling and Reconstruction
CSCE 643 Computer Vision: Image Sampling and Filtering
Samuel Cheng Slide credits: Noah Snavely
Image Processing Today’s readings For Monday
Convolution.
Filtering Part 2: Image Sampling
Image Sampling Moire patterns
Oh, no, wait, sorry, I meant, welcome to the implementation of 20th-century science fiction literature, or a small part of it, where we will learn about.
Convolution.
Image Resampling & Interpolation
Resampling.
Samuel Cheng Slide credits: Noah Snavely
Presentation transcript:

Sampling and Pyramids : Rendering and Image Processing Alexei Efros …with lots of slides from Steve Seitz

Today Sampling Nyquist Rate Antialiasing Gaussian and Laplacian Pyramids

Fourier transform pairs

Sampling w Spatial domainFrequency domain 1/w sampling pattern sampled signal

Reconstruction Frequency domain 1/w w Spatial domain sinc function reconstructed signal

What happens when the sampling rate is too low?

Nyquist Rate What’s the minimum Sampling Rate 1/w to get rid of overlaps? Frequency domain 1/w w Spatial domain sinc function Sampling Rate ≥ 2 * max frequency in the image this is known as the Nyquist Rate

Antialiasing What can be done? Sampling rate ≥ 2 * max frequency in the image 1.Raise sampling rate by oversampling Sample at k times the resolution continuous signal: easy discrete signal: need to interpolate 2. Lower the max frequency by prefiltering Smooth the signal enough Works on discrete signals 3. Improve sampling quality with better sampling Nyquist is best case! Stratified sampling (jittering) Importance sampling (salaries in Seattle) Relies on domain knowledge

Sampling Good sampling: Sample often or, Sample wisely Bad sampling: see aliasing in action!

Gaussian pre-filtering G 1/4 G 1/8 Gaussian 1/2 Solution: filter the image, then subsample Filter size should double for each ½ size reduction. Why?

Subsampling with Gaussian pre-filtering G 1/4G 1/8Gaussian 1/2 Solution: filter the image, then subsample Filter size should double for each ½ size reduction. Why? How can we speed this up?

Compare with... 1/4 (2x zoom) 1/8 (4x zoom) Why does this look so crufty? 1/2

Image resampling (interpolation) So far, we considered only power-of-two subsampling What about arbitrary scale reduction? How can we increase the size of the image? 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 d = 1 in this example

Image resampling So far, we considered only power-of-two subsampling What about arbitrary scale reduction? How can we increase the size of the image? 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 d = 1 in this example

Image resampling So what to do if we don’t know d = 1 in this example Answer: guess an approximation Can be done in a principled way: filtering Image reconstruction Convert to a continuous function Reconstruct by cross-correlation:

Resampling filters What does the 2D version of this hat function look like? Better filters give better resampled images Bicubic is common choice Why not use a Gaussian? What if we don’t want whole f, but just one sample? performs linear interpolation (tent function) performs bilinear interpolation

Bilinear interpolation Smapling at f(x,y):

Image Pyramids Known as a Gaussian Pyramid [Burt and Adelson, 1983] In computer graphics, a mip map [Williams, 1983] A precursor to wavelet transform

A bar in the big images is a hair on the zebra’s nose; in smaller images, a stripe; in the smallest, the animal’s nose Figure from David Forsyth

Gaussian pyramid construction filter mask Repeat Filter Subsample Until minimum resolution reached can specify desired number of levels (e.g., 3-level pyramid) The whole pyramid is only 4/3 the size of the original image!

Laplacian Pyramid Laplacian Pyramid (subband images) Created from Gaussian pyramid by subtraction Gaussian Pyramid

What are they good for? Improve Search Search over translations –Like homework –Classic coarse-to-fine stategy Search over scale –Template matching –E.g. find a face at different scales Precomputation Need to access image at different blur levels Useful for texture mapping at different resolutions (called mip-mapping) Image Processing Editing frequency bands separetly E.g. image blending… next time!