Feature matching · cylindrical or spherical · multi-band blend

Panorama Stitcher

Join 2 to 12 overlapping photos of one scene, taken by turning on the spot, into a single wide picture. Photos that cannot be placed are named with the reason.

Photos

2 to 12 photos

Drop the photos here or click to choose

PNG, JPG, WEBP or BMP, up to 25 MB each. Any order works; the overlaps decide where each one goes.

    Settings

    Keeps vertical lines straight; fine for a pan with little looking up or down.

    Read from the first photo's EXIF when it has one. Empty means the lens is estimated from the matches and then refined.

    Stitch and save

    Result

    Add overlapping photos from one spot.

    Panorama Stitcher

    Operator: Abdulla Al Fahad. How tools are built and checked

    Stitching is easy to describe and hard to get right: find the same points in neighbouring photos, work out how the camera turned between them, warp every photo onto a common surface and hide the seams. Where a stitcher fails, it usually fails silently, producing a bent horizon or a ghosted tree with no hint of which photo was at fault.

    This page does each step in a visible way. It shows which pairs of photos overlapped and with how many consistent points, names every photo it could not place with the reason, and reports how well the survivors agree, as an RMS error in pixels.

    Key features

    • 2 to 12 photos in any order, 25 MB or less each, processed at up to 3000 px on the long side
    • Features found by FAST-9 corners on a two-level pyramid and described with a 256-bit steered BRIEF, written for this page and run in a worker
    • Matching by Hamming distance with a ratio test and a mutual-best check, then a RANSAC homography per pair
    • Lens from the 35 mm equivalent focal length in a JPEG's EXIF, from a value you type, or estimated from the matches and refined with all the cameras
    • Cylindrical or spherical projection, a straighten-the-horizon option, per-channel exposure balancing and five-level multi-band blending
    • Auto-crop to the largest full rectangle, a match graph, a per-pair table, JPG or PNG output, and a cap of 50 megapixels

    Matching, camera geometry and blending

    A pair of photos counts as overlapping when at least 12 matches agree on one homography and the agreeing matches exceed 8 plus 0.3 times the tentative matches, the test from Brown and Lowe's AutoStitch paper. Pairs that fail it are drawn with no line in the graph but still listed in the table with their counts.

    Features are found on a copy of each photo at most 1100 px on the long side, up to 1000 per photo (700 when there are more than 8 photos), with at most one per grid cell so a textured patch cannot use all the slots. The ratio test keeps a match only if its best distance is below 0.8 times the second best.

    The focal length comes from the EXIF tag for the 35 mm equivalent focal length, converted with the 43.27 mm diagonal of a 35 mm frame, so a 31.5 mm equivalent on a 1200 × 800 photo is 1050 px. Without it, the page estimates the focal length from every pair's homography and takes the median, falling back to 0.8 times the long side if no pair gives a usable value.

    Output is capped at 50 megapixels by shrinking the whole panorama, and at 16 megapixels on iPhone and iPad, where Safari will not create a larger canvas. A full 360 degree sphere rarely fits at the photos' own scale, and the percentage it was reduced to is shown.

    How it works

    A camera turning about a fixed point sees the same rays at different angles, so each photo needs one 3D rotation. For every accepted pair the page finds the rotation that best maps one photo's rays onto the other's (Horn's closed-form method), builds a spanning tree from the strongest pairs, and then refines all rotations, and the focal length when it was estimated, together by Levenberg-Marquardt over up to 150 matches per pair with a robust loss of 3 px.

    The world frame is then levelled: with three or more photos, the axis the cameras swing around becomes vertical, and the middle of the panorama is placed at the centre so the seam of the projection lies behind the viewer. Photos are sampled onto a cylinder or sphere, brightness gains are solved from the overlaps, and each pixel is assigned to the photo that sees it farthest from its own border.

    Blending uses a five-level Laplacian pyramid in tiles of 1280 px with a 96 px margin, so memory stays bounded for a 50-megapixel result. Low frequencies are blended over wide transitions and detail over narrow ones, so exposure differences fade out and seams do not show.

    Common use cases

    • Five handheld phone shots of a valley, each turned about 25 degrees: the page estimates the lens from the matches, joins them into one wide strip, and crops the wavy top and bottom away.
    • A hiker takes seven photos along a ridge, but photo 5 is mostly cloud. The page joins the other six, lists photo 5 as left out with its tentative-match count, and the hiker knows which view to reshoot with more overlap.

    How to use this tool

    1. Drop the photos, in any order. The 35 mm equivalent focal length is read from the first JPEG that carries one.
    2. Choose cylindrical for a level pan or spherical for a wide or tilted one.
    3. Type the focal length if the camera did not record it, or leave the field empty to estimate it.
    4. Press Stitch panorama and watch the progress; Cancel stops the worker.
    5. Read the match graph and any left-out photos, then download the JPG or PNG.

    Example

    An illustrative set: four 1200 × 800 images generated for this page by turning a virtual 31.5 mm-equivalent camera 24 degrees between frames, plus one unrelated photo

    The five files together, focal length field left empty, Spherical, Straighten, Balance exposure and Crop on. Because the virtual camera's focal length is known to be 1050 px, the estimate can be checked against it.

    Result panel for that set

    2396 × 627 px, 4 of 5 photos, 132 degrees across
    Focal length used: 1050 px, estimated; match error 0.71 px RMS; cropped away 21 × 181 px
    Photo 1 (lone.png) left out: Too few features matched any other photo (the best candidate, photo 2, gave 24 tentative matches)

    Tips for best results

    • Overlap neighbouring shots by about a third. With less, the 12-match rule fails first, and the left-out reason names the photo and the match count.
    • Turn the camera on the spot rather than walking: the geometry assumes a pure rotation, and a step sideways makes near objects shift against distant ones.
    • If the horizon curves, switch to spherical and keep straighten on; a cylinder keeps verticals straight but bends a pan that tilts up or down.

    Common pitfalls

    People, cars or water that move between shots appear doubled or are cut through at a seam. The blend hides exposure steps, not motion.

    A near foreground, such as a railing a metre away, shifts between shots when the camera moves, and no rotation model can line it up with the background.

    Lens distortion is not corrected, so a wide lens leaves a small residual that the RMS figure shows. Keep the lens at its standard setting for every shot.

    Skies and plain walls have few corners to match. A pair that is mostly sky may fail even with a generous overlap, which the table shows as few tentative matches.

    Common errors and how to fix them

    "No two photos could be joined"
    Every pair failed the overlap test. Check that neighbouring photos share about a third of their view and that the scene has texture; the table lists the best pairs.
    The stitch ends with an out-of-memory message
    All the photos are held as pixels while they are matched, and the result is built on top of them. Use fewer photos, or smaller ones; twelve at 3000 px plus a large output can exhaust a phone.
    "Enter a number from 8 to 1200"
    The focal length field takes millimetres in 35 mm equivalent terms, such as 26 or 28.5; clear it to estimate instead.

    Best practices

    • Lock exposure and white balance when shooting, and let the gain step handle what drifts anyway.
    • Shoot in the same orientation, all landscape or all portrait, and from the same height.
    • Leave the crop on for a picture to print or post, and off if you want to keep the full ragged outline for retouching.

    What the RMS figure means

    After all rotations are refined, the page projects every matched point from one photo into its partner and measures how far off it lands. The root mean square of those distances, in pixels of the working photos, is shown as the match error. Below about 1 px the photos agree to the pixel; above 3 px ghosting is likely and a warning is shown, since something moved or the lens distorts.

    Frequently asked questions

    Can I build a full 360 degree panorama?

    Yes, if the photos overlap all the way round and you choose Spherical. A full sphere at the photos' own scale is far beyond the 50-megapixel cap, so expect the page to shrink it and report the percentage.

    Can it stitch a phone's built-in panorama strip?

    Those are already stitched. This page is for separate overlapping photos; a single wide strip has nothing to match.

    Does it do the opposite of the Instagram grid splitter?

    Yes. The Instagram Grid Splitter cuts one wide picture into tiles; this page joins separate photos into one wide picture.

    Why is the result smaller than my photos suggest?

    Photos over 3000 px on the long side are scaled to that size before matching, and a result over 50 megapixels is scaled down as a whole. The page reports the percentage whenever it does so.