# Image Warping
![[warping.jpg]]
Source Image: Image to be used as the reference. The geometry of this image is no changed
Target Image: this image is obtained by transforming the reference image.
$(\mathrm{x}, \mathrm{y})$ : coordinates of points in the reference image
$\left(\mathrm{x}^{\prime}, \mathrm{y}^{\prime}\right):$ (or $\left.[\mathrm{u}, \mathrm{v}]\right)$ coordinates of points in the target image
Control points: Unique points in the reference and target images. The coordinates of corresponding control points in images are used to determine a transformation function.
## Types of Image Warping
Simple geometric transformations:
- Rotation; Similarity, Affine mapping, Projective mapping
Other general types of transformations free-form deformation
- If we can't do linear operations globally, we divide images into patches and do linear operations on those patches to approximate global operations
## Forward Warping
![[forward-warping.jpg]]
What if transformed pixed is located between pixels (i.e. non-integer)?
- Splatting: Distribute color among neighboring pixels
How to handle holes in reconstruction?
- Naive: copy closest pixel values
- Inverse Warping
## Inverse Warping
![[inverse warping.jpg]]
What if pixel comes from "between" two pixels?
- Interpolate color values from neighboring pixels
Which is better, inverse or forward?
- Usually inverse, as it eliminates holes. However it requires an invertible wrap function, which isn't always possible.
## Applications
- texture mapping
- image processing (rotation, zoom in/out, etc)
- image morphing/blending
- image mosaic (stitching)
- image based-modeling and rendering
---
## References