![Page 1: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/1.jpg)
Image Processing – lesson 8
Quad Trees
Gaussian pyramids
Laplacian Pyramids
Wavelet Pyramids
Applications
Image Representation
![Page 2: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/2.jpg)
Quad Trees
Quad tree image representation = a tree representationwhich represents recursive subdivisions of an image.
Quad tree representation of an imageExample:
![Page 3: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/3.jpg)
Quad Tree representation
Image
1 2
3 41 2 3 4
![Page 4: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/4.jpg)
Quad Tree Applications:
• Compression
• Segmentation (Split & Merge)
• Smoothing
• Binary Image Operations (“And” “Or” “Not”)
![Page 5: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/5.jpg)
Quad Tree Representation - Example
![Page 6: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/6.jpg)
Quad Tree Representation - Example
![Page 7: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/7.jpg)
Quad Tree Representation
Original
Thresh = 0.20
Thresh = 0.40
Thresh = 0.55
![Page 8: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/8.jpg)
“Not”
“And”
“And”
Binary Operations Using Quad Trees
“And”
= 1 = 0
![Page 9: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/9.jpg)
Image Pyramids
Image features at different scales require filters at different scales.
f(x)
f (x)
Edges (derivatives):
Objects (correlation):
![Page 10: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/10.jpg)
Image Pyramids
Image Pyramid = Hierarchical representation of an image
Image Pyramid = A collection of images at different resolutions.
Low Resolution
High Resolution
Details in image -low+high frequencies
No details in image -(blurred image)low frequencies
![Page 11: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/11.jpg)
Image Pyramid
High resolution
Low resolution
![Page 12: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/12.jpg)
Image Pyramid Frequency Domain
High resolution
Low resolution
![Page 13: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/13.jpg)
*
= =
Image Blurring = low pass filtering
![Page 14: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/14.jpg)
*
*
*
=
=
=
![Page 15: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/15.jpg)
Image Pyramid
High resolution
Low resolution
![Page 16: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/16.jpg)
Level 02n X 2n
Level 12n-1 X 2n-1
Level M1 X 1
Gaussian Pyramid
w2 w3w1w0 w4
w2 w3w1w0 w4
![Page 17: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/17.jpg)
a bbc c
a bbc c
Gaussian Pyramid
Burt & Adelson (1981)
Normalized: Σwi = 1
Symmetry: wi = w-i
Unimodal: wi ≥ wj for 0 < i < j
Equal Contribution: for all j Σwj+2i = constant
a + 2b + 2c = 1a + 2c = 2b
a > 0.25b = 0.25c = 0.25 - a/2
![Page 18: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/18.jpg)
For a = 0.4 most similar to a Gauusian filter
g = [0.05 0.25 0.4 0.25 0.05]
low_pass_filter = g * g' =
0.0025 0.0125 0.0200 0.0125 0.00250.0125 0.0625 0.1000 0.0625 0.01250.0200 0.1000 0.1600 0.1000 0.02000.0125 0.0625 0.1000 0.0625 0.01250.0025 0.0125 0.0200 0.0125 0.0025
12
34
5
1
2
3
4
50
0.05
0.1
0.15
0.2
![Page 19: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/19.jpg)
search
search
search
search
Hierarchical Pattern Matching
![Page 20: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/20.jpg)
image pattern correlation
Pattern matching using Pyramids - Example
![Page 21: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/21.jpg)
Gaussian Pyramid -Computational Aspects
Memory:
2NX2N (1 + 1/4 + 1/16 + ... ) = 2NX2N * 4/3
Computation:
Level i can be computed with a single convolutionwith filter: hi = g * g * g * .....
i times
g g
h2 = * =
Example:
![Page 22: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/22.jpg)
Laplacian Pyramid
Compression -compression rates are higher for predictable values.e.g. values around 0.
G0, G1, .... = the levels of a Gaussian Pyramid.
Predict level Gl from level Gl+1 by Expanding Gl+1 to obtain G’l
Gl
Gl+1
Reduce
G’l
Expand
Denote by Ll the error in prediction:
Ll = Gl - G’l
L0, L1, .... = the levels of a Laplacian Pyramid.
![Page 23: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/23.jpg)
expand
-
expand
expand
-
- =
=
=
Gaussian Pyramid
LaplacianPyramid
Laplacian Pyramid
![Page 24: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/24.jpg)
Laplacian Pyramid - Example
![Page 25: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/25.jpg)
Laplacian Pyramid -No scaling
![Page 26: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/26.jpg)
Gaussian Pyramid
LaplacianPyramid
Fourier Fourier
![Page 27: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/27.jpg)
LaplacianPyramid
+
+
+ =
=
=
Reconstruction of the original image from the Laplacian Pyramid
expand
expand
= Original Image
expand
![Page 28: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/28.jpg)
Laplacian Pyramid -Computational Aspects
Memory:
2NX2N (1 + 1/4 + 1/16 + ... ) = 2NX2N * 4/3
Computation:
However coefficients are highly compressable.
Li can be computed from G0 with a single convolutionwith filter: ki = hi-1 - hi
hi-1 hi
- =
ki
k1 k2 k3
![Page 29: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/29.jpg)
Multiresolution Spline
High Frequencies
Middle Frequencies
Low Frequencies
When splining two images, transition from one image tothe other should behave:
![Page 30: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/30.jpg)
Fourier Space
Wavelet Decomposition
![Page 31: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/31.jpg)
Wavelet Transform - Example
![Page 32: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/32.jpg)
Wavelet Transform - Example
![Page 33: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/33.jpg)
Wavelet Transform - Example
![Page 34: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/34.jpg)
Image Pyramids - Comparison
Fourier Not localized in spaceLocalized in Frequency
GaussianPyramid
Localized in spaceNot localized in Frequency
Wavelet Pyramid
Localized in spaceLocalized in Frequency
Transform Basis Characteristics
Gaussian Filters
Sines+Cosines
LaplacianPyramid
Laplacian Filters
Localized in spaceNot localized in Frequency
Wavelet Filters
Frequency
![Page 35: Image Representation - University of Haifacs.haifa.ac.il/~dkeren/ip/lecture8.pdf · Image Pyramids Image Pyramid = Hierarchical representation of an image Image Pyramid = A collection](https://reader034.vdocuments.net/reader034/viewer/2022042311/5eda0f25b3745412b570b039/html5/thumbnails/35.jpg)
Image Pyramids - Comparison
Image pyramid levels = Filter then sample.
Filters:
Gaussian Pyramid
Laplacian Pyramid
Wavelet Pyramid