Gaussian Pyramids

advertisement
Today’s Topics 6.1 Gaussian & Laplacian pyramid construc8on 6.2 Applica8ons: image blending, edi8ng, texture synthesis Topic 6: Hierarchical image representa8ons 1.  Gaussian & Laplacian pyramids 2.  Applica8ons: 1.  Mul8-­‐resolu8on image blending 2.  Mul8-­‐resolu8on image edi8ng 3.  Mul8-­‐resolu8on texture synthesis Topic 6.1: Gaussian & Laplacian Pyramids •  The gaussian pyramid (intro) •  The convolu8on opera8on •  Construc8ng the gaussian pyramid •  The REDUCE() func8on •  Construc8ng the Laplacian pyramid •  The EXPAND() func8on The Gaussian Pyramid The Gaussian Pyramid Applica8on: Pyramid Image Blending Horror Photo © prof. dmartin
The Gaussian Pyramid Why is it Called a Pyramid? Idea: Representa8on can be pictured as a “pyramid” of 3x3, 5x5, 9x9,…, (2N+1)x(2N+1) images g
N-1
gN-2
...
g0 (= original image)
...
The Gaussian Pyramid Topic 6.1: Gaussian & Laplacian Pyramids •  The gaussian pyramid (intro) •  The convolu8on opera8on •  Construc8ng the gaussian pyramid •  The REDUCE() func8on •  Construc8ng the Laplacian pyramid •  The EXPAND() func8on Image Smoothing Using Averaging Masks Original Image
Image Smoothing Using Averaging Masks Result of Cross-Correlation with 3x3 Mask
1/9 1/9 1/9
1/9 1/9 1/9
1/9 1/9 1/9
Image Smoothing Using Averaging Masks Result of Cross-Correlation with 5x5 Mask
1/25 1/25 1/25 1/25 1/25
1/25 1/25 1/25 1/25 1/25
1/25 1/25 1/25 1/25 1/25
1/25 1/25 1/25 1/25 1/25
1/25 1/25 1/25 1/25 1/25
Image Smoothing Using Averaging Masks Result of Cross-Correlation with 15x15 Mask
15x15 array of
elements equal
to 1/225
Template Matching (1D) “Sliding window” algorithm for template
matching with template T
•  Define a “pixel window” centered
at pixel (w,r)
•  Compute cross-correlation of T with
patch centered at (w,r)
•  “Slide” window one pixel over, so
that it is centered at pixel (w+1,r)
•  Repeat 1-4 until window reaches
right image border
Image Cross Correla8on ó Matrix Mul8plica8on Image Cross Correla8on ó Matrix Mul8plica8on The Toeplitz Matrix of a Template The Toeplitz Matrix of a Template The Toeplitz Matrix of a Template Cross-­‐Correla8on Expressed as a Sum Cross-­‐Correla8on Expressed as a Sum The Convolu8on Opera8on The Convolu8on Opera8on The Convolu8on Opera8on The Convolu8on Opera8on Topic 6.1: Gaussian & Laplacian Pyramids •  The gaussian pyramid (intro) •  The convolu8on opera8on •  Construc8ng the gaussian pyramid •  The REDUCE() func8on •  Construc8ng the Laplacian pyramid •  The EXPAND() func8on The Gaussian Pyramid The Gaussian Pyramid The Gaussian Pyramid Opera8on #1: Smooth Image at N-­‐1 Scales Opera8on #1: Smooth Image at N-­‐1 Scales Opera8on #1: Smooth Image at N-­‐1 Scales Opera8on #1: Smooth Image at N-­‐1 Scales Opera8on #1: Smooth Image at N-­‐1 Scales Opera8on #1: Smooth Image at N-­‐1 Scales Opera8on #1: Smooth Image at N-­‐1 Scales Opera8on #1: Smooth Image at N-­‐1 Scales Smoothing Filter in 1D: Deriva8on from 4 Criteria Defining the Smoothing Filter in 2D Opera8on #2: Downsample the Smoothed Image Topic 6.1: Gaussian & Laplacian Pyramids •  The gaussian pyramid (intro) •  The convolu8on opera8on •  Construc8ng the gaussian pyramid •  The REDUCE() func8on •  Construc8ng the Laplacian pyramid •  The EXPAND() func8on Opera8ons #1 & #2: The REDUCE() Func8on The REDUCE() func8on ...
The REDUCE() func8on ...
The REDUCE() func8on The Gaussian Pyramid Opera8ons #1 & #2: The REDUCE() Func8on What Does Smoothing Take Away? original
What Does Smoothing Take Away? What Does Smoothing Take Away? Topic 6.1: Gaussian & Laplacian Pyramids •  The gaussian pyramid (intro) •  The convolu8on opera8on •  Construc8ng the gaussian pyramid •  The REDUCE() func8on •  Construc8ng the Laplacian pyramid •  The EXPAND() func8on The Laplacian Pyramid The Laplacian Pyramid The Laplacian Pyramid Opera8on #3: The EXPAND() Func8on The EXPAND() func8on The EXPAND() func8on The Laplacian Pyramid The Laplacian Pyramid The Laplacian Pyramid The Laplacian Pyramid The Laplacian Image Pyramid Idea: Represent gl image by a gl+1 image and a detail image (called the Laplacian Ll image) whose size is equal to the gl image gl
EXPAND(gl+1)
gl-EXPAND(gl+1)
+
=
=
EXPAND()
REDUCE()
Laplacian Ll
gl+1
=
+
The Laplacian Image Pyramid Idea: This decomposi8on can be repeated several 8mes!! gl
Laplacian Ll
gl+1
=
+
The Laplacian Image Pyramid Idea: This decomposi8on can be repeated several 8mes!! gl
Laplacian Ll+1
gl+2
=
+
Laplacian Ll
Transmission using EXPAND 
Download