Panorama stitching

On this page 7

Panorama stitching is the process of combining several overlapping photographs into a single seamless image by detecting shared features, aligning the frames geometrically, projecting them onto a common surface and blending the transitions. Among photography techniques, it is used to capture angles of view wider than any single lens allows and to create very high-resolution images from a modest sensor.

A stitched panorama can be a single horizontal row of frames, a multi-row mosaic or a full spherical 360 by 180 degree image. The quality of the result depends as much on capture discipline, especially rotation around the correct point and consistent exposure, as on the software that assembles the frames.

How stitching software assembles a panorama

Stitching proceeds in a sequence of computational stages. The software first finds distinctive points in each frame, matches them between overlapping frames and estimates how the camera rotated between exposures. It then refines all camera positions together and warps every frame into a common projection before blending.

StageWhat happensTypical method
Feature detectionDistinctive corners and blobs are locatedScale-invariant feature detectors
Feature matchingCorresponding points are paired across framesDescriptor comparison with outlier rejection
AlignmentCamera rotation and lens parameters are estimatedHomography fitting and bundle adjustment
ProjectionFrames are mapped onto a common surfaceRectilinear, cylindrical or spherical mapping
Seam findingCut lines are placed through low-detail areasGraph-cut or similar optimization
BlendingBrightness and detail are merged across seamsMulti-band blending, exposure compensation
Main stages of the stitching pipeline

Bundle adjustment is the stage that makes large panoramas possible. Instead of aligning frames only in pairs, which would accumulate small errors, it optimizes all frames simultaneously so that the total misalignment across the panorama is minimized, including lens distortion and focal length estimates.

Projections and their visual effects

A wide panorama cannot be displayed on a flat surface without distortion, so the choice of projection decides which distortions appear. Each projection preserves some properties of the scene and sacrifices others.

ProjectionPreservesBest suited for
RectilinearStraight lines stay straightNarrow panoramas up to roughly 120 degrees
CylindricalVertical lines straight, wide horizontal spanSingle-row landscape panoramas
Spherical (equirectangular)Full 360 by 180 degree coverageVirtual tours and interactive viewers
MercatorLess vertical stretching than cylindricalTall multi-row panoramas
StereographicShape near the center, little planet effectCreative spherical renderings
Common panorama projections

Rectilinear projection quickly becomes unusable as the angle of view grows, because objects near the edges are stretched enormously. Beyond about 120 degrees horizontally, a cylindrical or spherical projection is almost always necessary.

Capture technique for clean stitching

The most important capture rule is to rotate the camera around the no-parallax point, the center of the lens entrance pupil, often loosely called the nodal point. When the camera rotates around this point, near and far objects keep their relative positions, and the frames align perfectly. Rotating around the tripod screw instead introduces parallax errors that appear as broken lines in the foreground.

Consistency between frames is the second requirement. Manual exposure, manual white balance and fixed focus ensure that every frame matches, so the software does not have to hide differences in brightness or color at the seams.

SettingRecommendationReason
OverlapAbout 25-50 percent between framesEnough shared features for matching
OrientationPortrait orientation for single rowsMore vertical coverage and resolution
Exposure modeManual, metered for the brightest important areaAvoids brightness steps between frames
White balanceFixed preset or Kelvin valuePrevents color shifts across the panorama
FocusManual, set onceKeeps magnification and sharpness constant
Focal lengthNormal or short telephoto for detailLess distortion, higher final resolution
Panoramic headAdjusted to the no-parallax pointEssential with near foreground objects
Recommended capture settings

For distant landscapes without foreground objects, handheld panoramas often stitch successfully, because parallax becomes negligible at large distances. With foreground elements closer than a few meters, a calibrated panoramic head becomes necessary.

Focal length determines both the number of frames and the final resolution. Doubling the focal length roughly quadruples the number of frames needed to cover the same area in a multi-row mosaic, but it also quadruples the pixel count. This is how gigapixel panoramas are built: a telephoto lens on a motorized head captures hundreds of frames, which the software assembles into a single image of extraordinary detail.

Timing matters as well. Light can change between the first and last frame, especially at sunrise and sunset, so shooting quickly and in a consistent direction reduces visible gradients. Clouds and water also move, which is why many photographers shoot moving areas last and with extra overlap.

Panorama stitching is related to other multi-frame techniques in photography, but each combines frames for a different purpose.

TechniqueFrames differ inGoal
Panorama stitchingCamera directionWider view or higher resolution
HDR photographyExposureGreater dynamic range
Focus stackingFocus distanceGreater depth of field
Exposure stacking for noiseNothing, identical framesLower noise
Multi-frame techniques compared

These techniques can be combined. An HDR panorama captures an exposure bracket at every position, merges each bracket, then stitches the results, which is the standard workflow for interiors and virtual tours where windows and dark corners appear in the same scene.

Common stitching errors

Stitching errors are usually caused by parallax, movement or inconsistent capture rather than by the software itself.

  • Broken lines and doubled objects in the foreground indicate rotation away from the no-parallax point.
  • Ghosts and cut-off people appear when subjects move between frames; capturing extra frames or masking the seam helps.
  • Visible brightness bands result from automatic exposure or strong vignetting.
  • Wavy horizons come from an unlevel tripod or incorrect alignment, and can be fixed by setting the horizon in the projection.
  • Failed alignment occurs in featureless areas such as clear sky or water, where more overlap or control points are required.

In simple terms

Panorama stitching is like making one big picture out of puzzle pieces. You take several photos while turning the camera, each one overlapping the last.

The computer then finds the matching parts and joins the photos together. The joins are blended so that nobody can see them. The result is one wide, detailed image that no single shot could capture.

A practical example

A landscape photographer stands on a mountain ridge at sunrise. The valley spans about 160 degrees, far wider than his widest lens. He mounts a 50 mm lens in portrait orientation on a leveled panoramic head adjusted for its no-parallax point.

He sets manual exposure, a fixed white balance and manual focus, then shoots twelve frames with about 40 percent overlap. A rock in the foreground, only two meters away, stitches without errors because of the calibrated head. Rendered in cylindrical projection, the final image measures well over 100 megapixels. It can be printed several meters wide with fine detail in the distant peaks.