How sha5b/photo-focus-stacker works
Photo Focus Stacker is a desktop and command-line application for combining images captured at different focus distances. Users load images, group them into stacks, choose processing and output settings, run alignment and focus analysis, then save a fused image and optional depth, confidence, and alignment reports. The graph distinguishes UI orchestration from the core processing pipeline and image I/O. Some capabilities, including cache behavior and RAW support, are documented but their implementation details were not sampled.
Main entry points: main_window.py Main window · focus_stacker.py Pipeline orchestrator · settings_store.py Settings persistence · cli.py CLI workflow
Components 17
Entry and UI
- CLI workflow
src/cli.py - Main window
src/ui/main_window.py - Stack worker
src/ui/stacking_worker.py
Settings and grouping
- Settings persistence
src/config/settings_store.py - Stack settings
src/config/stacking_settings.py - Detection settings
src/config/stack_detection_settings.py - Output settings
src/config/output_settings.py
Stack services
- Stack detection
src/services/stack_detection.py - Auto tune
src/services/auto_tune.py
Focus pipeline
- Pipeline orchestrator
src/core/focus_stacker.py - Frame alignment
src/core/alignment.py - Focus measures
src/core/focus_measure.py - Depth and fusion
src/core/blending.py - Postprocessing
src/core/postprocessing.py
Image output
- Image I/O
src/core/utils.py
Other components
- Photographer
- RAW decoder
Connections 21
- Photographer → CLI workflow: runs batch
README.md - Photographer → Main window: uses GUI
README.md - CLI workflow → Pipeline orchestrator: runs pipeline
src/cli.py - CLI workflow → Image I/O: exports maps
src/cli.py - Main window → Settings persistence: loads and saves
src/ui/main_window.py - Main window → Stack detection: groups images
src/ui/main_window.py - Main window → Auto tune: requests tuning
src/ui/main_window.py - Main window → Stack worker: starts worker
src/ui/main_window.py - Main window → Stack settings: configures processing
src/ui/main_window.py - Main window → Detection settings: configures grouping
src/ui/main_window.py - Main window → Output settings: configures output
src/ui/main_window.py - Settings persistence → Stack settings: persists
src/config/settings_store.py - Settings persistence → Detection settings: persists
src/config/settings_store.py - Settings persistence → Output settings: persists
src/config/settings_store.py - Stack worker → Pipeline orchestrator: runs stack
src/ui/stacking_worker.py - Pipeline orchestrator → Frame alignment: aligns frames
src/core/focus_stacker.py - Pipeline orchestrator → Focus measures: computes focus maps
src/core/focus_stacker.py - Pipeline orchestrator → Depth and fusion: selects depth and fuses
src/core/focus_stacker.py - Pipeline orchestrator → Postprocessing: postprocesses result
src/core/focus_stacker.py - Pipeline orchestrator → Image I/O: loads and saves images
src/core/focus_stacker.py - Image I/O → RAW decoder: develops RAW files
README.md