lecture10
TRANSCRIPT
![Page 1: Lecture10](https://reader031.vdocuments.site/reader031/viewer/2022020207/55627dc3d8b42ad1688b4ada/html5/thumbnails/1.jpg)
CSE486Robert Collins
Lecture 10:Pyramids and Scale Space
![Page 2: Lecture10](https://reader031.vdocuments.site/reader031/viewer/2022020207/55627dc3d8b42ad1688b4ada/html5/thumbnails/2.jpg)
CSE486Robert Collins
Recall
• Cascaded Gaussians– Repeated convolution by a smaller Gaussian
to simulate effects of a larger one.
• G*(G*f) = (G*G)*f [associativity]
![Page 3: Lecture10](https://reader031.vdocuments.site/reader031/viewer/2022020207/55627dc3d8b42ad1688b4ada/html5/thumbnails/3.jpg)
CSE486Robert Collins
Example: Cascaded Convolutions
[1 1] * [1 1] --> [1 2 1][1 1] * [1 2 1] --> [1 3 3 1][1 1] * [1 3 3 1] --> [1 4 6 4 1]..and so on…
1 11 2 1
1 3 3 11 4 6 4 1
1 5 10 10 5 1and so on…
Pascal’s Triangle
![Page 4: Lecture10](https://reader031.vdocuments.site/reader031/viewer/2022020207/55627dc3d8b42ad1688b4ada/html5/thumbnails/4.jpg)
CSE486Robert Collins
Aside: Binomial Approximation
1 11 2 1
1 3 3 11 4 6 4 1
1 5 10 10 5 1and so on…
Pascal’s Triangle
BinomialCoefficients
![Page 5: Lecture10](https://reader031.vdocuments.site/reader031/viewer/2022020207/55627dc3d8b42ad1688b4ada/html5/thumbnails/5.jpg)
CSE486Robert Collins
Aside: Binomial Approximation
Look at odd-length rows of Pascal’s triangle:
1 11 2 1
1 3 3 11 4 6 4 1
1 5 10 10 5 1and so on…
[1 2 1]/4 - approximatesGaussian with sigma=1/sqrt(2)
[1 4 6 4 1]/16 - approximatesGaussian with sigma=1
An easy way to generate integer-coefficientGaussian approximations.
![Page 6: Lecture10](https://reader031.vdocuments.site/reader031/viewer/2022020207/55627dc3d8b42ad1688b4ada/html5/thumbnails/6.jpg)
CSE486Robert Collins
From Homework 2
![Page 7: Lecture10](https://reader031.vdocuments.site/reader031/viewer/2022020207/55627dc3d8b42ad1688b4ada/html5/thumbnails/7.jpg)
CSE486Robert Collins
More about Cascaded Convolutions
Fun facts:The distribution of the sum of two random variablesX + Y is the convolution of their two distributions
Given N i.i.d. random variables, X1 … XN, the distributionof their sum approaches a Gaussian distribution (aka thecentral limit theorem)
Therefore:The repeated convolution of a (nonnegative)filter with itself takes on a Gaussian shape.
(for the mathematically inclined)
![Page 8: Lecture10](https://reader031.vdocuments.site/reader031/viewer/2022020207/55627dc3d8b42ad1688b4ada/html5/thumbnails/8.jpg)
CSE486Robert Collins Gaussian Smoothing at
Different Scales
original sigma = 1
![Page 9: Lecture10](https://reader031.vdocuments.site/reader031/viewer/2022020207/55627dc3d8b42ad1688b4ada/html5/thumbnails/9.jpg)
CSE486Robert Collins
original sigma = 3
Gaussian Smoothing atDifferent Scales
![Page 10: Lecture10](https://reader031.vdocuments.site/reader031/viewer/2022020207/55627dc3d8b42ad1688b4ada/html5/thumbnails/10.jpg)
CSE486Robert Collins Gaussian Smoothing at
Different Scales
original sigma = 10
![Page 11: Lecture10](https://reader031.vdocuments.site/reader031/viewer/2022020207/55627dc3d8b42ad1688b4ada/html5/thumbnails/11.jpg)
CSE486Robert Collins Idea for Today:
Form a Multi-Resolution Representation
original
sigma = 10
sigma = 3
sigma = 1
![Page 12: Lecture10](https://reader031.vdocuments.site/reader031/viewer/2022020207/55627dc3d8b42ad1688b4ada/html5/thumbnails/12.jpg)
CSE486Robert Collins
Pyramid Representations
Because a large amount of smoothing limitsthe frequency of features in the image, we donot need to keep all the pixels around!
Strategy: progressively reduce the number ofpixels as we smooth more and more.
Leads to a “pyramid” representation if wesubsample at each level.
![Page 13: Lecture10](https://reader031.vdocuments.site/reader031/viewer/2022020207/55627dc3d8b42ad1688b4ada/html5/thumbnails/13.jpg)
CSE486Robert Collins
Gaussian Pyramid
• Synthesis: Smooth image with a Gaussian anddownsample. Repeat.
• Gaussian is used because it is self-reproducing(enables incremental smoothing).
• Top levels come “for free”. Processing costtypically dominated by two lowest levels(highest resolution).
![Page 14: Lecture10](https://reader031.vdocuments.site/reader031/viewer/2022020207/55627dc3d8b42ad1688b4ada/html5/thumbnails/14.jpg)
CSE486Robert Collins
Gaussian Pyramid
High res
Lowres
![Page 15: Lecture10](https://reader031.vdocuments.site/reader031/viewer/2022020207/55627dc3d8b42ad1688b4ada/html5/thumbnails/15.jpg)
CSE486Robert Collins Emphasis: Smaller Images
have Lower Resolution
![Page 16: Lecture10](https://reader031.vdocuments.site/reader031/viewer/2022020207/55627dc3d8b42ad1688b4ada/html5/thumbnails/16.jpg)
CSE486Robert Collins
Generating a Gaussian Pyramid
Basic Functions:Blur (convolve with Gaussian to smooth image)
DownSample (reduce image size by half)
Upsample (double image size)
![Page 17: Lecture10](https://reader031.vdocuments.site/reader031/viewer/2022020207/55627dc3d8b42ad1688b4ada/html5/thumbnails/17.jpg)
CSE486Robert Collins
Generating a Gaussian Pyramid
Basic Functions:Blur (convolve with Gaussian to smooth image)
DownSample (reduce image size by half)
Upsample (double image size)
![Page 18: Lecture10](https://reader031.vdocuments.site/reader031/viewer/2022020207/55627dc3d8b42ad1688b4ada/html5/thumbnails/18.jpg)
CSE486Robert Collins
Downsample
By the way: Subsampling is a bad idea unless you have previously blurred/smoothed the image! (because it leads to aliasing)
![Page 19: Lecture10](https://reader031.vdocuments.site/reader031/viewer/2022020207/55627dc3d8b42ad1688b4ada/html5/thumbnails/19.jpg)
CSE486Robert Collins
To Elaborate: Thumbnails
original image262x195
downsampled (left)vs. smoothed then
downsampled (right)
131x97
65x48
32x24
![Page 20: Lecture10](https://reader031.vdocuments.site/reader031/viewer/2022020207/55627dc3d8b42ad1688b4ada/html5/thumbnails/20.jpg)
CSE486Robert Collins
To Elaborate: Thumbnails
original image262x195
131x97
downsampled (left)vs. smoothed then
downsampled (right)
![Page 21: Lecture10](https://reader031.vdocuments.site/reader031/viewer/2022020207/55627dc3d8b42ad1688b4ada/html5/thumbnails/21.jpg)
CSE486Robert Collins
To Elaborate: Thumbnails
original image262x195
downsampled (left)vs. smoothed then
downsampled (right)
65x48
![Page 22: Lecture10](https://reader031.vdocuments.site/reader031/viewer/2022020207/55627dc3d8b42ad1688b4ada/html5/thumbnails/22.jpg)
CSE486Robert Collins
To Elaborate: Thumbnails
original image262x195
downsampled (left)vs. smoothed then
downsampled (right)
32x24
![Page 23: Lecture10](https://reader031.vdocuments.site/reader031/viewer/2022020207/55627dc3d8b42ad1688b4ada/html5/thumbnails/23.jpg)
CSE486Robert Collins
Upsample
How to fill in the empty values?Interpolation:• initially set empty pixels to zero• convolve upsampled image with Gaussian filter! e.g. 5x5 kernel with sigma = 1.• Must also multiply by 4. Explain why.
![Page 24: Lecture10](https://reader031.vdocuments.site/reader031/viewer/2022020207/55627dc3d8b42ad1688b4ada/html5/thumbnails/24.jpg)
CSE486Robert Collins
Specific ExampleFrom Crowley et.al., “Fast Computation of Characteristic Scale using a Half-Octave Pyramid.” Proc International Workshop on Cognitive Vision (CogVis), Zurich, Switzerland, 2002.
General idea: cascaded filtering using [1 4 6 4 1] kernel to generate a pyramid with two images per octave (power of 2 change in resolution). When we reach a full octave, downsample the image.
blur blur
blur blur
downsample
![Page 25: Lecture10](https://reader031.vdocuments.site/reader031/viewer/2022020207/55627dc3d8b42ad1688b4ada/html5/thumbnails/25.jpg)
CSE486Robert Collins
Effective Sigma at Each Level
Crowley etal.
![Page 26: Lecture10](https://reader031.vdocuments.site/reader031/viewer/2022020207/55627dc3d8b42ad1688b4ada/html5/thumbnails/26.jpg)
CSE486Robert Collins
Effective Sigma at Each Level
CAN YOUEXPLAIN HOWTHESE VALUESARISE?
![Page 27: Lecture10](https://reader031.vdocuments.site/reader031/viewer/2022020207/55627dc3d8b42ad1688b4ada/html5/thumbnails/27.jpg)
CSE486Robert Collins
Basic idea: different scales are appropriate for describing differentobjects in the image, and we may not know the correct scale/sizeahead of time.
Concept: Scale Space
![Page 28: Lecture10](https://reader031.vdocuments.site/reader031/viewer/2022020207/55627dc3d8b42ad1688b4ada/html5/thumbnails/28.jpg)
CSE486Robert Collins Example: Detecting “Blobs” at
Different Scales.
But first, we have to talkabout detecting blobsat one scale...
![Page 29: Lecture10](https://reader031.vdocuments.site/reader031/viewer/2022020207/55627dc3d8b42ad1688b4ada/html5/thumbnails/29.jpg)
CSE486Robert Collins