One Warp, Two Conditions
A homography is a non-singular 3x3 matrix with 8 degrees of freedom, mapping every point of one image onto its corresponding point in another. The map is exact under exactly two physical conditions: the scene is a planar surface viewed by two cameras, or the camera's motion between the two shots is a pure rotation about its optical center with no translation. Either condition collapses the three-dimensional geometry of the scene into a single flat mapping that one matrix represents completely.
Neither condition holds for an ordinary hand-held photograph. A photographer who steps sideways, or simply shifts weight between two exposures, translates the camera through a three-dimensional scene. That translation creates parallax, and the resulting camera motion routinely violates both the planar and the rotation assumption at once.
The consequence shows up directly in the stitched output. A single global homography, fit to the whole set of correspondences between two images, aligns the parts of the scene closest to its assumptions and leaves visible tears where the two images fail to register and ghosts where the same content appears twice. Every fix that follows changes how many homographies a stitcher is willing to use, not what a homography is.
Two Planes, One Blend
Spatially varying image stitching replaces the single homography with a warp that changes across the image, and Gao's 2011 method, Gao Dual-Homography Stitching, is the first and most literal instance. It assumes the scene reduces to exactly two dominant planes, a distant background plane and a ground plane sweeping out from the camera, and clusters SIFT correspondences by image position into a ground group and a distant group before fitting one homography per cluster via RANSAC at 95 percent consensus.
At every pixel, the two homographies are blended by a reciprocal-distance weight, so pixels near ground features warp mostly by the ground homography and pixels near distant features warp mostly by the other. The blend is a plain weighted average, not a projective transform in its own right: the resulting matrix is not a valid rank-3 projective transform, and straight architectural lines bow visibly near the seam, forcing a separate straightening pass.
The method is now superseded for practical use by APAP's continuous grid, because its fix only works when the scene truly reduces to two planes. A third dominant plane in the scene, a tree at medium distance or a passing vehicle, belongs to neither cluster, and no blend of the other two can absorb it.
Smooth Affine Field
Published the same year as Gao's two-plane fix, Lin Smoothly Varying Affine Stitching drops the fixed plane count altogether. Every matched feature gets its own affine transform, written as a global affine plus a per-feature deviation, regularised to be smooth via a Gaussian-kernel CPD-style EM that jointly estimates correspondence and warp. There is no cluster count to get wrong, because the deviation field can bend by as much or as little as the data demand at each location.
Correspondence and warp are not solved in separate stages: an EM loop adapted from Coherent Point Drift estimates the soft assignment between source and target features and the deviation field together, annealing a bandwidth parameter down over many outer iterations. The scheme handles gentle depth variation well, at a real cost, roughly 15 minutes to stitch a single pair, an order of magnitude slower than a closed-form fit.
The field stays affine everywhere, and that is where it runs out of room. For a translating camera observing a non-planar scene, the correct extrapolation is projective, so outside the overlap the warp drifts from the true motion the farther it strays from the matched points. Foreground objects at sharply different depths from the background break the smoothness assumption directly, producing mean errors two to three times higher than on a smooth-depth scene.
As Projective As Possible
APAP keeps the local model projective and lets it vary anyway. The source image is divided into a grid of cells, and each cell gets its own homography, fit by a per-cell weighted DLT that down-weights correspondences far from the cell center. The fit is closed form, the right singular vector of the weighted design matrix with smallest singular value, one singular value decomposition per cell with no annealing schedule and no outer loop.
The weighting scheme also supplies its own regulariser. A floor on the per-correspondence weight keeps the fit from degenerating where local data run out, and as that floor dominates every cell's weighted DLT converges to the same solution, the field collapses to the global homography. The result is projective everywhere a cell has enough nearby correspondences to be confident, and falls back gracefully to the one-homography baseline everywhere it does not.
The per-cell grid subsumes the two-plane parametrisation as a special case, and it generalises the affine deviation field, since a projective local model can represent everything an affine one can and more besides. What it leaves open is the granularity of the fit itself. At what point does a locally fit warp field stop being a stitching model and become dense correspondence estimation wearing a different name?