Star Reduction in GIMP — a tutorial using Wavelet Decompose

Paul Bleicher
6 min readDec 29, 2020
Photography is about emphasizing the subject in a photo. While the stars in the photo on the left are accurate, they detract from the natural beauty of the Andromeda Galaxy. If we reduce their intensity, we have a more visually powerful photo.

Having recently arrived at astrophotography as a hobby, I am bringing together two loves — astronomy and digital photography/post-processing of images. While it is going to be a long time before I am ready to meaningfully contribute my DSLR astrophotographs, I have been learning and practicing post-processing of astrophotographs. And that practice has led me to adapting a technique for star reduction that I would like to share with you.

My initial reaction to the processing of astrophotographs was that one had to be “scientifically rigorous.” As I delve further into this area, I realize that amateur astrophotography is art, informed by science. The desired end product is something beautiful. In fact, most astrophotographs of nebula represent a view that no human being has ever seen. Often, they use HDR to create photos with dynamic range far beyond the object itself.

So, as in any photograph, the purpose of amateur astrophotography is frequently emphasizing the subject while de-emphasizing features of the background, just as it is in regular photography. As you can see by the photos, removing the stars around and in front of the Andromeda galaxy (M31, and here M32 and M110).

I developed this method based on postings by others elsewhere (including one from “the Elf” here: https://www.cloudynights.com/topic/674074-star-reduction-with-gimp/) , so I don’t claim it as my own. But I think I have simplified it to be relatively easy. After working on it with my early photos, I found the perfect subject posted on Facebook by Raluca Dana Lica in an amateur astrophotography group. Her husband had abandoned the photo and she spent some time in Lightroom getting it to this point. (For the astrophotographers out there, her description of the settings: 160 × 120 seconds @ iso 1600, Sony a7iii, Lacerta 10", iOptron CEM70, taken from our backyard, Bortle 5.)

When I saw it, I immediately knew that this was a perfect subject for my method. So, here it is:

  1. Open the photo in GIMP. I am using version 2.10.14. One of the tools I am going to use was originally a plug-in in earlier versions, so you should upgrade to the newest version.
  2. Duplicate the Layer by right clicking and bringing up the Layer menu. Label it “Mask Layer.”

3. Highlight the Mask Layer and choose Filters -> Enhance -> Wavelet-decompose. This is an amazing tool and is really useful for editing certain “worry lines” on portraits, for example. Here, it is great for picking stars away from nebula, galaxies, etc.

4. In the dialog box, increase Scales to 7. Make sure you have the same selections as shown. You will have a number of new layers appear, labeled Decomposition, Scale 1 through 7 and Residual.

5. Starting with the Residual layer, one by one click on the eyes of this and the seven Scale layers to make them invisible. As you do that, you will notice that the galaxy disappears and the stars remain highlighted in white. Eventually, the stars fade as well. Keep the scale where the stars are highlighted but the galaxy is gone visible, as well as the layers above this. For me, that is scale 1 and 2 (and possibly 3).

6. With the grey screen visible with tiny white stars on it, right click the Mask Layer and choose “New Layer from Visible” from the menu. A new layer will appear named visible.

7. Right click on the layer named “Decomposition” and choose Delete Layer. You will now have your original layer, a Mask Layer above it which is identical at this point, and a grey Visible Layer.

8. Highlight the Visible layer and pick Colors -> Threshold. This will turn your image to pure black and white. Slide the black triangle below the histogram to the right until just the stars you want to reduce are showing. You can, at any point, make the Visible layer invisible and see the actual stars. By blinking between these, you should be able to exactly highlight the duller stars. The brightest objects and the galaxy (or your subject) won’t be highlighted. Click OK.

9. Right click on the Visible Layer (which is now a white starfield on a black background) and choose “Add Layer Mask.” Choose “Grayscale Copy of Layer”

10. Make sure the layer mask has a white box around it in the layer list, right click on the boxed mask and choose “Mask to Selection.” The selection “ants” will dance on the photo.

11. Pull down from the menu: Select-> Grow and choose 4 pixels (you can experiment with 3–5, but 4 works well for me).

12. Pull down from the menu: Select-> Feather and again choose 4 pixels (again 3–5 will likely work).

13. Finally, choose the Mask Layer, right click and choose Add Layer Mask, this time choosing Selection. Click Add. Click on the selection box and in the photo to make the dancing ants go away. You now have a new Mask on your Mask Layer that isolates the stars.

14. Delete the “Visible” layer; you don’t need it anymore.

15.Highlight the Mask Layer if it isn’t already and choose the left box — the photo — and not the mask.

16. Go to Filters -> Generic -> Erode and click it once. If this is too much of an effect, don’t worry. You will fix it in the next step. If it isn’t enough, repeat it.

17. Now, adjust the Opacity of the Mask Layer to suit your desired appearance. I chose 90% here. You can compare to the original by making the Mask Layer alternately visible and invisible.

18. Optional — you may have some bright stars that weren’t included in the mask, but you would like to fade. You can duplicate the bottom layer, create a black mask (one of the options) on it, highlight the mask box and paint over the stars with your paintbrush (on a “spray” type brush) with white paint. You can then do the same Erode on this layer. If you are comfortable, you could do this right on the first Mask Layer you made and do both at once. But having two separate layers allows you to Erode the small stars more (or less) than the big ones.
Try both, blinking on and off, and delete the one you don’t like.

19. Right click on any layer and select Flatten Image and you are done.

20. Special Optional Bonus: At step 16, instead of Erode, you can try Filters -> Distorts — > Value Propagate. Change the Mode to “More Black.” Erode has no options, but here you can lower the Propagating Rate, the Upper and Lower Thresholds and other choices. In the end, you will adjust the effect with Opacity anyway. I don’t really see the difference between this and Erode, but if you like to dial things up and down, here you go. ( I learned this here: https://astrofarsography.com/star-sizes-gimp/)

Here is the result showing the original and 50 to 90% opacity.

--

--