Subsampling and image pyramids

Similar documents
Image pyramids and frequency domain

Fourier Transform and Frequency Domain

6.869 Advances in Computer Vision. Bill Freeman, Antonio Torralba and Phillip Isola MIT Oct. 3, 2018

Fourier Transform and Frequency Domain

Gradient-domain image processing

Image Filtering. Slides, adapted from. Steve Seitz and Rick Szeliski, U.Washington

Templates, Image Pyramids, and Filter Banks

CEE598 - Visual Sensing for Civil Infrastructure Eng. & Mgmt.

Frequency2: Sampling and Aliasing

CS 4495 Computer Vision. Frequency and Fourier Transforms. Aaron Bobick School of Interactive Computing. Frequency and Fourier Transform

Thinking in Frequency

ECE Digital Image Processing and Introduction to Computer Vision

Images have structure at various scales

Why does a lower resolution image still make sense to us? What do we lose? Image:

Lecture 3: Linear Filters

Lecture 3: Linear Filters

CITS 4402 Computer Vision

Recap of Monday. Linear filtering. Be aware of details for filter size, extrapolation, cropping

SCALE-SPACE - Theory and Applications

Computer Vision Lecture 3

Multiresolution image processing

Frequency Filtering CSC 767

The Frequency Domain, without tears. Many slides borrowed from Steve Seitz

CSE 473/573 Computer Vision and Image Processing (CVIP)

Computational Photography

Wavelets and Multiresolution Processing

Introduction to Linear Image Processing

Slow mo guys Saccades.

6.003: Signals and Systems. Sampling and Quantization

Reprinted from Proceedings of the Pattern Recognition and Information Processing Conference (pp ), Dallas, TX (1981).

I Chen Lin, Assistant Professor Dept. of CS, National Chiao Tung University. Computer Vision: 4. Filtering

Additional Pointers. Introduction to Computer Vision. Convolution. Area operations: Linear filtering

CS Sampling and Aliasing. Analog vs Digital

Multiscale Image Transforms

Edges and Scale. Image Features. Detecting edges. Origin of Edges. Solution: smooth first. Effects of noise

Filtering, Frequency, and Edges

Multiresolution schemes

Lecture 16: Multiresolution Image Analysis

A new class of morphological pyramids for multiresolution image analysis

Multiresolution schemes

E27 SPRING 2015 ZUCKER PROJECT 2 LAPLACIAN PYRAMIDS AND IMAGE BLENDING

Fast Local Laplacian Filters: Theory and Applications

Face recognition Computer Vision Spring 2018, Lecture 21

ESE 531: Digital Signal Processing

Lecture 04 Image Filtering

ECG782: Multidimensional Digital Signal Processing

Missing Data Interpolation with Gaussian Pyramids

ECE 634: Digital Video Systems Wavelets: 2/21/17

Computer Vision Lecture 3

Image Stitching II. Linda Shapiro CSE 455

Image Stitching II. Linda Shapiro EE/CSE 576

The Frequency Domain : Computational Photography Alexei Efros, CMU, Fall Many slides borrowed from Steve Seitz

Efficient Inference in Fully Connected CRFs with Gaussian Edge Potentials

CS 3710: Visual Recognition Describing Images with Features. Adriana Kovashka Department of Computer Science January 8, 2015

The Frequency Domain. Many slides borrowed from Steve Seitz

Multimedia Databases. Previous Lecture. 4.1 Multiresolution Analysis. 4 Shape-based Features. 4.1 Multiresolution Analysis

Image preprocessing in spatial domain

Multimedia Databases. Wolf-Tilo Balke Philipp Wille Institut für Informationssysteme Technische Universität Braunschweig

Evolution of Uncorrelated and Correlated Noise in Gaussian and Laplacian Image Pyramids

Problem with Fourier. Wavelets: a preview. Fourier Gabor Wavelet. Gabor s proposal. in the transform domain. Sinusoid with a small discontinuity

Wavelets: a preview. February 6, 2003 Acknowledgements: Material compiled from the MATLAB Wavelet Toolbox UG.

CSCI 1290: Comp Photo

Digital Image Processing

Homework: 4.50 & 4.51 of the attachment Tutorial Problems: 7.41, 7.44, 7.47, Signals & Systems Sampling P1

ESE 531: Digital Signal Processing

Wavelet Decomposition in Laplacian Pyramid for Image Fusion

Image Processing /6.865 Frédo Durand A bunch of slides by Bill Freeman (MIT) & Alyosha Efros (CMU)

