14
Lecture 2.3 – Image Processing Laplace blending Idar Dyrdal

Lecture 2.3 – Image Processing Laplace blending · Blur Down. Blur . Blur . sample Downsample . Downsample . Laplacian pyramid . 7 - - - Laplacian pyramid . 8 . Image blending

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Lecture 2.3 – Image Processing Laplace blending · Blur Down. Blur . Blur . sample Downsample . Downsample . Laplacian pyramid . 7 - - - Laplacian pyramid . 8 . Image blending

Lecture 2.3 – Image Processing Laplace blending

Idar Dyrdal

Page 2: Lecture 2.3 – Image Processing Laplace blending · Blur Down. Blur . Blur . sample Downsample . Downsample . Laplacian pyramid . 7 - - - Laplacian pyramid . 8 . Image blending

Pyramids

• Downsampling (decimation) • Upsampling (interpolation) • Pyramids

– Gaussan Pyramids – Laplacian Pyramids

• Applications

– Template matching (object detection) – Detecting stable points of interest – Image Registration – Compression – Image Blending – …

2

(Cmglee)

Page 3: Lecture 2.3 – Image Processing Laplace blending · Blur Down. Blur . Blur . sample Downsample . Downsample . Laplacian pyramid . 7 - - - Laplacian pyramid . 8 . Image blending

Edge detection filters

3

Gaussian (low-pass) Derivative of Gaussian Laplacian of Gaussian (high-pass)

Laplacian operator:

Page 4: Lecture 2.3 – Image Processing Laplace blending · Blur Down. Blur . Blur . sample Downsample . Downsample . Laplacian pyramid . 7 - - - Laplacian pyramid . 8 . Image blending

Laplacian filter

Gaussian Unit impulse Laplacian of Gaussian

(Source: Lazebnik)

Page 5: Lecture 2.3 – Image Processing Laplace blending · Blur Down. Blur . Blur . sample Downsample . Downsample . Laplacian pyramid . 7 - - - Laplacian pyramid . 8 . Image blending

Laplace of Gaussian

- =

Page 6: Lecture 2.3 – Image Processing Laplace blending · Blur Down. Blur . Blur . sample Downsample . Downsample . Laplacian pyramid . 7 - - - Laplacian pyramid . 8 . Image blending

Gaussian Pyramid

6

Blur

Blur

Blur

Downsample Downsample

Downsample

Page 7: Lecture 2.3 – Image Processing Laplace blending · Blur Down. Blur . Blur . sample Downsample . Downsample . Laplacian pyramid . 7 - - - Laplacian pyramid . 8 . Image blending

Laplacian pyramid

7

- -

-

Page 8: Lecture 2.3 – Image Processing Laplace blending · Blur Down. Blur . Blur . sample Downsample . Downsample . Laplacian pyramid . 7 - - - Laplacian pyramid . 8 . Image blending

Laplacian pyramid

8

Page 9: Lecture 2.3 – Image Processing Laplace blending · Blur Down. Blur . Blur . sample Downsample . Downsample . Laplacian pyramid . 7 - - - Laplacian pyramid . 8 . Image blending

Image blending

9

Page 10: Lecture 2.3 – Image Processing Laplace blending · Blur Down. Blur . Blur . sample Downsample . Downsample . Laplacian pyramid . 7 - - - Laplacian pyramid . 8 . Image blending

Blending based on Laplacian pyramids

10

Steps:

1. Choose img1 and img2 and crop/resize to the same size

2. Chose a region mask of the same size

3. Create Laplacian pyramid for img1 and img2 1. Create Gaussian pyramid for img1 and img2 2. Create Laplacian pyramids from Gaussian pyramids

4. Create Gaussian pyramid for the region mask

5. Blend the two Laplacian pyramids using the mask’s Gaussian pyramid to weight the two images at

each level of the pyramid

6. Collapse the resulting Laplacian pyramid to reveal the blended image.

Page 11: Lecture 2.3 – Image Processing Laplace blending · Blur Down. Blur . Blur . sample Downsample . Downsample . Laplacian pyramid . 7 - - - Laplacian pyramid . 8 . Image blending

Image blending with Laplacian pyramids

Weighted sum for each level of the pyramid

∗ + ∗ =

L Laplacian

blend

L1 Laplacian of img 1

G Gaussian of mask

L2 Laplacian of img 2

1-G

Page 12: Lecture 2.3 – Image Processing Laplace blending · Blur Down. Blur . Blur . sample Downsample . Downsample . Laplacian pyramid . 7 - - - Laplacian pyramid . 8 . Image blending

Image blending - example

12

Page 13: Lecture 2.3 – Image Processing Laplace blending · Blur Down. Blur . Blur . sample Downsample . Downsample . Laplacian pyramid . 7 - - - Laplacian pyramid . 8 . Image blending

Image blending - example

13

Mask Result

Page 14: Lecture 2.3 – Image Processing Laplace blending · Blur Down. Blur . Blur . sample Downsample . Downsample . Laplacian pyramid . 7 - - - Laplacian pyramid . 8 . Image blending

Summary

Laplacian Pyramids: • Laplacian filter • Laplacian pyramid • Image blending

Read also: Szeliski 3.5

14