# Image Blending
## Feathering
Do a gradual transition between the images. However, you still might have some artefacts
![[feathering.jpg]]
How do decide good window size?
- Smooth but not ghosted
- Empirical evaluation
![[feathering-optimal.jpg]]
## Multi-band Pyramid blending
Idea is to create a Laplacian pyramid, blend each level, like [[Scale-Invariant Feature Transform (SIFT)]]
1. Compute Laplacian pyramid
2. Compute Gaussian pyramid on _weight_ image
3. Blend Laplacians using Gaussian blurred weights
- At low frequencies, blend slowly
- At high frequencies, blend quickly
4. Reconstruct the final image
![[laplacian pyramid.jpg]]
Blending at different scales
![[blend-laplacian.jpg]]
Result:
![[pyramidblending-result.jpg]]
## Choosing seams
### Planar Blending (Simple method)
- Assign each pixel to image with nearest center
- Create a mask:
- Smooth boundaries ( "feathering"):
- Composite
![[planar-blending.jpg]]
### Dynamic program method
- We dont want hard boundaries around images
- Object recognition based
![[dynamic porgram blending.jpg]]
## Gain compensation
Simple gain adjustment
- Compute average RGB intensity of each image in overlapping region
- Normalize intensities by ratio of averages
- Still might have artefacts, can apply laplacian blending
![[gain-compensation.jpg]]
## De-Ghosting
![[deghosting.jpg]]
---
## References