Blobs & Scale Invariance

Vlad Estivill-Castro (2016) Robots for People --- A project for intelligent integrated systems

Antonio Torralba, Lecture 6 Pyramids. Learned feedforward visual processing

Linear Diffusion and Image Processing. Outline

February 17, Simplex Method Continued

2D Wavelets. Hints on advanced Concepts

Multimedia Databases. 4 Shape-based Features. 4.1 Multiresolution Analysis. 4.1 Multiresolution Analysis. 4.1 Multiresolution Analysis

Lecture 7: Edge Detection

Lecture 8: Interest Point Detection. Saad J Bedros

Lecture 18: The Rank of a Matrix and Consistency of Linear Systems

Announcements August 31

Multimedia Networking ECE 599

Digital Image Processing: Sharpening Filtering in Spatial Domain CSC Biomedical Imaging and Analysis Dr. Kazunori Okada

Image Filtering, Edges and Image Representation

A Friendly Guide to the Frame Theory. and Its Application to Signal Processing

Linear Operators and Fourier Transform

3. Lecture. Fourier Transformation Sampling

ESE 531: Digital Signal Processing

Edge Detection. Introduction to Computer Vision. Useful Mathematics Funcs. The bad news

CHAPTER 1: MATTER AND CHANGE. Chemistry 1-2 Mr. Chumbley

Image Alignment and Mosaicing

ECG782: Multidimensional Digital Signal Processing

Module 4. Multi-Resolution Analysis. Version 2 ECE IIT, Kharagpur

Image Processing in Astrophysics

Feature extraction: Corners and blobs

CS 188: Artificial Intelligence Spring Announcements

Intelligent Visual Prosthesis

Efficient Inference in Fully Connected CRFs with Gaussian Edge Potentials

Scale-space image processing

COMPLEX WAVELET TRANSFORM IN SIGNAL AND IMAGE ANALYSIS

SIGNAL COMPRESSION. 8. Lossy image compression: Principle of embedding

Quality Improves with More Rays

Transcription:

Subsampling and image pyramids http://www.cs.cmu.edu/~16385/ 16-385 Computer Vision Spring 2018, Lecture 3

Course announcements Homework 0 and homework 1 will be posted tonight. - Homework 0 is not required and is not graded! - Homework 1 is due on February 7 th at midnight. Course website updated. - Syllabus slightly updated. - Added homework schedule. - Note homework 4 that spans spring break.

Overview of today s lecture Image downsampling. Aliasing. Gaussian image pyramid. Laplacian image pyramid.

Slide credits Most of these slides were adapted directly from: Kris Kitani (15-463, Fall 2016). Some slides were inspired or taken from: Fredo Durand (MIT). Bernd Girod (Stanford University). James Hays (Georgia Tech). Steve Marschner (Cornell University). Steve Seitz (University of Washington).

Image downsampling

This image is too big to fit on the screen. How would you reduce it to half its size?

Naïve image downsampling Throw away half the rows and columns delete even rows delete even columns delete even rows delete even columns 1/8 1/4 1/2 What is the problem with this approach?

Naïve image downsampling 1/2 1/4 (2x zoom) 1/8 (4x zoom) What is the 1/8 image so pixelated (and do you know what this effect is called)?

Aliasing

Reminder Images are a discrete, or sampled, representation of a continuous world

Sampling Very simple example: a sine wave How would you discretize this signal?

Very simple example: a sine wave Sampling

Sampling Very simple example: a sine wave How many samples should I take? Can I take as many samples as I want?

Sampling Very simple example: a sine wave How many samples should I take? Can I take as few samples as I want?

Undersampling Very simple example: a sine wave Unsurprising effect: information is lost.

Undersampling Very simple example: a sine wave Unsurprising effect: information is lost. Surprising effect: can confuse the signal with one of lower frequency.

Undersampling Very simple example: a sine wave Unsurprising effect: information is lost. Surprising effect: can confuse the signal with one of lower frequency. Note: we could always confuse the signal with one of higher frequency.

Aliasing Fancy term for: Undersampling can disguise a signal as one of a lower frequency Unsurprising effect: information is lost. Surprising effect: can confuse the signal with one of lower frequency. Note: we could always confuse the signal with one of higher frequency.

Aliasing in textures

This is also known as moire Aliasing in photographs

Temporal aliasing

Temporal aliasing

Temporal aliasing

How would you deal with aliasing? Anti-aliasing

Anti-aliasing How would you deal with aliasing? Approach 1: Oversample the signal

