How to reduce star size whilst keeping them looking natural

13 replies1.7k views
Andy Wray avatar
I'm new to the whole idea of managing star bloat.  I tried the following on the Crescent nebula:

* I duplicated my NBRGB image before stretching
* I applied a slightly modified autostretch to my original combined NBRGB image
* I used masked stretching to stretch the duplicate without overblowing the stars
* I applied a star mask to the original
* I copied the relatively unblown stars from the duplicate using Pixelmath to the masked original

The stars are smaller, however they also look more unnatural (blown out centres).

Any tips on how to do this better?

An example is at:



Quick and dirty Crescent
Well Written Engaging
andrea tasselli avatar
Have you tried this:

Generalised Hyperbolic Stretch

Is from a thread just down below. Hre is the link to the source code: https://github.com/mikec1485/GHS/releases
TED DAVIS avatar
Morphological Transformation tool in PI works really well. Stock settings using Starnet++ to separate them.
Roberto Marinoni avatar
I quote too the use of Morphological Transformation in Pixinsight: pay attention to create a good star mask before using it.
Andy Wray avatar
Thank you for the morphological transformation suggestion.  I tried that and it's a great way of reducing a busy star field, but does introduce some noise and reduce detail in other parts of the image.  I guess the answer is a combination of many tools to get the most natural look whilst reducing busy star fields and also staying true to what is out there.
Well Written Insightful Respectful Concise
Die Launische Diva avatar
Andy Wray:
I tried that and it's a great way of reducing a busy star field, but does introduce some noise and reduce detail in other parts of the image.

You truly need a good star mask, and sometimes, you have to treat separately the big and the smaller stars.
TED DAVIS avatar
Die Launische Diva:
Andy Wray:
I tried that and it's a great way of reducing a busy star field, but does introduce some noise and reduce detail in other parts of the image.

You truly need a good star mask, and sometimes, you have to treat separately the big and the smaller stars.


Its the best method I’ve found so far. But that’s just me.
Alan Brunelle avatar
Adam Bloch has several videos (YouTube) introducing and refining a method for reducing stars.  It is a method specifically designed to not introduce artifacts.  It is not uncommon for some methods to create artifacts, such as light or dark rings, that don't show up until later in processing/stretching.  Nothing more demoralizing when you have to back out of a mistake that you made 10 processing steps back. 

In a more recent video Adam introduces a script written by someone else that uses the processing steps in his method.

He suggests that you learn the method prior to adopting the script, so that you fully understand the various steps.  It's ingenious.

His method, as originally presented, is for a fairly subtle reduction.  As he states, it is easy to repeat the method multiple times to create a more powerful effect.  I have found that one can design the masks, etc., in such a way as to make a stronger effect in one shot.  

I have used a number of different methods, sometimes within a single image processing.  One may work better early or later in processing.  Learn them all and also when one might be best applied.
Well Written Helpful Insightful Engaging Supportive
Niels V. Christensen avatar
Besides the already mentioned PI methods you/one can try to use photoshop with this plugin installed, it works fine on my images :-)
https://www.rc-astro.com/resources/StarShrink/index.php
Wei-Hao Wang avatar
I never find it easy to produce natural looking results using just stretching and star masking.  Perhaps it's possible if you are very good at it, but that's not what I like.

Personally, I mainly rely on the minimum filter (roundness mode, r < 1 pixel) in Photoshop to reduce star size together with a star mask to limit the effects on stars only.  If you use PixInsight, the Photoshop minimum filter corresponds to the erosion mode of morphological transform in PixInsight.  You will still need a mask to protect the non-stellar regions.

Another approach is to use whatever star removal tool to remove stars first, stretch the rest of the image (the nebulas), and then add the stars back.

The star removal approach and the minimum filter approach are fundamentally different, despite how similar they may look in terms of suppressing the stellar field.  Before you get super familiar with both methods, my advice is to use both, and use them weakly and carefully.  Don't apply either method at maximum strength at once.  Do it a little each time during your processing.
Well Written Helpful Insightful Engaging Supportive
John Hayes avatar
I use a lot of the methods mentioned here but there is one more to consider.  Star Shrink written Russell Croman for use in Photoshop works quite well.

John
Alan Brunelle avatar
A lot of the replies are answers for experiences as to what techniques and functions work well for individuals.  I would like to offer some of the problems I have had with the methods I have used as well to help you assess also the limitations.  At least from my experiences.

