Shooting a stack
lapstack can rescue a lot, but no stacker can put back detail the camera never recorded. This page is about the capture, which is where most bad results are actually made.
Step size is the one that matters
The step between frames must be small enough that the sharp bands overlap. If they do not, there is a band of depth no frame saw sharp, and the stacked result is soft there — a horizontal smear across the subject that nothing in software will fix.
A safe rule is to step by about half the depth of field at your aperture and magnification, so consecutive frames overlap generously. Overlapping too much costs only time and disk; overlapping too little costs the shot.
If you are unsure, shoot more frames than you think you need. lapstack streams frames
through the fusion one at a time, so a two-hundred-frame stack costs time but not memory,
and --skip (or excluding frames in the filmstrip) lets you thin a stack afterward.
You cannot thicken one.
Aperture: open enough to stay sharp
Stopping down deepens each frame's band, which lets you take fewer frames — but diffraction softens the entire image, and past roughly f/8 at macro distances you lose more to diffraction than you gain in depth. Since you are stacking anyway, the depth of a single frame does not need to be large. Shoot near the lens's sharpest aperture and take more frames.
Keep everything else constant
Between frames, the only thing that should change is focus.
- Exposure. Use manual exposure. Automatic metering will chase the changing subject and give you frames of different brightness. lapstack equalizes brightness automatically (see alignment), because flash recycling and mains flicker cause a percent or two of variation no matter what you do — but that is a correction for small drift, not a substitute for manual exposure.
- White balance. Fix it. Raw frames are developed with the first frame's white balance so that every frame is developed alike, which is what the fusion needs.
- Focal length and zoom. Do not touch them.
- The subject. Anything that moves between frames will ghost. Wind, a live insect, a settling fiber, a drying drop — all of them cost you.
Rail or focus ring
A focusing rail moves the camera. It is the standard method above 1:1, it is repeatable, and a motorized rail makes long stacks practical. Because the camera moves, the perspective changes slightly between frames, and the frames need scaling to match — which lapstack's similarity registration handles.
The camera's focus bracketing (Nikon's Focus Shift Shooting, Canon's Focus Bracketing, and the equivalents) drives the lens's own focus motor. Simpler, and better for subjects at moderate magnification. The image breathes as focus changes — the magnification shifts — which again the registration handles.
A microscope's fine focus moves the stage or the objective. Here the frames are
usually already well registered and you may want --no-align (or align frames off).
Either direction works: near to far or far to near. lapstack reads the focus distance the camera recorded in the first and last frames to decide which end is near, which matters for the stereo, rocking and 3D outputs. If the relief comes out inside out, set the near end explicitly — see stereo, rocking and 3D.
Lighting
Continuous light is easiest because it does not vary. Flash is brighter and freezes vibration, at the cost of recycling variation between frames; lapstack's brightness equalization is built for exactly this.
Diffuse the light. A stacked image shows specular highlights from every frame overlaid, and a hard light source produces a result that looks harsher than any single frame did.
Stability
At macro magnifications the smallest vibration is visible. Use a solid support, and put a delay between the focus step and the shutter so the rig settles. Electronic front curtain or full electronic shutter avoids shutter shock. If you can, trigger remotely.
Sensor dust
Dust on the sensor shows in every frame at the same place, and a focus stacker makes it worse than any single frame: the region-energy rule reads the spot's edge as detail and picks it, so the spot comes out sharper than it ever was. Worse still, a fixed pattern in every frame pulls the registration toward zero shift.
Shoot a dust map at the same aperture: one frame of an evenly lit, featureless surface — a white wall, the sky, a sheet of paper — thoroughly out of focus. lapstack finds the spots in it and removes them from every frame before alignment. See dust map.
File format
Shoot raw if you can. lapstack reads camera raws directly and can write the stack back as a linear DNG that your raw converter develops like a raw, with exposure, white balance and highlight recovery still open.
If you prefer to develop first, develop the whole stack with identical settings and export sixteen-bit TIFFs. What the fusion needs is not a particular look but that every frame has the same look.
Do not develop frames individually with auto-anything. Auto exposure, auto white balance, auto tone or lens corrections applied per frame will make frames that disagree with each other, and the fusion will show the disagreement as patchwork.
A capture checklist
- Manual exposure, manual white balance, manual focus method.
- Aperture near the lens's sharpest, not its deepest.
- Step by about half the depth of field.
- Cover past both ends of the subject — a wasted frame at each end is cheap.
- Stable support, delay before shutter, remote trigger.
- Diffuse light.
- Shoot a dust map at the same aperture if the sensor is not spotless.
- Note which end you started at.