Panorama Creation
Stitching aligns the frames, but a panorama must also choose how to flatten a wide world onto a flat screen, then level, seam, and crop the result.
Why Does This Exist?
Stitching aligns frames on a shared canvas, but that canvas is a flat plane pretending the world is flat too: wide captures bow horizons, stretch edges, and leave ragged borders no viewer accepts. Panorama creation is the finishing discipline that turns an aligned mosaic into a watchable picture through projection choice, leveling, seam routing, and cropping.
Calibrated cameras make the geometry honest, so calibration is the background prerequisite. Seam invisibility itself is image blending. This page covers capture discipline, projection surfaces, and the finishing steps.
Think of It Like This
Peeling an orange flat
Peel an orange in one piece and flatten the peel: something must tear or stretch because spheres never lie flat unharmed. Choosing where the peel tears and what stretches is the projection decision. Cylindrical projection tears top and bottom while keeping the middle honest; spherical keeps everything viewable at the cost of bending straight lines.
It stops holding past the peel's limits. No flattening preserves all of area, angle, and straightness at once, so every panorama sacrifices one. Wide flat prints bow lines; circular viewers bend edges. Pick the sacrifice your viewer forgives.
How It Actually Works
Capture for the projection you want
Rotate about the lens nodal point, overlap frames generously, and lock exposure and focus. The arithmetic sets the shot count: a mm lens spans about horizontally, and with overlap each step advances roughly , so a full sweep needs about seven frames. Fewer, wider steps invite parallax and thin overlaps that starve matching.
Three projection surfaces
Perspective projection keeps straight lines straight but explodes past about of sweep. Cylindrical projection wraps frames around a drum: horizons stay level, verticals stay vertical, and spins view naturally, at the cost of stretching poles and tops. Spherical (equirectangular) maps the full viewing sphere including zenith and nadir, the format cameras and VR viewers expect, with maximum bending near the poles. Match the surface to the viewer, not the scene.
Level, seam, crop
Estimate and remove roll before warping so horizons sit level; a tilted capture warped anyway bows every line. Route seams through low-difference regions (sky, road) rather than faces, place the wrap seam behind the least interesting direction, then crop to the largest clean rectangle. Whatever brightness steps survive goes to blending.
Code
The panorama-mode stitcher with its projection preset:
import cv2
stitcher = cv2.Stitcher_create(cv2.Stitcher_PANORAMA)status, pano = stitcher.stitch(frames)# PANORAMA mode chains cylindrical-friendly warps; SCANS mode suits flat documentsSeven overlapping frames at steps feed this call; the mode picks warp and seam defaults suited to rotational captures.
Watch Out For
Bow horizons from unlevel captures
Symptom: the horizon arcs like a smile across the panorama although the land was flat. Roll during capture becomes curvature after cylindrical warping, and no crop straightens it. Level the camera physically, verify horizon straightness on the central frame first, and straighten (estimate roll, derotate) before warping.
Ghosts of moving subjects
Symptom: pedestrians appear twice, half-transparent, or sliced at seam lines. The scene changed between frames, so no single consistent mosaic exists there. Route seams away from motion, shoot bursts to minimize change, or deghost by letting one frame own each moving region before blending.
The Quick Version
- Panorama creation finishes stitching with projection, leveling, seam routing, and cropping.
- Seven frames at steps cover on a mm lens with overlap for matching.
- Perspective suits narrow sweeps; cylindrical suits spins; spherical feeds VR viewers.
- Level before warping, seam through boring regions, and crop to the largest clean rectangle.
- Moving subjects ghost across seams, so route seams away from motion or deghost first.