MT (Erosion):  Morphological Transformation (Erosion), with masking to minimize stars was the first method I was introduced to and used.  And I still use this method often.  However lately, I pretty much use it exclusively late in my processing to fine tune the intensity of the starfield.  Typically this is only a light touch up.  The artifacts that MT can generate are unlikely to show at this point.  As suggested MT erosion requires a mask (the mask needs to be inverted so that only the stars are exposed to the MT process) and the quality of this mask can be critical.  Getting a good mask can be difficult or nearly impossible in starfields that are extremely dense.  The problem is that for the MT process to work, it needs to "borrow" data from the background periphery around the star in order to fill in towards the center of the star.  So the mask has to extend out beyond the local boundary of the star.  If the stars are very close together, the mask star elements will overlap.  If your mask "stars" overlap, they will form a network of linked elements that when worked on by MT will cause the cores of stars to become linked with strands of illuminated pixels.  I find this to be unacceptable.  Preventing this for extremely dense stars with the normal mask generator can be quite the challenge and take a lot of iterations.  Factor in the issues that arise when different parts of the image field require different mask parameters and frustration can build.  (I am really only discussing the worst case scenario here.  It is almost never an issue with well isolated stars, such as later on in the process...)  In this worst case, building a proper starmask by using either StarNet or StarXTerminator can be done with more control.  But then one has to take the raw mask from those functions and typically apply Binarize (used to eliminate any background and also select the size class of stars to work on), MT (dilation) to make the mask "stars" round and broad enough to include the background periphery, Convolution to "feather" the mask elements to prevent visible edge effects after star reduction with MT (erosion).  Using these sub-processes to build a mask allows you to better control the problem of overlapping star elements in the final mask.  But sometimes this just cannot be avoided and that is why I feel that other methods are better than MT at earlier stages of processing.  Once mastered, the general method of mask generation is pretty easy to do.  Elements of this can be seen in the Bloch method of star deemphasis.

Bloch (original):  I say original, because I came across this first on YouTube and I believe that it was the first introduction of this method.  I will let you look it up, since I always mess up linking, etc.  For fear of making a mistake in relating someone else's method, my understanding is that this method is basically intended to be used fairly early in post processing.  The theory is that one is trying to achieve the reduction in the star size by filling in the periphery with local image background local to each star (i.e. deep space dark if that is where the star resides, or even nebulosity if that is where the star is).  This is not unlike the objective in the MT process, but Bloch seeks to replace the peripheral with a peripheral that matches almost exactly the color, density, and noise present locally.  If done properly, the common artifact of rings around the star are eliminated come stretching or further stretching that some of the other methods suffer from.  In other words, if done properly, the lightly processed images at this stage, can be processed fully as if unreduced without the arising of ugly artifacts that can happen.  It is interesting just to read and understand his methods of generating the source of the replacement fields used in the process.  A good number of sub-processes he uses and describes in the full process can, alone, stand as methods that could be used for other processing work unrelated to star reduction.  All good things to have in your processing quiver.

Bloch (revised):  Here, I believe I found this on his web site.  This is a similar background replacement method, however, with this revision he suggests the use of a StarNet-generated starless image as a source of background pixels for the replacement.  In other words, let StarNet do the heavy lifting that you would do in the original method when making the noise matched background source.  I have not used this a lot because of the defects StarNet often creates around the "dissappeared" stars.  StarNet has a habit of replacing stars with a hatched background (and not uncommonly a raised signal to normal background) and this will actually show up in the reduced stars.  To modify the starless image to work as well as the original method then amounts to a lot of work that was supposed to be saved.  However, I do use this modification later in processing where it works better (for me) after the bulk of the stretching and noise reduction has been done.  StarNet works better after stretching, but I have found that StarXTerminator to be a better process to pair with this method anyway and is designed to to star elimination with unstretched images (I see now that StarNet now has this function, but I have yet to try it).  

