Stitching

from Wikipedia, the free encyclopedia

Stitching ( English stitch " sewing ", "attach") referred to in the photograph creating a large photograph from several smaller individual recordings (usually overlapping) clippings show the subject.

Stitching is used when a single shot would not capture the desired angle of view, i.e. as a replacement for a wide-angle lens or even to create a 360 ° panorama, or to achieve a higher resolution (number of pixels) for large-format images than is possible with a single shot the limited resolution of the camera would be possible.

Application examples are panoramic images of landscapes or overall views of extensive objects (for example architectural photographs ).

Panoramic picture of Marburg , composed of 175 individual photos .
Stitching process, simplified scheme

functionality

Intentionally incorrectly set exposure compensation makes the partial images visible
cubic representation
different cylinder projections. from above: flat map, Miller cylinder projection, Mercator projection, straight cylinder projection

Photography is a two-dimensional representation of the three-dimensional environment. The reduction from three to two dimensions occurs when taking photos. Stitching usually requires that all partial images are done with the same reduction, i.e. H. from the same point of view and therefore the same perspective . The position of the entrance pupil should not change between exposures. It is not possible to change this reduction afterwards, as you can no longer change the point of view of the recording. After taking the pictures, you can only choose the type of mapping on the Cartesian coordinate system of the monitor or paper (coordinates of the plane).

The stitching process can be divided into four steps:

  1. Conversion of the original images into a suitable common coordinate system
  2. Correcting and merging of the partial images
  3. Add up the overlapping partial images
  4. Mapping of the resulting image on a plane

Spherical coordinates are suitable for step 1 . Each point of an initial image is projected onto the surface of a sphere, the center of which is the projection center. The center of the sphere can be imagined at the point from which the partial images were taken. Seen from the center of the sphere, the projected image then ideally reproduces a section of the scene without distortion (undistorted and with the correct angles between different points of the motif). For the correct projection, the stitching program must therefore know the angle of view of each shot. It is either determined from the metadata or entered manually.

In step 2, the images are rectified, which is mainly necessary because of the distortion of the lens , and shifted on the spherical surface in order to bring the overlapping areas into alignment as best as possible. Many programs can do this automatically, but also offer the user the option to intervene, e.g. B. manual definition of the control points, which mark the same motif detail on the various partial images. When rectifying and moving, the control points are brought into congruence as well as possible. This is an optimization problem in which the displacement, rotation and rectification of the partial images is to be determined in such a way that the deviation of the control points from one another is minimal (typically by minimizing the sum of the squares of the deviations ). Ideally, when viewed from the center of the sphere, the whole thing looks exactly like the original scene from the point of view of the shot.

In step 3, a common one is calculated from the overlapping images, with an exposure correction and correction of the decrease in brightness towards the edge of the image, and possibly also an adjustment of the white balance , being necessary .

In step 4 the spherical coordinates are converted into Cartesian coordinates of the plane, which is a non-trivial task (see map network design ). The stitching programs usually offer several options here. With these projections, however, the type of 3D-2D reduction is not changed; this was already determined when the images were taken, i.e. H. there is no change in obscurations or proportions between objects at different distances.

Possible projection methods include:

  • polar: like taken directly with a photo lens. Straight lines are generally shown curved (corresponds to the picture taken with a fisheye lens ). There are different projection methods, including equal-area , equidistant and conformal mapping. The latter minimizes distortion of depicted objects (they are not stretched or compressed radially) and is usually used for Little Planet images .
  • distortion-free: central projection from the center of the sphere; the most important special case of polar projection. The image generated in this way can only show an angle of less than 180 °. If the angle of view is greater than approx. 90 °, there will be considerable distortion of the objects shown in the edge areas. Straight lines are also reproduced straight in the picture.
  • Projection onto the sides of a cube, the center of which coincides with the center of the sphere. There are six central projections that depict the entire surface of the sphere. There are clearly visible transitions between these, including kinked lines.
  • Projection onto a cylinder surface, the axis of which goes through the center of the sphere. The horizontal coordinate is mapped equidistantly: every pixel on the cylinder lies in the same plane as the object point on the sphere and the cylinder axis. Straight lines of the motif that are not in one plane with the cylinder axis are generally rendered curved. Different images can be selected for the vertical coordinate, including equidistant ( flat map ), Mercator projection and straight cylinder projection (center of the sphere, object and image point on a straight line). The cylinder jacket is finally unwound in the plane.

Some programs also allow you to join pictures of a flat subject that were not taken from the same point. In Hugin this is called "mosaic mode". The images are then shifted and rectified accordingly in the plane instead of on a spherical surface.

Stitching error

Deliberately incorrect stitching
Clone and Ghosting
  • If the center of the entrance pupil (perspective center) does not lie on the axis of rotation around which the camera was rotated between the individual shots, the images will be incorrectly combined (parallax error). In the picture opposite, there was a church in the middle of the square , around which the pictures were taken.
  • In moving scenes, changing objects are recorded in the individual images at different times, these objects then appear partially transparent in the image (“ghosting”) or several times (so-called clones , in the adjacent image some passers-by are partially transparent).
  • Differences in exposure can result from different camera settings, but also from changes in the natural lighting and lead to unsightly stripes in the images if these differences are not compensated by the software.
  • Changes in the white balance between the individual shots also lead to irregularities in the images.

software

Spherical panorama

In the Internet there are a large number of free stitching software . Corresponding software is also often included in the scope of delivery of digital cameras. The scope and capabilities of stitching software vary widely. The range of functions includes the following functions (not exhaustive):

  • Support of file formats (import / export)
  • Conversion procedure
  • Exposure corrections
  • Correction procedure
  • User interface and application support
  • Assistant function

Furthermore, conventional image processing programs such as Photoshop (from version CS3) also offer stitching functions.

There is software for the reproduction of spherical panoramas that show an interactively selectable section (mostly free of distortion) so that the entire scene can be viewed from all around undistorted. QTVR technology is mostly used for the interactive display . The user can choose the direction and size of the section. The panorama is usually entered into such a program as a flat map (equidistant cylinder projection, also called spherical projection).

Stitching software (selection)

  • Adobe Photoshop
  • Autopano giga (like autopano pro, but with a few additional functions, including support for different shooting positions, e.g. for aerial shots)
  • Autopano pro (fee-based software with many editing options, export, among others, also into Photoshop format; test version with no time limit, but only output with stamp)
  • PanoramaStudio , paid software for Mac OS X and Windows
  • AutoStitch (free of charge, but with the obligation to mention the program when it is published)
  • Hugin (software) ( free software , for Windows, Linux, Mac OS X)
  • Microsoft Research Image Composite Editor v1.4.4 (May 26, 2011), free of charge, apparently by the same author as Autostitch, as 32- and 64-bit versions
  • Panorama Tools (free)
  • PTGui (fee-based software with many editing options , export, among others, also into Photoshop format; test version, but only output with stamp)
Example of the efficiency of stitching software: Panoramic image of Simos on the Greek island of Elafonisos , composed with Microsoft Research Image Composite Editor v1.4.4 from 10 individual images.

See also

Web links

Commons : Stitching  - collection of images, videos and audio files

Individual evidence

  1. Littlefield, Rik: Theory of the "No-Parallax" Point in Panorama Photography (PDF)
  2. Szeliski, Richard: Image Alignment and Stitching (PDF)
  3. Wells, Sarah: IATH Best Practices Guide to Digital Panoramic Photography
  4. Hugin mosaic mode tutorial (English)