Banding Blaster

Removes row banding (horizontal stripes, the classic Canon DSLR pattern) or column banding (vertical stripes, seen on some CMOS cameras) from the whole image. Every row is shifted up or down so its background level matches the rest of the frame. Mask-aware, one undo step.

The same correction is also a mode of Blemish Blaster (Mode: Banding Blaster). Both give identical results; this standalone tool adds a before/after preview, a preset grip, replay, Function Bundles, scripting and the command line.

1. Using the tool

ControlWhat it does
DirectionHorizontal (default) corrects rows. Vertical corrects columns.
Amount0.00–4.00, default 1.00. How much of each row's offset is removed. 1.00 brings every row's median to the image median. Below 1 is a partial correction, for bands with real signal mixed in. Above 1 over-corrects and is rarely useful: it tends to add noise or inverse banding.
Protect highlightsOn by default. Leaves bright pixels (stars, nebula and galaxy cores) out of each row's median, so a row that crosses a bright object is not pulled down. Keep it on for astronomical images.
Sigma0.01–5.00, default 1.00, used only with Protect highlights. Pixels brighter than the image median plus Sigma robust sigmas are left out. Lower leaves out more; try 0.3–0.5 on very star-dense fields.
ApplyWrites the result to the image as one undo step named “Banding Blaster” and closes the tool.

Preview

The preview shows the whole image, display-stretched so faint banding is visible. Before and after go through the same stretch, so any difference you see is the correction itself. The stretch is for the preview only; the data you apply is never stretched.

The tool follows the active view: click another image and the preview switches to it. Changing Amount is quick; changing Direction, Protect highlights or Sigma measures the image again.

If the image has an active mask, the correction is blended through it (white = corrected, black = untouched), in the preview and when applied.

2. Shortcuts, replay and automation

Preset keyValuesDefault
directionhorizontal or verticalhorizontal
amount0–41.0
protect_highlightstrue / falsetrue
sigma0.01–51.0

3. How it works

Each channel is corrected on its own. Vertical banding is handled by running the row algorithm on columns. Let g be the channel's global median and I the channel. The robust background sigma uses the mean (not the median) of absolute deviations, as Georg Viehoever's original script does:

\sigma_{\mathrm{rob}} \;=\; 1.4826\,\cdot\,\mathrm{mean}\!\left(|I - g|\right)

With Protect highlights on, each row's median uses only the pixels at or below a threshold (a row with none left keeps its offset at zero):

m_r \;=\; \mathrm{median}\!\left\{ I_{r,c} \;:\; I_{r,c} \leq g + \sigma\,\sigma_{\mathrm{rob}} \right\}

Each row is then shifted by the same amount end to end, which is the right fix for a constant per-row readout offset:

I'_{r,c} \;=\; \mathrm{clip}\!\left(I_{r,c} + (g - m_r)\,\cdot\,\mathrm{amount},\;0,\;1\right)

The row medians are measured once per Direction / Protect highlights / Sigma setting and reused while you change Amount.

Credits. The algorithm is a port of CanonBandingReduction.js v0.9.1 by Georg Viehoever (PixInsight JavaScript, GPLv3, 2009–2013). All credit for the row-median method with robust-sigma highlight rejection goes to Georg. SASpro's port is a translation to Python/NumPy with a sort-based masked median, parallel row measurement and vertical-direction support. The port is also GPLv3.