Top Banner
59

Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Apr 14, 2018

Download

Documents

trinhngoc
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear
Page 2: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Today

Page 3: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Reading

• Related to today’s lecture: – Adelson article on pyramid representations,

posted on web site.– Farid paper posted on web site.

Page 4: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Image pyramids

• Gaussian• Laplacian• Wavelet/QMF• Steerable pyramid

Page 5: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Steerable pyramids

• Good:– Oriented subbands– Non-aliased subbands– Steerable filters

• Bad:– Overcomplete– Have one high frequency residual subband, required in

order to form a circular region of analysis in frequency from a square region of support in frequency.

Page 6: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Oriented pyramids

• Laplacian pyramid is orientation independent

• Apply an oriented filter to determine orientations at each layer– by clever filter design, we can simplify

synthesis– this represents image information at a particular

scale and orientation

Page 7: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear
Page 8: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Simoncelli and Freeman, ICIP 1995http://www.cns.nyu.edu/ftp/eero/simoncelli95b.pdf

Page 9: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

But we need to get rid of the corner regions before starting the recursive circular filtering

Simoncelli and Freeman, ICIP 1995http://www.cns.nyu.edu/ftp/eero/simoncelli95b.pdf

Page 10: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Reprinted from “Shiftable MultiScale Transforms,” by Simoncelli et al., IEEE Transactionson Information Theory, 1992, copyright 1992, IEEE

Page 11: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

• Summary of pyramid representations

Page 12: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Image pyramids

Shows the information added in Gaussian pyramid at each spatial scale. Useful for noise reduction & coding.

Progressively blurred and subsampled versions of the image. Adds scale invariance to fixed-size algorithms.

Shows components at each scale and orientation separately. Non-aliased subbands. Good for texture and feature analysis.

Bandpassed representation, complete, but with aliasing and some non-oriented subbands.

• Gaussian

• Laplacian

• Wavelet/QMF

• Steerable pyramid

Page 13: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Linear image transformations

• In analyzing images, it’s often useful to make a change of basis.

Fourier transform, orWavelet transform, or

Steerable pyramid transform

fUFrr

=transformed image

Vectorized image

Page 14: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Schematic pictures of each matrix transform

• Shown for 1-d images• The matrices for 2-d images are the same

idea, but more complicated, to account for vertical, as well as horizontal, neighbor relationships.

Page 15: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Fourier transform

= *

Fourier transform

Fourier bases are global: each transform coefficient depends on all pixel locations.

pixel domain image

Page 16: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Gaussian pyramid

= *pixel image

Overcomplete representation. Low-pass filters, sampled appropriately for their blur.

Gaussian pyramid

Page 17: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Laplacian pyramid

= *Laplacian

pyramidpixel image

Overcomplete representation. Transformed pixels represent bandpassed image information.

Page 18: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Wavelet (QMF) transform

Wavelet pyramid = *

Ortho-normal transform (like Fourier transform), but with localized basis functions.

pixel image

Page 19: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

= *Steerablepyramid

pixel image

Over-complete representation, but non-aliased subbands.

Multiple orientations at

one scale

Multiple orientations at the next scale

the next scale…

Steerable pyramid

Page 20: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Matlab resources for pyramids (with tutorial)http://www.cns.nyu.edu/~eero/software.html

Page 21: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Why use these representations?

• Handle real-world size variations with a constant-size vision algorithm.

• Remove noise• Analyze texture• Recognize objects• Label image features

Page 22: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

An application of image pyramids:noise removal

Page 23: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Image statistics (or, mathematically, how can you tell image from noise?)

Page 24: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear
Page 25: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Pixel representation image histogram

Page 26: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

bandpass filtered image

Page 27: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

bandpassed representation image histogram

Page 28: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Pixel domain noise image and histogram

Page 29: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Bandpass domain noise image and histogram

Page 30: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Noise-corrupted full-freq and bandpass images

Page 31: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Bayes theorem

P(x, y) = P(x|y) P(y)soP(x|y) P(y) = P(y|x) P(x)

