The lapstack manual
lapstack fuses a focus-bracketed series of photographs into one all-in-focus image and a dense depth map. This manual covers all three ways of running it — the browser app, the desktop application and the command-line tool — which share one engine and one set of controls under different names.
Every form of lapstack is free software under the MIT license. The browser app needs nothing installed; the desktop application, the command-line tool and the Lightroom plugin are on the download page, and the source is on GitHub.
If you have a stack of frames and twenty minutes, start with the quick start. Everything else here is reference you can come back to.
Getting started
| Page | What it covers |
|---|---|
| What focus stacking is | Why depth of field runs out, and what a stack does about it |
| Quick start | Your first stack, from adding frames to saving a file |
| Shooting a stack | Step size, aperture, lighting and the mistakes that cost you a stack |
| Browser and hardware | WebGPU support, GPU memory, and what limits stack size |
The browser app
The browser app is the complete application. The desktop build is the same thing in a different shell, so every page in this section applies to it too.
| Page | What it covers |
|---|---|
| The interface | The two steps, the viewer, the filmstrip, the parameter panel, keyboard shortcuts |
| Frames | Adding files and folders, supported formats, raw, editing the frame list, rotate and draft |
| Alignment | Registration models, coarsening, resampling kernels, brightness equalization, cropping |
| Fusion | Pyramid levels, the energy window, the residual rule, halo control |
| The depth map | Focus depth, confidence, the in-focus view, focus peaking, the depth slice |
| Other renderings | Depth-map rendering, rendering from slabs, the weighted average |
| Retouching | Brushing one rendering into another, slab sources, undo |
| Dust map | Removing sensor dust before alignment |
| Scale bar and captions | Calibrated bars and captions for microscopy figures |
| Stereo, rocking and 3D | Stereo pairs, rocking animations, textured 3D models |
| Saving | The file list, formats, bit depth, DNG, animations, content credentials, file names |
| Batch | Splitting a folder into stacks and running them in turn |
| Project files | Saving a session and coming back to it |
The command line
Builds for Linux, Windows and macOS, and the source, are on the download page.
| Page | What it covers |
|---|---|
| Installing and running | Getting the binary, the shape of a command, the common flags |
| Option reference | Every option, grouped |
| Batch and scripting | Splitting rules, output templates, dry runs, exit status |
| GPU acceleration | Building and running the CUDA path |
Integrations
Both are on the download page.
| Page | What it covers |
|---|---|
| Lightroom Classic | The plugin as a Library menu item and an export target |
| Desktop application | What the desktop build adds over the browser |
Reference
| Page | What it covers |
|---|---|
| How lapstack works | The pyramid, the fusion rule, and where the papers come in |
| Depth from focus | The five stages of the depth pass and the knobs on each |
| Formats and metadata | What goes in, what comes out, and what metadata survives |
| Performance | Measured timings, memory behavior, and what actually costs time |
| Troubleshooting | The failures people actually hit, and what to do about them |
| Glossary | The vocabulary this manual uses |
Conventions in this manual
Command-line options are written as --halo-control. Controls in the browser app are
written in italics when they are labels you will see on screen — equalize brightness,
also render from the depth map. Where a control in the app and an option on the command
line are the same thing, both names are given, because they are the same engine underneath
and the manual would be twice as long otherwise.