# focus\-stack

focus\-stack is Petteri Aimonen's open\-source tool for combining images captured at different focus distances\.

ID: Q1134 · Revision: 1182

Type: software · License: MIT[^f-license] · Status: active

Website: https://github.com/PetteriAimonen/focus-stack



focus\-stack is Petteri Aimonen's open\-source tool for combining images captured at different focus distances\. Its command\-line workflow creates an extended\-depth result, with optional alignment outputs and depth visualization\. It is useful when a scriptable stacking stage is wanted rather than a broad photographic catalog or editing suite\.[^f-home][^f-manual]

## Alignment and fusion

The documented algorithm compensates for scale, position, rotation and brightness differences before merging\. It normally aligns neighboring frames and combines those relationships toward a reference image, which helps when the ends of a deep stack are very blurred\. The merge uses a wavelet representation, followed by color reassignment from the source stack\. The algorithm notes acknowledge halos around some high\-contrast structures\.[^f-algorithm]

## Output and reproducibility

The manual exposes reference\-image selection, alignment\-only processing and saved intermediate images\. Default cropping retains the area valid across the stack; changing crop options can keep border data that needs inspection\. A reproducible handoff should retain the input order and chosen options alongside the final image\. A generated depth map or preview image is a separate output, not proof of a calibrated physical 3D model\.[^f-manual]

## Formats and compute

Input decoding uses OpenCV, with familiar image formats such as JPEG, PNG and TIFF documented\. The output extension controls the chosen format\. The project processes images in batches and allows thread and batch\-size adjustments to balance memory use against speed\. OpenCL acceleration is optional and depends on the installed build and graphics environment rather than being guaranteed by the operating\-system name alone\.[^f-home][^f-manual]

## Distribution and license

The project uses the MIT license, permitting reuse and modification subject to its notice requirements\. Its README identifies packages for Windows, Linux and macOS, but lists specific older operating\-system targets; those listings should not be stretched into support guarantees for every current machine\. The main interaction is a command\-line pipeline, with limited platform\-specific file\-selection conveniences\.[^f-license][^f-home]

## Substitution considerations

focus\-stack can substitute for [Helicon Focus](/heliconfocus) for an automated image\-fusion stage when command\-line operation is acceptable\. This does not establish equivalent interactive retouching, RAW development or native project history\. Its own halo caveat is relevant when deciding whether an automatic result needs correction in a separate editor\.[^f-home][^f-algorithm][^h-features]

## Capabilities and substitutions

### Scriptable image stacking — supported

Accepts image inputs and options for automated alignment and fusion\.[^f-home][^f-manual]

Use case: Focus\-stack image fusion · Platforms: Windows, macOS, Linux · Region: Edition, platform and permitted\-use requirements apply

### Artifact\-free high\-contrast fusion — limited

The algorithm notes explicitly acknowledge halo cases\.[^f-algorithm]

Use case: Focus\-stack image fusion · Platforms: Windows, macOS, Linux · Region: Edition, platform and permitted\-use requirements apply

### [Substitute for Helicon Focus](/heliconfocus) — limited

Candidate for the fusion stage; interactive retouching and RAW development parity are unverified\.[^f-home][^h-home]

Use case: Automated focus\-stack fusion · Platforms: Windows, macOS, Linux · Region: Edition, platform and permitted\-use requirements apply

## References

[^f-license]: [focus\-stack MIT license](<https://github.com/PetteriAimonen/focus-stack/blob/master/LICENSE.md>) — MIT license permission and notice conditions (vendor; retrieved 2026-10-07T03:17:48Z)

[^f-home]: [focus\-stack project](<https://github.com/PetteriAimonen/focus-stack>) — Cross\-platform focused\-image fusion; OpenCV inputs; command\-line workflow (vendor; retrieved 2026-10-07T03:17:42Z)

[^f-manual]: [focus\-stack manual](<https://github.com/PetteriAimonen/focus-stack/blob/master/docs/focus-stack.md>) — Alignment, crop defaults, saved intermediates, depth map and OpenCL options (vendor; retrieved 2026-10-07T03:17:48Z)

[^f-algorithm]: [focus\-stack algorithm documentation](<https://github.com/PetteriAimonen/focus-stack/blob/master/docs/Algorithms.md>) — Wavelet fusion, neighboring alignment, color reassignment and known halo limitations (vendor; retrieved 2026-10-07T03:17:48Z)

[^h-features]: [Helicon Focus features](<https://www.heliconsoft.com/features/>) — Retouching from aligned images, batch queues, command\-line and Remote integration (vendor; retrieved 2026-10-07T03:18:48Z)

[^h-home]: [Helicon Focus](<https://www.heliconsoft.com/heliconsoft-products/helicon-focus/>) — Focus stacking product and desktop workflow (vendor; retrieved 2026-10-07T03:18:07Z)

Source revision: https://substitutefor.net/entities/Q1134?revision=1182
