Focus stacking on Android

Macro, product or landscape with a close foreground: when one aperture cannot make everything sharp, focus stacking can. Here is how it works on Android.

Updated

Focus stacking combines several photos of the same scene, each focused at a different distance, into one image that is sharp from the nearest to the farthest point. It solves a problem no aperture can: at close range, even f/16 leaves only a thin slice in focus – and stopping down further makes everything soft through diffraction.

When focus stacking makes sense

  • Macro: flowers, insects, minerals, coins – depth of field is often only millimetres.
  • Product photos: a watch, a bottle or a piece of jewellery sharp from the front edge to the back.
  • Landscape: a flower or rock right in front of the lens and the mountains on the horizon.
  • Architecture and interiors: a detail in the foreground and the room behind it.

How to shoot a focus bracket

  1. Use a tripod whenever you can. Rawfuse aligns frames, but a stable camera gives the cleanest result.
  2. Set everything manually: aperture (f/5.6 to f/11 is a good range), shutter speed, ISO and white balance stay the same for all frames.
  3. Focus on the nearest point and step the focus towards the background. Each frame should overlap the sharp zone of the previous one.
  4. Let the camera do it: many cameras have focus bracketing built in – for example Focus shift shooting (Nikon), Focus bracketing (Canon), Focus BKT (Fujifilm, OM System), Focus Bracket (Panasonic and newer Sony models). Choose a small step size for macro and a larger one for landscapes.
  5. Shoot RAW, and avoid wind and moving subjects – a leaf that moves between frames cannot be stacked cleanly.

How many frames? Landscapes often need only 3 to 5 frames. Macro shots can need 10, 20 or more – the closer you are, the more frames you need.

How to merge the stack in Rawfuse

  1. Copy the RAW files to your tablet and open Rawfuse. Add the folder or turn on RAWs on this device.
  2. Rawfuse detects the focus stack automatically: frames with the same exposure, shot in quick succession, whose sharp zone moves through the scene. They appear as a group labelled FOCUS. You can also select photos and choose Create focus stack.
  3. Open the stack and tap Merge focus stack. Rawfuse aligns every frame to its neighbour – including the slight change of image size when focusing (focus breathing) – and takes the sharpest detail for every pixel.
  4. Check the result with Show focus planes: the overlay shows which frame provided which part of the image.
  5. Edit the result like any RAW and export it as a DNG or JPEG.
Focus stack in Rawfuse with the overlay of focus planes

The result is cropped to the area that all frames cover, because the edges shift a little when focusing.

Tips for clean stacks

  • Gaps in sharpness show up as soft bands: use a smaller step or more frames.
  • Halos around edges appear when foreground and background are far apart. Stopping down a little (f/8 instead of f/4) reduces them.
  • Keep the exposure identical. Set it manually, so that the camera cannot change it from frame to frame.
  • Combine with HDR? A scene that needs both is best shot as a focus stack with the exposure set for the highlights; the DNG has enough room to lift the shadows.

Focus stacking in Rawfuse is currently marked as beta: it works, and it keeps improving with every update. Feedback is welcome at support@martinellabs.com.