In both the Bloch methods, it is either stated or implied that the point of this process is to create rather subtle reductions.  The goal is to leave an image still rather true to the reality of the captured subs.  He leaves the brightest/largest stars alone, removing them (far fewer in numbers than the others) from the halo mask used to target the stars for reduction.  It is also stated/implied that the method will also avoid modifying the very faintest stars as well.  One can iterate above the single pass with this method to create stronger reductions.  In fact, in his "revised" post, he actually states that using a StarNet starmask, is not recommended because it is actually too good.  That it captures too many of the stars to be reduced.  I would like to state, that I often will adopt my own "ethic" when applying his method.  And that his method can be adjusted to change the targeting or strength of effect.  For example, his suggestion that the method be used to only reduce the stars within a narrow middle range (i.e. not the brighter stars and not the small stars) works well for scenes where you may want only a minor reduction, but I find that using the method this way, but to a stronger effect, causes the starfield to become very flat and uniform.  It can completely destroy the wonderful appearance of depth of field and broad array of stars of different brightness, size along with color.  So for me, there are times I simply need (want ) a stronger star reduction and there are so many faint stars, I insist on applying the method to as many stars as possible.  (But normally still leave alone the brighter few stars which almost no method works well anyway.)  In other words, I am trying to evenly lower the brightness and size of all but the brightest stars.  But I am trying to keep all the stars.  However, this typically causes some of the very faintest stars to basically disappear, but it is certainly not what is typically done for full star replacement, which I try to avoid if at all possible.

Star Replacement:  I find that I have had to resort to this in extreme cases.  I am no expert in this method.  It seems to be "de rigueur" for those who do narrow band processing.  (Not wanting to start a fight in that statement, just my perception.)  I am assuming this comes as a necessity since it is the best way to add RGB stars to the typical unnatural color palette for most narrow band images.  I do OSC exclusively, which may explain why I do things the way I do.  In the rare case where I did full star replacement, with the source of the stars came from an earlier image, I recall some difficulty in the regions around the stars that came in with the star image and did not stretch well, thereby leaving ring artifacts.  You can see for yourself the struggles I had with this image:

NGC 7380 in OSC. Includes Sh2-142 and Sh2-143
  An image that I am not so proud of.  I think if I had more experience, it would have been much more easy.  And others here do a great job with it. 

I think the thing to avoid with star processing is to avoid destroying what is seen as a natural psf function of the star.  Especially for the less bright stars.  You can see this in some images where the star has a fairly sharp edge and the whole star is the same density across the face of the star.  Kind of like the period at the end of this sentence.  Sometimes they are fully saturated. But in the interest of dimming the star, sometimes they look bland, even when colored.  A good psf leaves the viewer with the impression that the image of the star is of a round object, not a circle.  I say these are negatives, but that very much depends on the intended scale of view for the image.  Even flat circles stars could be fine if they are small enough in the intended image scale.  I think we here on AstroBin tend to be pixel peepers.  But when I look at an image, even though I do pixel peep (mostly to learn about processes used), I only seek what its impression leaves on me when viewed full frame.  Most of the methods discussed have a tendency to preserve a psf, since they involve an erosion from outside to inside.
Helpful Insightful
Mike Cranfield avatar
Some great advice here on a perennial problem of astrophotographic processing.  I would encourage following Andrea Tasselli's suggestion above of using the GeneralisedHyperbolicStretch script.  In addition to having parameters that help control star bloat in the first place, it also has the flexibility to "rescue" overstretched stars (assuming they have not gone too far!). An extract from the documentation reproduced below explains how to do this:  The earlier in the stretching progression you can recognize star bloat occuring, the more successful the star rescue will be. The function also depends upon stars not being severly clipped:
  • 1) Choose a D and b of mid to mild strength
  • 2) Move SP all of the way right to 1.0 - this will add the most contrast within the stars - exaggerating the remaining contrast in the stars
  • 3) Move LP slider to a point just below where, on the histogram, the pile up on the right side of the histogram indicates that the stars are bloating. A log view of this histogram is best. A value of 0.9 might be a first guess. LP here will confine the non-linear portion of the "antistretch" to the problematic stars, while minimizing the effect on the remainder of the image, below LP; conduct this stretch - you will see the stars restored
  • 4) Conduct a gentle stretch, with b below 0, a very modest D; SP and LP at zero, and a HP, now set at the level LP was set at (0.9?). This will recover the image brightness lost in step 3)
Helpful Respectful
David Payne avatar
Just to add to Mike's suggestion…  On your initial stretch using the GHS script, pick a b at the maximum intensity, then place that intensity in the somewhere in the middle of your linear histogram peak (on the far LHS of the linear histogram), then apply D to stretch to your desired level watching the logarithmic view of the histogram on the RHS for build-up (indicating star bloat).   If you are still getting star bloat, then reduce HP from 1 somewhat.

The "star rescue" and Mike suggests can then be used to reduce bloat on the brightest stars.

If you are still getting star bloat, then you can consider removing the stars using Starnet, or use a Starnet star mask, but this should only be necessary in a very difficult image where the stars might be over-exposed in order to reveal a particularly dim subject matter.

Hope this helps.
Dave