.TH pamalign 1 "26 May 2004" .IX pamalign .SH NAME pamalign - align slightly-offset images of the same scene .SH SYNOPSIS .B pamalign [ .I -maxshift pixels ] [ .I -percentage percentage-of-image ] .I pnmfile pnmfile [ pnmfile...] .SH DESCRIPTION Reads portable anymaps as input (which must be the same width and height, and should be of the same subject, from a fixed camera, under very similar lighting conditions) and corrects any slight misalignment of the second and subsequent images with respect to the first image. See .B NOTES for why this is useful. .PP .B pamalign overwrites each aligned image, and emits nothing to standard output. An image that is already correctly aligned is not re-written. .PP To reduce processing, pamalign only considers part of the image, and only shifts by a limited number of pixels. .SH OPTIONS .TP .B -maxshift Set the maximum number of pixels to shift in any direction when searching for the correct alignment. For example, with the default of 5, .B pamalign will search for shifts up to 5 pixels up, down, left, or right, giving a total of 121 search positions. [ (5 + 5 + 1)^2 ] .TP .B -percentage Set the percentage of the image to consider. The default is 5%. .B pamalign will use a strip across the centre of the image of the appropriate size. .SH NOTES This program is intended to assist with the compositing of multiple exposures with differing transient elements. It will correct only very slight changes in camera position, such as when the shutter is triggered by hand. It is no substitute for a tripod or clamp. .SH EXAMPLE To align and blend four images of the same scene, image1.ppm through image4.ppm: .PP pamalign image1.ppm image2.ppm image3.ppm image4.ppm .PP pamblend image1.ppm image2.ppm image3.ppm image4.ppm > blended.ppm .SH BUGS Does not correct for image rotation. .PP Does not interpolate to correct for fractional pixel offsets. .PP Very slow for large values of .B -maxshift. .SH "SEE ALSO" pamblend(1), pnmarith(1), pnmcomp(1), ppmmix(1), pnm(5) .SH AUTHOR Copyright (C) 2004, Fraser McCrossan .\" Permission to use, copy, modify, and distribute this software and its .\" documentation for any purpose and without fee is hereby granted, provided .\" that the above copyright notice appear in all copies and that both that .\" copyright notice and this permission notice appear in supporting .\" documentation. This software is provided "as is" without express or .\" implied warranty.