Skip to content

Green Removal ​

Step: Finish

Removes a green cast. Images from one-shot-color cameras, especially after debayering, often show a green tint in the noise and in the faint background: a color camera has twice as many green as red or blue pixels, and airglow adds green on top. Real astronomical objects are almost never green, so green that is stronger than a neutral reference built from red and blue is noise or cast. The module pulls such green values down to that reference and leaves everything else alone.

The module needs a color image. A mono image, or a Bayer mosaic that has not been debayered, is rejected.

Parameters ​

ParameterRangeDefaultEffect
MethodAverage neutral, Maximum neutralAverage neutralThe reference that green is limited to. Average neutral uses the mean of red and blue. Maximum neutral uses the larger of the two and removes less.
Strength0…11How much of the correction is applied. 1 limits green fully, 0.5 goes halfway, 0 changes nothing.

When to use it ​

Use it for images from one-shot-color cameras after Debayer and after Color Calibration. A green tint in the background that is the same everywhere is better handled first by Background Neutralization; this module is for the green that is left, mostly in the noise and the faint parts.

Start with Average neutral at full strength. If the result looks too magenta, or an object that is really green (an oxygen nebula, for example) loses its color, switch to Maximum neutral or lower the Strength.

How it works ​

For every pixel with red R, green G and blue B, the module first computes a reference m:

Average neutral:   m = (R + B) / 2
Maximum neutral:   m = max(R, B)

If G is not larger than m, the pixel is left exactly as it is. Otherwise green is limited and blended with the original by the strength s:

G' = min(G, m)
result G = G × (1 − s) + G' × s

Red and blue never change. Pixels that are neutral, magenta, red or blue, where green is already below the reference, stay bit for bit the same, and a strength of 0 returns the image unchanged.

Because only green is lowered, the pixel gets slightly darker. The module does not compensate for this.

A pixel with no value in red or blue has no reference and stays as it is. A pixel with no value in green stays without a value. The file information (exposure time, filter and so on) is kept.

Neutral clamping like this is a common technique in astronomical image processing. There is no published paper that describes it; the formulas above are the whole method.

Errors ​

  • Green removal needs a color image. The image has one channel. If it is a mosaic from a one-shot-color camera, run Debayer first.