

Focus stacking for microscopy, macro photography, and computational imaging
from shinestacker.algorithms import *
# Minimal workflow: Alignment → Stacking
job = StackJob("demo", "/path/to/images", input_path="src")
job.add_action(CombinedActions("align", [AlignFrames()]))
job.add_action(FocusStack("result", PyramidStack()))
job.run()
Clone the package from GitHub:
git clone https://github.com/lucalista/shinestacker.git
cd shinestacker
pip install -e .
On Linux and other system that require extra protection level, you may need to use pip with avirtual environment:
git clone https://github.com/lucalista/shinestacker.git
cd shinestacker
python -m venv .venv
source .venv/bin/activate
pip install -e .
Note that, depending on your installation, you may need to use python3 and pip3 instead of
python and pip, respectively.
Launch GUI
shinestacker
Follow GUI guide for batch processing and retouching.
from shinestacker import *
job = StackJob("job", "E:/focus_stacking/project_directory/", input_path="tiff_images")
job.add_action(CombinedActions("align", actions=[AlignFrames(), BalanceFrames()]))
job.add_action(FocusStackBunch("batches", PyramidStack(), frames=12, overlap=2))
job.add_action(FocusStack("stack", PyramidStack(), prefix='pyram_'))
job.add_action(FocusStack("stack", DepthMapStack(), prefix='dmap_'))
job.run()
| Method | Best For |
|---|---|
| Python API | batch processing |
| GUI Interactive | refinement |
| Jupyter notebooks | prototyping |
pip install imagecodecs matplotlib numpy opencv-python pillow psdtags psutil rawpy scipy setuptools-scm tifffile tqdm
pip install argparse PySide6 jsonpickle webbrowser
pip install ipywidgets