by Roger N. Clark
Complex astrophotography image processing with high light pollution is made simpler with the rnc-color-stretch algorithm
The Night Photography Series:
M31 High Light Pollution
Astrophotography in a high light pollution environment poses several challenges. While it is easy to subtract the light pollution level, one can't subtract the photon noise in the sky signal. An additional problem with high light pollution when imaging with digital cameras is small variations from noise or faint stars cause small variations in signal levels. These small variations get magnified when faint signals typical in astrophotos are stretched, creating splotchy colors at low signal levels. Rnc-color-stretch determines plausible light pollution levels and subtracts that level before stretching and can mitigate a splotchy sky background.
Another common problem in high light pollution photos is a gradient in the light pollution. Rnc-color-stretch does not yet handle gradients, but approximate gradients can be subtracted in an image processor well enough that rnc-color-stretch can do a quality stretch. Remaining gradients can then be subtracted in an image editor. This article illustrates using rnc-color-stretch on a high light pollution astrophoto with a gradient.
The example used here was an image obtained in a red zone on the light pollution map, from the Denver, Colorado metro area using a 300 mm f/2.8 lens on a Canon 7D mark 1 camera using an IDAS LPS-P2 light pollution filter. The light pollution, even with the filter was very high (Figure 1).
A large part of the light pollution was subtracted in the raw converter, and the stacked image is shown in Figure 2. Settings were similar to those in the basic work flow (Part 3A1), except the filter changes the color balance. By examining the RGB response of solar-type stars a color temperature of 9000 Kelvin was found to make those stars white. Stellarium was used to find solar-type stars in the image. Note, one needs to subtract the sky level in each color channel to find the correct RGB intensity to a star. The resulting stacked image is shown in Figure 2.
The next step after stacking and cropping off the edge was to run rnc-color-stretch (Figure 3). The result shows a strong intensity and color gradient. This gradient is too large, so the image was brought into photoshop (CS6) and the right half of the image selected, feathered by 999 (the max in CS6) and the curves tool used to subtract the increases light pollution. I use the pixel readout on the left and right sides of the image to check if sky levels were close to the same. The result is shown in Figure 4.
The next step was to run rnc-color-stretch again on the new image, using the same parameters as in the first try. The result is shown in Figure 5, which is significantly better. The next step is to check for artifacts. This is best done by looking at the individual color channels in black and white. For example, the red channel is shown in Figure 6. Here we see the splotchy background: the dark holes in the sky background. The other channels show similar "holes" but in different positions. Again, this is a function of small variations in the sky background, including noise and faint stars that modulate the intensity at a small level. This is not a dark frame issue.
The "dark hole" or color splotchiness is an artifact of the algorithms in raw converters in interpolating the Bayer color matrix intensities to construct a color image. The algorithm was fooled by low level noise and faint stars. Again, this is not a dark frame problem, or a camera sensor problem There are multiple ways to mitigate this problem:
In practice, #1 above is the preferred method to mitigate this problem. But failing that, and often one can't get all the exposure time needed because of time limits, weather changing like incoming clouds, oncoming twilight, or the object is setting. Then a combination of #2 and #3 can improve the result.
Rnc-color-stretch can mitigate the "dark hole" problem by setting a minimum threshold. The -setmin option looks for pixels below the threshold value for each color channel and raises the signal to above the threshold. Faint stars and image structure will be maintained but the signal level raised. For this image, I found that after a couple of test runs that a minimum 8000 (on a 0 to 65535 scale) did a good job of solving the problem. I also redid the raw conversion with increases luminance and color noise reduction. The result is shown in Figure 7.
The image from Figure 7 is the output of rnc-color-stretch and that image was brought into photoshop and the curves tool use to adjust levels and color to produce the final image in Figure 8. There splotchiness has been minimized for this data. To reduce this problem further, more exposure time is needed, or dark skies.
The image in Figure 7, has some low level gradients remaining, so the 16-bit image was brought into photoshop and the gradient reduced using curves (See Part 3c for examples how to do this). The color balance was improved also using curves. The color balance is close to but not exactly natural color because the light pollution filter modifies the color response too much. For a high light pollution sky and relatively short exposure time, this is a credible image.
The rnc-color-stretch software is free and open source. You can download it from
8a) Software for nightscape and astrophotographers in this series.
High light pollution skies pose severe challenges to astrophotography. Rnc-color-stretch can help to bring out color and stretch images made in such environments, but additional work is needed to produce a good result. Rnc-color-stretch makes the task easier.
References and Further Reading
Clarkvision.com Astrophoto Gallery.
Clarkvision.com Nightscapes Gallery.
The Night Photography Series:
First Published November 28, 2016
Last updated November 28, 2016