Probabilistic Alignment Raw Stitcher Experiment from Kentucky

The parsek (Probabilistic Alignment Raw Stitcher Experiment from Kentucky) program is a free open source software prototype implementation of some new ideas about processing of pixel-shift images. The name is a nod to the concept of a parsec, which is a unit of distance corresponding to a parallax of one second -- i.e., the distance at which 1 AU subtends an angle of one arcsecond, or approximately 3.26 light years. Both are about making big images by looking at small angle offsets.

Parsek was created to more effectively handle construction of super-resolution images from sets of pixel shift exposures or sets of ordinary exposures with minor positional differences (which naturally occur between shots even when the camera is mounted on a tripod). It also is effective for shot sequences taken using IBIS or extracted from high-framerate bursts or video. It is not effective when there is a large misalignment between images (e.g., panoramas).

The resulting raw images have all color channels in all pixel positions with up to 16 bits per color channel. Both the spatial and tonal resolutions are typically enhanced, giving more detail while simultaneously reducing noise.

The main observation in this work was that pixel-shift offsets are rarely precise; pixel-level motion is almost unavoidable. The green graph above shows for a Sony A7RV the ideal shifts, the blue shows measured pixel shifts under tightly-controlled circumstances, and the red shows what happens in "real world" shooting. This leads to three significant realizations:

The model used in parsek is based on computing certainty, or confidence, metrics for each potential contribution to a final pixel value. It isn't hugely different from earlier approaches, but it does give more flexibility for tuning and is capable of producing results comparable to the best publsihed earlier for a wide range of capture circumstances. The main weakness is that the method used for reading raw captures does not preserve EXIF information, so the images output are essentially 3-color-channel raw images that are missing color correction parameters that would have been in the EXIF. The prefered output format is a linear PNG with 16 bits per color channel per pixel (48-bit raw color).

Prepublication Copy Of the Paper

The EI24 full paper is this PDF. A link to the officially published version will be placed here when it becomes available.

The parsek Software

The current version of parsek is from February 12, 2024. It consists of one source file and one file for cmake:

Although parsek can run without them, either dcraw or unprocessed_raw is needed as a helper program for reading raw image files. Generally, dcraw works slightly better for images from older cameras, but doesn't work at all for some newer cameras.

If you have any comments or suggestions, you can send them to Professor Hank Dietz or, better still, post in the DPReview forum thread about this.


The Aggregate The only thing set in stone is our name.