pfsalign(1)
π pfsalign(1) β General Commands Manual, but make it cute
okay bestie, so this is pfsalign from the General Commands Manual β the align-image-stack girlie. she's here to make your frames line up. let's go π
β¨ NAME β¨
pfsalign β align image stack. that's it, that's the whole job. slay.
π¦ SYNOPSIS π¦
pfsalign [--reference <index>|-r <index>] [-c (min|max)|--crop
(min|max)] [-s val|--sensitivity val] [-f|--fail-no-match] [--display-
matches|-d] [--verbose] [--help]
π DESCRIPTION π
so like, use this command to align an image stack β think HDR merging, that kind of vibe. the command uses a feature-point-based matching method to find a homographic transformation that maps all the images in the stack onto the coordinates of the reference image. then it outputs the transformed (aligned) images, all at the same resolution. the input images can literally be different resolutions, no stress. it can fix a substantial misalignment caused by camera rotation (along any axis) and slight movement. main character energy fr π«
the method is essentially similar to the one in this paper, and we're quoting it exactly so don't come for me:
Tomaszewska, Anna, and Radoslaw Mantiuk. "Image Registration for Multi-Exposure High Dynamic Range Image Acquisition." In International Conferences in Central Europe on Computer Graphics, Visualization and Computer Vision, pp. 49-56, 2007.
ngl though, the code is not based on the authors' implementation. separate girlies, same vibes.
the images get matched pairwise, in the same order as they're sent to the command. so make sure every consecutive image pair has overlapping parts, okay? π when you're aligning multiple exposures, use pfsinme, which sorts exposures according to the shutter speed and therefore improves matching between image pairs. the command will assume no misalignment (or fail, if you passed the -f option) if there's no overlap, or if it can't find a sufficient number of features in one of the pairs.
β οΈ homographic alignment will not eliminate all misalignment artefacts. in particular it will not eliminate ghosting due to moving objects. the alignment algorithm assumes the effect of parallax is negligible β so if the camera moves rather than rotates and there are objects close to the camera, they will most likely remain misaligned. ghosting said "i'm staying" π
πΈ OPTIONS πΈ
--reference <index>,-r <index>β index of the reference image. heads up: the first image has index1. default:1(the first image).--display-matches,-dβ display matching key-points for each image pair. super useful for inspecting what went wrong with key-point matching, iykyk π--crop min|max,-c min|maxβ crop either to the image that contains all pixels (max) or to the image that contains only the pixels that overlap in all exposures (min). theminoption will eliminate black (empty) pixels from all exposures. ate.--sensitivity value,-s valueβ higher sensitivity = detecting more feature points and potentially a better alignment, but also longer computation time. the value parameter must be in the range from1to10. default:5.--fail-no-match,-fβ if this option is present, the program will exit with a fail status when no match was found for one or more of the image pairs. otherwise, the program will assume that the failed image pair is perfectly aligned (assume identity matrix as a homography).
π«Ά also hanging out in the synopsis:--verboseand--help. they're listed up there, so go look, bestie.
π EXAMPLES π
okay these are the moment, fr fr:
pfsin img1.exr img2.exr | pfsalign -v -r 2 | pfsview
align two EXR images using the second image (img2.exr) as a reference. then preview the result. iconic.
pfsinme *.CR2 | pfssize --maxx 1200 | pfsalign -v -c min |
pfshdrcalibrate -r linear -v --bpp 16 | pfsout result.exr
align a stack of RAW image exposures (from a Canon camera), resize them so that the width is equal or less 1200 pixels, align the exposures, and merge them to an HDR image. the whole pipeline, chef's kiss π
β SEE ALSO β
π BUGS π
the current implementation is rather inefficient in terms of memory management and can consume a considerable amount of memory. this is because of the pfstools architecture, which requires that all aligned frames must be loaded into memory. it should be possible to align 3-4 10-megapixels images for 1.5GB of available memory. so like... hydrate, and also close some tabs π
please report bugs and comments to the pfstools discussion group (http://groups.google.com/group/pfstools). they're lovely, i promise π«Ά
okay that's the whole page!! mwah π β this was pfsalign(1) straight out of the General Commands Manual, and yeah the footer said pfsalign(1) again because it's consistent like that β¨ go align something pretty π¦π
π¦ where this page comes from
- opensuse-leap 16.0: pfsalign 2.2.0-bp160.1.20 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: pfsalign 2.2.0-bp160.1.20 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: pfsalign 2.2.0-bp160.1.20 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: pfsalign 2.2.0-bp160.1.20 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms