Perspective transformations that occur when a camera is rotated or tilted make direct alignment and merging impossible to achieve in most cases. Every lens also exhibits some form of distortion, such as barrel or pincushion distortion, that degrades the stitching process. The stitching of images seamlessly together is therefore facilitated by a process of perspective warping. Images are "distorted", using control points as references, until they can be perfectly aligned and hence merged.
Image warping and alignment constitute only part of the stitching process. It is also necessary to blend overlapping areas of aligned images to adjust for variations in exposure that may, for example, lead to different density in a blue sky. This process is done automatically by most image stitching software, but manual intervention may be necessary in some cases.
In the image on the right, the red lines mark the boundaries for each image established by the stitching software. The numbers identify which image was used in each area.