How to remove light pollution from astrophotos

Editing software can be used to remove unsightly sky glow and bring out the best in your astrophotography.

Plain illuminated partially covered by fog, soft lights. Credit: elleon / iStock / Getty Images Plus

Light pollution is one of the banes of an astrophotographer’s life. The glow that creeps into images not taken under perfect viewing conditions only gets worse with longer exposures, and pollution invisible to the naked eye can make itself known if you leave the shutter open long enough.

Advertisement

Image-editing programs offer a couple of ways to remove the light pollution.

These are not magic wands that can make images perfect in just a few clicks, and detail smeared beyond recognition by light pollution will not snap back into focus, but nonetheless it may surprise you how much you can rescue an image.

For this tutorial we’re using an image of the Plough, which is circumpolar in the northern hemisphere, taken a little too close both to sunset and an airport.

It suffers from a blue glow rather than the orange that’s frequently produced by street lighting, but the process for removing it remains the same.

Our starting shot of the Plough asterism is marred by an irritating blue glow. Credit: Ian Evenden
Our starting shot of the Plough asterism is marred by an irritating blue glow. Credit: Ian Evenden

Once you’ve got the image open in your editing software, your first port of call is the Hue/Saturation tool (Image > Adjustments > Hue/Saturation).

In the floating palette that appears, use the drop-down menu to select the colour range you want to work with – it would be yellows if your sky glow were somewhat banana-coloured, but in our case its blue.

Experiment with dragging the saturation and lightness sliders to the left.

This can remove a surprising amount of light pollution so long as there aren’t multiple colours to deal with, but this has the downside of removing any colour you’ve captured in the stars themselves.

Start by tweaking the Hue/Saturation sliders for the colour causing the cast in your image. Credit: Ian Evenden
Start by tweaking the Hue/Saturation sliders for the colour causing the cast in your image. Credit: Ian Evenden

To avoid this, you can do something clever with layers. In the Layers palette, duplicate the background layer (Right click > Duplicate Layer) and make sure the new layer is in front of the original by putting it above the original in the palette’s stacking order.

It usually goes there by default. Completely blur this new layer until no stars are visible using Gaussian Blur (Filter > Blur > Gaussian Blur).

In the floating palette that appears, set the radius to about 50 pixels – you want to make sure the star detail is completely gone.

Click OK, and you’ll be presented with a very smooth, averaged version of your scene, approximately the same colour as the light pollution you’re trying to remove.

We’re going to blend the layers using the Subtract blend mode, which can be selected from the drop-down menu on the Layers palette.

Subtract is a simple bit of arithmetic that subtracts the numerical colour values of one layer from those underneath, displaying black if it returns a zero.

Stars blurred out, the remaining pollution can be removed with a Subtract blend. Credit: Ian Evenden
Stars blurred out, the remaining pollution can be removed with a Subtract blend. Credit: Ian Evenden

As we averaged out the top layer using the blur, the background becomes black while the stars retain their colour, and become even easier to see on the new dark background.

If you find the black a little too stark, experiment with the opacity of the top layer using the slider on the Layers palette (it’s next to the blend modes) to bring back a touch of colour.

This is also an opportunity to tinker further with the image by running a Levels adjustment on the background layer to enhance the stars further.

In our final shot the stars are clear but the background sky glow is nowhere to be seen. Credit: Ian Evenden
In our final shot the stars are clear but the background sky glow is nowhere to be seen. Credit: Ian Evenden

Doing this to our Plough image brings out a yellow colour from the star Dubhe (Alpha Ursae Majoris) on the right of the Plough’s ‘bowl’.

Once you’re happy, flatten the image from the Layers menu and save as a new file.

Advertisement

This article originally appeared in the September 2015 issue of BBC Sky at Night Magazine. Ian Evenden is a journalist working in the fields of science, tech and photography.