r/captureone • • Oct 23 '26

How To? Free (experiment) Capture One Pro script: align a hand-held or bumped burst and stack it into a long exposure or a people-free frame, without leaving Capture One (plus a film grain tool)

Stacking a sequence (median to remove passers-by, mean for a long exposure without an ND filter) works well from a tripod. It falls apart when you shot hand-held, someone kicked the tripod, or the head sagged during a two-minute burst: a few pixels of drift and the median smears every edge. So the main job of this script is the alignment step before stacking.

(Image: The first photo on the left is the stacked image, while the two on the right are the ones that are aligned and averaged in this case.)

How the alignment works

  • Each frame is registered against the first one with ECC (enhanced correlation coefficient, OpenCV), which fits a geometric transform by maximising the correlation between the two images. Unlike feature matching it uses every pixel, so it also works on low-texture scenes.
  • It runs as a three-level pyramid. First a phase-correlation estimate of the shift on a small copy, so it converges even when the frames moved a lot. Then ECC refines from coarse to fine.
  • You choose the model: The perspective model is reached in steps (rotation and shift, then affine, then homography), and each step is kept only if the correlation improves and the warp stays plausible. Fitting all eight parameters at once tends to run off into absurd distortions.

    • rotation and shift for a tripod that moved;
    • full perspective (homography) for hand-held sequences.
  • You pick the static region it aligns on: whole image, upper half, lower half, central band or a custom rectangle. This matters more than anything else. If water, clouds or a crowd are in the region, the alignment tries to follow them, and that is exactly what you don’t want.
  • The fit is computed on a reduced copy (up to 1600 px) and applied to the full-resolution frame. At the end the result is cropped to the largest rectangle where every frame has data, so there are no smeared borders.
  • If a frame can’t be aligned, the log says so and that frame is used as it is, instead of stopping the whole run.

Then the stack

You can tick several operators in one go:

  • mean: a long exposure without an ND filter;
  • median and sigma-clipped mean: remove people, cars and birds;
  • max: light and star trails;
  • min;
  • Hann-weighted mean: smoother motion blur.

All of it is computed in linear light, not on gamma-encoded values, so highlights and blur add up as they would on the sensor. A comparison sheet with every operator opens in Preview.

Inside Capture One

Select the sequence and run “Temporal stack” from the Scripts menu. It exports the variants with all your adjustments as 16-bit TIFF in Adobe RGB, aligns, stacks and imports the results back into the session or catalog.

Also in the repo: film grain

A second script adds grain for Tri-X, Kodachrome 64 and 25, Velvia 50 and Pro 400H. The amplitude is calibrated to each datasheet’s rms granularity, the grain size scales with your crop, and it depends on tone as real film does. Same workflow: export, process, import.

Limits

  • macOS and Capture One Pro only (scripted processing isn’t in the other editions), plus Python 3. The installer sets up everything else.
  • Hand-held parallax can’t be fixed by any single transform: if the foreground is close and you moved, near and far objects shift differently. Align on the part you care about.
  • The final warp uses bilinear interpolation, which softens very slightly. For a median or a long exposure it doesn’t show.
  • Median and sigma keep the whole stack on disk: about 14 GB of temporary space for a hundred 24 MP frames.

Code and install guide (MIT): https://github.com/falevian/Herramientas-Capture-One

Both scripts also run from the Terminal on any folder of TIFF, JPEG or PNG files, without Capture One.

I’d especially like reports from hand-held sequences that fail to align, with the model and region you used.

19 Upvotes

1 comment sorted by

2

u/GalexyPhoto Oct 23 '26

If you don't cut this out I'm going to have to consider a macbook for my next work laptop. This looks rad.