Anti-aliasing in textures aliasing artifacts anti-aliasing by oversampling

Anti-aliasing How would you deal with aliasing? Approach 1: Oversample the signal Approach 2: Smooth the signal Remove some of the detail effects that cause aliasing. Lose information, but better than aliasing artifacts. How would you smooth a signal?

Better image downsampling Apply a smoothing filter first, then throw away half the rows and columns Gaussian filter delete even rows delete even columns Gaussian filter delete even rows delete even columns 1/8 1/4 1/2

Better image downsampling 1/2 1/4 (2x zoom) 1/8 (4x zoom)

Naïve image downsampling 1/2 1/4 (2x zoom) 1/8 (4x zoom)

Anti-aliasing Question 1: How much smoothing do I need to do to avoid aliasing? Question 2: How many samples do I need to take to avoid aliasing? Answer to both: Enough to reach the Nyquist limit. We ll see what this means soon.

Gaussian image pyramid

Gaussian image pyramid The name of this sequence of subsampled images

Constructing a Gaussian pyramid Algorithm repeat: filter subsample until min resolution reached sample filter sample filter sample Question: How much bigger than the original image is the whole pyramid?

Constructing a Gaussian pyramid Algorithm repeat: filter subsample until min resolution reached sample filter sample filter sample Question: How much bigger than the original image is the whole pyramid? Answer: Just 4/3 times the size of the original image! (How did I come up with this number?)

Some properties of the Gaussian pyramid What happens to the details of the image?

Some properties of the Gaussian pyramid What happens to the details of the image? They get smoothed out as we move to higher levels. What is preserved at the higher levels?

Some properties of the Gaussian pyramid What happens to the details of the image? They get smoothed out as we move to higher levels. What is preserved at the higher levels? Mostly large uniform regions in the original image. How would you reconstruct the original image from the image at the upper level?

Some properties of the Gaussian pyramid What happens to the details of the image? They get smoothed out as we move to higher levels. What is preserved at the higher levels? Mostly large uniform regions in the original image. How would you reconstruct the original image from the image at the upper level? That s not possible.

Blurring is lossy - = level 0 level 1 (before downsampling) residual What does the residual look like?

Blurring is lossy - = level 0 level 1 (before downsampling) residual Can we make a pyramid that is lossless?

Laplacian image pyramid

Laplacian image pyramid At each level, retain the residuals instead of the blurred images themselves. Can we reconstruct the original image using the pyramid?

Laplacian image pyramid At each level, retain the residuals instead of the blurred images themselves. Can we reconstruct the original image using the pyramid? Yes we can! What do we need to store to be able to reconstruct the original image?

Let s start by looking at just one level = + level 0 level 1 (upsampled) residual Does this mean we need to store both residuals and the blurred copies of the original?

Constructing a Laplacian pyramid Algorithm repeat: filter compute residual subsample until min resolution reached

Constructing a Laplacian pyramid What is this part? Algorithm repeat: filter compute residual subsample until min resolution reached

Constructing a Laplacian pyramid It s a Gaussian pyramid. Algorithm repeat: filter compute residual subsample until min resolution reached

What do we need to construct the original image?

What do we need to construct the original image? (1) residuals

What do we need to construct the original image? (2) smallest image (1) residuals

Reconstructing the original image repeat: Algorithm upsample sum with residual until orig resolution reached

Gaussian vs Laplacian Pyramid Shown in opposite order for space. Which one takes more space to store?

Why is it called a Laplacian pyramid?

Reminder: Laplacian of Gaussian (LoG) filter As with derivative, we can combine Laplace filtering with Gaussian filtering input Laplacian of Gaussian output zero crossings at edges

Why is it called a Laplacian pyramid? - = - unit Gaussian Laplacian Difference of Gaussians approximates the Laplacian

Why Reagan?

Why Reagan? Ronald Reagan was President when the Laplacian pyramid was invented The Laplacian Pyramid as a Compact Image Code (1983) Peter J. Burt, Edward H. Adelson

Still used extensively

Still used extensively input image foreground details enhanced, background details reduced user-provided mask

Other types of pyramids Steerable pyramid: At each level keep multiple versions, one for each direction. Wavelets: Huge area in image processing (see 18-793).

What are image pyramids used for? image compression multi-scale texture mapping image blending focal stack compositing denoising multi-scale detection multi-scale registration

References Basic reading: Szeliski textbook, Sections 3.5 Additional reading: Burt and Adelson, The Laplacian Pyramid as a Compact Image Code, IEEE ToC 1983. the original Laplacian pyramid paper