image stitching
Image stitching is the process of combining several overlapping photographs into a single seamless wide-angle image, the panorama you get when your phone tells you to pan slowly across a landscape. The challenge is twofold: first, figure out the geometric transformation that aligns each photo with its neighbours so that the same building corner lands on the same pixel; second, blend the overlapping regions so that no visible seam, brightness jump, or ghost betrays that the result was assembled from pieces. Done well, stitching turns a sequence of narrow views into one coherent scene the camera could never have captured in a single shot.
The alignment half rests on everything in this field. Detect keypoints in each image (SIFT, ORB), describe them, and match descriptors between overlapping pairs with the ratio test. Because many matches are wrong, estimate the geometric relation between each pair robustly with RANSAC. When the camera is rotating about its centre, or the scene is effectively a distant plane, that relation is a homography, so stitching is essentially chaining homographies to bring all images into one common coordinate frame. For multi-image panoramas, a global bundle adjustment then jointly refines all camera orientations to distribute alignment error evenly and avoid drift accumulating around a 360-degree loop.
Before blending, the images are warped onto a common surface. For wide panoramas a flat plane is a poor canvas (it stretches the edges to infinity for fields of view approaching 180 degrees), so the images are projected onto a cylinder or sphere and the panorama is unrolled from that surface; this is why phone panoramas look gently curved. Warping resamples each source image into the panorama's coordinate system using the estimated transforms and interpolation.
The blending half hides the seams. Even well-aligned photos differ in exposure and white balance, so photometric adjustment (gain compensation) first equalizes brightness across images. Then a seam is chosen through the overlap, often along a path that cuts through regions where the images agree (graph-cut seam finding), to avoid slicing through a moving person and creating a ghost. Finally the images are merged with multi-band blending, which combines low spatial frequencies over a wide transition zone and high frequencies over a narrow one, so large brightness differences fade smoothly while fine detail stays crisp. The classic complete system is Brown and Lowe's AutoStitch; modern phone pipelines add motion handling, deghosting, and learned components, but the feature-match, RANSAC-homography, warp, blend skeleton remains.
Stitching with a single homography only works when the camera rotates about its optical centre or the scene is planar. If you walk sideways while shooting a 3D scene, parallax makes near and far objects move by different amounts, no homography can align both, and you get ghosting. The fix is either rotate-in-place capture or full 3D / multi-plane methods.