Every pixel,
its sharpest frame.
A focus stack is a pile of near-misses. OpenFocus aligns the frames, decides which one is sharpest at every pixel, and blends them into a single image — for macro, microscopy and industrial inspection.
- 10 fusion methods
- 5 alignment modes
- 16-bit end to end
- 12 UI languages
- MIT licensed
Why OpenFocus
Focus stacking, without the guesswork.
Ten fusion algorithms, a registration step that fits your rig, and a workspace that shows you the result at every zoom.
Neural fusion, classical fallbacks
StackMFF V3 classifies every pixel by its most probable source frame. StackMFF V2 and V1 sit beside Guided Filter, DCT, DTCWT, GFG-FGF and OpenFocus A/B/C.
Alignment that matches the rig
No alignment, SIFT homography, ECC, homography refined by ECC, or a bounded similarity search that finishes in under a second per frame.
16-bit, end to end
Load, fuse and export without dropping to 8-bit. µm/px comes from TIFF metadata, and multi-page TIFF Z-stacks stay intact.
Compare, then commit
Render every method once and inspect them at a shared crop. Adopt the winner, or copy its parameters back to the main window.
Retouch from the source
Paint detail back from the frame that actually had it: shared zoom and pan, soft and restore brushes, whole-stroke undo.
Headless when you need it
The same pipeline as openfocus, with batch mode, --dry-run, --resume and JSON output for scripting.
Workflow
Load. Align. Fuse. Retouch.
The stack browser and sharpness curve tell you which frame owns which detail before you render.
- Wipe compareDrag the divider between a source frame and the result at any zoom.
- Method comparisonEvery algorithm rendered once, side by side at a shared crop.
- Depth map & 3DFive focus measures, research colour maps, physical Z from TIFF metadata, textured OBJ export.
- Scale bars and labelsCalibrated or typed in, drawn at the real length, burned into every export.
Retouch
Fix the one percent the blend got wrong.
The retouch workspace is locked to the frames that produced the result, so every stroke is traceable. Depth maps come from the same stack.
- Source-locked brushPick the frame, paint, and the result updates in place.
- Restore and undoSoft brush, restore brush, whole-stroke undo, and a guard for pixels that will not be exported.
- Depth and surfaceFive focus measures, research colour maps, and a textured OBJ of the surface.
Benchmark
Measured against ground truth.
A 16-frame synthetic stack with noise σ = 3, rendered through a known depth map. Higher PSNR/SSIM and a lower ghost ratio are better.
Headless
The same pipeline, without the window.
Install on Windows, macOS or Linux. The model, its weights, HEIC and camera-RAW decoding are all in one wheel.
pip install openfocus
--dry-run, --resume, --json and every fusion and registration parameter are available.
openfocus -i ./stack -o fused.png
openfocus -i ./stackA ./stackB -d results -m stackmffv3
openfocus -i ./stack -m dtcwt -a ecc --threads 8
Download
Install OpenFocus
Builds are unsigned. On Windows, SmartScreen → More info → Run anyway; the first start can take 30–60 seconds. On macOS, right-click → Open.
Terminal install · macOS / Linux
curl -fsSL https://openfocus.top/install.sh | sh
PowerShell · Windows
irm https://openfocus.top/install.ps1 | iex
Latest release: v1.74.0 · MIT License · All releases and checksums