P(x, y) = P(x|y) P(y)soP(x|y) P(y) = P(y|x) P(x)

P(x, y) = P(x|y) P(y)

andP(x|y) = P(y|x) P(x) / P(y)

The parameters you want to estimate

What you observe Prior probability

Likelihood function

Constant w.r.t. parameters x.

Page 32: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

P(x)

Bayesian MAP estimator for clean bandpasscoefficient values

Let x = bandpassed image value before adding noise.Let y = noise-corrupted observation.

By Bayes theorem

P(x|y) = k P(y|x) P(x)

P(y|x)

y

P(y|x)

P(x|y)P(x|y)

Page 33: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

P(x)

Let x = bandpassed image value before adding noise.Let y = noise-corrupted observation.

By Bayes theorem

P(x|y) = k P(y|x) P(x)

P(y|x)

Bayesian MAP estimator

y

P(y|x)

P(x|y)P(x|y)

Page 34: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

P(x)

Let x = bandpassed image value before adding noise.Let y = noise-corrupted observation.

By Bayes theorem

P(x|y) = k P(y|x) P(x)

P(y|x)

Bayesian MAP estimator

y

P(y|x)

P(x|y)

P(x|y)

Page 35: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

MAP estimate, , as function of observed coefficient value, y

y

http://www-bcs.mit.edu/people/adelson/pub_pdfs/simoncelli_noise.pdfSimoncelli and Adelson, Noise Removal via Bayesian Wavelet Coring

Page 36: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Noise removal results

http://www-bcs.mit.edu/people/adelson/pub_pdfs/simoncelli_noise.pdfSimoncelli and Adelson, Noise Removal via Bayesian Wavelet Coring

Page 37: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Insert hany farid slides

Page 38: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Non-linear filtering example

Page 39: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Median filterReplace each pixel by the median over N pixels (5 pixels, for these examples). Generalizes to “rank order” filters.

Spike noise is removed

In: Out:

5-pixel neighborhood

Monotonic edges remain unchanged

Out:In:

Page 40: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Degraded image

Page 41: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Radius 1 median filter

Page 42: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Radius 2 median filter

Page 43: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

CCD color sampling

Page 44: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Color sensing, 3 approaches

• Scan 3 times (temporal multiplexing)• Use 3 detectors (3-ccd camera, and color

film)• Use offset color samples (spatial

multiplexing)

Page 45: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Typical errors in temporal multiplexing approach

• Color offset fringes

Page 46: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Typical errors in spatial multiplexing approach.

• Color fringes.

Page 47: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

CCD color filter pattern

detector

Page 48: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

The cause of color moire

detector

Fine black and white detail in imagemis-interpreted as color information.

Page 49: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Black and white edge falling on color CCD detector

Black and white image (edge)

Detector pixel colors

Page 50: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Color sampling artifact

Interpolated pixel colors, for grey edge falling on coloreddetectors (linear interpolation).

Page 51: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Typical color moire patterns

Blow-up of electronic cameraimage. Notice spuriouscolors in the regionsof fine detail in the plants.

Page 52: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Color sampling artifacts

Page 53: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Human Photoreceptors

(From Foundations of Vision, by Brian Wandell, Sinauer Assoc.)

Page 54: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Brewster’s colors example (subtle).

Scale relativeto humanphotoreceptorsize: each linecovers about 7photoreceptors.

Page 55: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Median Filter Interpolation

• Perform first interpolation on isolated color channels.

• Compute color difference signals.• Median filter the color difference signal.• Reconstruct the 3-color image.

Page 56: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Two-color sampling of BW edge

Sampled data

Linear interpolation

Color difference signal

Median filtered color difference signal

Page 57: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

R-G, after linear interpolation

Page 58: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

R – G, median filtered (5x5)

Page 59: Computer vision class, fast-forward - …courses.csail.mit.edu/6.869/lectnotes/lect4/lect4-slides.pdfpixel domain image. Gaussian pyramid = * ... Bayesian Wavelet Coring. ... (linear

Recombining the median filtered colors

Linear interpolation Median filter interpolation