Adding stars to starless image causes them to bloat - what am i doing wrong? [Deep Sky] Processing techniques · Chase Davidson · ... · 25 · 850 · 3

Black_Dog_Astrophotography 0.90
...
· 
·  Share link
I have HOO & RGB data for the crescent nebula. I processed the HOO and the RGB seperately but ensured I had a staralignment done before processing. The images are the same size, I've tried to combine them both in 16bit and 32bit format and still have the same issue.

The issue is, my stars in the RGB Stars image are crisp and clean but when I combine them with the HOO image they bloat and some of the close stars fuze together. What am I doing wrong?? Please help, I can provide any information you may need. See zoomed images below:

RGB Stars;
rgb_stars_v6_zoomed.jpg

combined rgb stars and hoo
Crescent_Nebula_v3_zoomed.jpg

pixelmath used to combined;
image.png
Like
andreatax 9.89
...
· 
·  10 likes
·  Share link
It's not the way to do it. The way to do it is:

~((~starless)*(~stars))
Like
Black_Dog_Astrophotography 0.90
Topic starter
...
· 
·  2 likes
·  Share link
andrea tasselli:
It's not the way to do it. The way to do it is:

~((~starless)*(~stars))

I've been using pixinsight for 3 years and I'm embarrassed to say I didn't know that. The stars came out much better in the combined image now but its monochrome image after combination? Any way to keep the color or am I doing it wrong again?

It worked! Thank you all so much.
Edited ...
Like
jhayes_tucson 26.84
...
· 
·  3 likes
·  Share link
BTW, the tool tip pop ups in StarXterminator give the correct pixel math expression that Andrea provided.  That’s how to find the information that Russ provided with the tool.

John
Like
refoster61 1.20
...
· 
·  1 like
·  Share link
Another easy way to screen them in is use the Script Screen Stars found under the Utility section - 
CS,
Rob
Like
carted2 4.17
...
· 
·  6 likes
·  Share link
I use pixelmath and use combine(starless,stars,op_screen())
Like
distant_sky_lights 0.90
...
· 
·  3 likes
·  Share link
I used to use PixelMath to add stars back into my images, but I recently discovered the ImageBlend script (under Script → Utilities), and I find it much better. It allows for fine adjustments to both the starless and star images before blending them. Adam Block has an excellent YouTube tutorial that explains the process in detail.
Like
andreatax 9.89
...
· 
·  Share link
There is no such a thing in the standard PI distribution afaik. I'm running 1.9.2. Besides, you can modulate any unary operation to your taste.
Like
mike1485 24.46
...
· 
·  1 like
·  Share link
andrea tasselli:
There is no such a thing in the standard PI distribution afaik. I'm running 1.9.2. Besides, you can modulate any unary operation to your taste.

Correct. ScreenStars and ImageBlend are both plug ins from CosmicPhotons. Add the following repository addresses to obtain them:
https://www.cosmicphotons.com/pi-scripts/screenstars/
https://www.cosmicphotons.com/pi-scripts/imageblend/

CS, Mike
Like
Mau_Bard 4.06
...
· 
·  Share link
I suspect that most of us (I did it for sure) in the learning phase tried to sum the stars back, before discovering that screening them (the operation suggested by Andrea above) was the right way! So, yours was an excellent question to ask!
Definitively Mike Cranfield's superb scripts are adding further flexibility and interactive control.
Like
Gondola 8.11
...
· 
·  1 like
·  Share link
Not to take the fun away from the PI crowed this is an extremely simple operation in any layer based post processing package like Gimp, Photoshop or Affinity Photo.
Like
Leela.Astro.Imaging 1.51
...
· 
·  Share link
I always have a problem remembering that formula, so I once opened up all the brackets of what those "~" mean on a net basis and I came up with a much easier way for me to remember it:

starless + stars - starless*stars

I think that's the same net effect of "~((~starless)*(~stars))" but I find it easier to remember?
Like
Mau_Bard 4.06
...
· 
·  1 like
·  Share link
I always have a problem remembering that formula, so I once opened up all the brackets of what those "~" mean on a net basis and I came up with a much easier way for me to remember it:

starless + stars - starless*stars

I think that's the same net effect of "~((~starless)*(~stars))" but I find it easier to remember?

Good point: mathematically is exactly the same. Nice way to see the same operation in a different way.
Like
whwang 15.16
...
· 
·  1 like
·  Share link
Interesting.  

I don't use pixel math nor SXT.  I use starnet in command line, and Photoshop for subsequent operations.  In Photoshop, I subtract the starless from the original to get the star image.  After processing the starless images (noise reduction, sharpening, etc), I add the stars back.  It's purely subtraction and addition.  No other fancy operations like the pixel math formulas people showed here.  And I don't have the star bloat problems.  The stars look just like before.
Like
frankz 4.07
...
· 
·  Share link
I don't use pixel math nor SXT.  I use starnet in command line, and Photoshop for subsequent operations.  In Photoshop, I subtract the starless from the original to get the star image.  After processing the starless images (noise reduction, sharpening, etc), I add the stars back.  It's purely subtraction and addition.  No other fancy operations like the pixel math formulas people showed here.  And I don't have the star bloat problems.  The stars look just like before.

When the images are still in linear state, my experience is the same as yours. I use de-screening/screening only after the images have been stretched.
Like
hoppes-no9 4.53
...
· 
·  Share link
I did a comparison of these two methods, on a single set of images:
  1. combine(stars,starless,op_screen())
  2. ~((~starless)*(~stars))


There was no discernible difference to my eye, zoomed in to the individual pixel level.

Not being a PixelMath expert, could someone explain whether, and why, these methods should yield different results?  Happy to do the "better" method if there is one.

Thanks
Dan
Like
messierman3000 7.22
...
· 
·  Share link
starless + stars - starless*stars


this is the way I've done for a long time, before transitioning to using screening in photoshop
Edited ...
Like
whwang 15.16
...
· 
·  Share link
Francesco Meschia:
I don't use pixel math nor SXT.  I use starnet in command line, and Photoshop for subsequent operations.  In Photoshop, I subtract the starless from the original to get the star image.  After processing the starless images (noise reduction, sharpening, etc), I add the stars back.  It's purely subtraction and addition.  No other fancy operations like the pixel math formulas people showed here.  And I don't have the star bloat problems.  The stars look just like before.

When the images are still in linear state, my experience is the same as yours. I use de-screening/screening only after the images have been stretched.

Actually, all my starless operations are done when the image is highly nonlinear. Starnet works better on nonlinear images. So what I said above are for nonlinear images. But I wouldn’t expect it to be any different for linear images. Plain add and subtraction should work. If it doesn’t in PI, something else must be going on.
Like
mike1485 24.46
...
· 
·  2 likes
·  Share link
Daniel Cimbora:
I did a comparison of these two methods, on a single set of images:
  1. combine(stars,starless,op_screen())
  2. ~((~starless)*(~stars))


There was no discernible difference to my eye, zoomed in to the individual pixel level.

Not being a PixelMath expert, could someone explain whether, and why, these methods should yield different results?  Happy to do the "better" method if there is one.

Thanks
Dan

Hi Dan

These two formulae are identical. The combine(stars, starless, op_screen()) is simply a convenient function provided in PI PixelMath to do the same thing as ~((~starless)*(~stars)).
Like
andreatax 9.89
...
· 
·  Share link
It is all down to what the two star removal methods do. In one case they replace the background with a smoothed version of the nearby background (SXT), in the other they leave the background as it is (SN++) so in the latter case addition is the right process. In the former the unary operator "~" must be used to create the product of two negatives of the starless and stars-only image so that the is no effective addition.
Like
mike1485 24.46
...
· 
·  1 like
·  Share link
The key issue is that the formula stars + starless can easily result in a value greater than 1. For example if the starless pixel value is 0.5, the final image will make no distinction between a stars pixel value of 0.5 or 0.9, say, both will result in a pixel value truncated to 1 in the final image. This is why you get star bloat.

I suspect the reason why @Wei-Hao Wang has no issue is that it sounds like you are making relatively subtle changes to the starless image (eg sharpening/noise reduction). If your starless image were stretched before recombination or if stars extracted from an RGB image were recombined with a Narrowband starless image then stars + starless would not work so well.

The screen blend formula has the property that if stars pixel value < 1 and starless pixel value < 1 then ~((~stars)*(~starless)) < 1 so you do not get this star bloat issue. It is a more natural way to combine bright images.

For linear astronomical images the pixel values are generally small so addition/subtraction usually works fine - the addition is generally well below 1 so there is no clipping issue. Actually you can use screen blending here as well if you want. In this connection note the form of the formula presented by @Leela.Astro.Imaging, ie stars + starless - stars*starless. In a linear image stars and starless pixel values are generally both very small so the product stars*starless is very very small so the blend formula is close to stars + starless for linear images.

I don't actually use SN++ but I believe it does not offer the option to "unscreen" stars like SXT does. You can still unscreen however using the "unscreen" formula: stars = (starry - starless)/(1 - starless), or in PixelMath you can use rescale(starry, starless, 1). I would suggest using this approach to extract stars if using SN++ on a non-linear image; make a clone of the original starry image before removing stars so you have both the starry and starless images you need to implement this.

Of course there is also my screenstars script as noted in my earlier post above which automates this and offers a further option to "reverse stretch" before removing/recombining the stars.
Like
hoppes-no9 4.53
...
· 
·  Share link
Mike Cranfield:
Daniel Cimbora:
I did a comparison of these two methods, on a single set of images:
  1. combine(stars,starless,op_screen())
  2. ~((~starless)*(~stars))


There was no discernible difference to my eye, zoomed in to the individual pixel level.

Not being a PixelMath expert, could someone explain whether, and why, these methods should yield different results?  Happy to do the "better" method if there is one.

Thanks
Dan

Hi Dan

These two formulae are identical. The combine(stars, starless, op_screen()) is simply a convenient function provided in PI PixelMath to do the same thing as ~((~starless)*(~stars)).

Thank you Mike!
Like
whwang 15.16
...
· 
·  1 like
·  Share link
Mike Cranfield:
I suspect the reason why @Wei-Hao Wang has no issue is that it sounds like you are making relatively subtle changes to the starless image (eg sharpening/noise reduction). If your starless image were stretched before recombination or if stars extracted from an RGB image were recombined with a Narrowband starless image then stars + starless would not work so well.

Thanks.  Now I get what I missed: people stretch their starless image a lot.  I used to do that in the past and I rarely liked the results.  Now I almost always stretch the stars together with everything else.  I can get that stretching the starless image is to avoid boosting the stars, so the stars won't overwhelm the background nebulas especially in dense star fields. The solution to this is proper star reduction.  If you can reduce the stars, there is no need to separate stars and nebula and stretch the nebula alone.  Of course, there can be many different ways processing an image.  I just share what I do now and what I didn't like before.
Like
Gondola 8.11
...
· 
·  1 like
·  Share link
Wei-Hao Wang:
Mike Cranfield:
I suspect the reason why @Wei-Hao Wang has no issue is that it sounds like you are making relatively subtle changes to the starless image (eg sharpening/noise reduction). If your starless image were stretched before recombination or if stars extracted from an RGB image were recombined with a Narrowband starless image then stars + starless would not work so well.

Thanks.  Now I get what I missed: people stretch their starless image a lot.  I used to do that in the past and I rarely liked the results.  Now I almost always stretch the stars together with everything else.  I can get that stretching the starless image is to avoid boosting the stars, so the stars won't overwhelm the background nebulas especially in dense star fields. The solution to this is proper star reduction.  If you can reduce the stars, there is no need to separate stars and nebula and stretch the nebula alone.  Of course, there can be many different ways processing an image.  I just share what I do now and what I didn't like before.

I go back and forth with this all the time, remove stars or not. Overall, I really would rather not remove them as no star removal process is 100%, disappearing stars or tiny galaxies is all to common. Not to say I don't still do it but the general star reduction tools out there are so good that I do so less frequently.
Like
whwang 15.16
...
· 
·  2 likes
·  Share link
Tony Gondola:
I go back and forth with this all the time, remove stars or not. Overall, I really would rather not remove them as no star removal process is 100%, disappearing stars or tiny galaxies is all to common. Not to say I don't still do it but the general star reduction tools out there are so good that I do so less frequently.

I think the key is why to remove stars?  To just stretch the nebula?  As I mentioned above, this is not my cup of tea.  On the other hand, some other processes are just better done on a starless images.  Noise reduction is one of them.  While tools like NXT can do some smart star-background separation and only smooth the background, but when the strength is set to above certain point, it makes the stars soft.  So when aggressive NR is needed, it's much better to do it on a starless image first and then add the stars back.  Even if some stars or tiny galaxies are mistakenly preserved or removed, this doesn't harm the NR process and the image won't look unnatural once the stars are added back, especially with careful masking during the NR.  Same goes for sharpening.  Many sharpening algorithms can either over-amplify the stars, or leave artifacts around stars.  So for sharpening nebulas and galaxy details, it's much better done on a starless image.  Again, here even if the star removal process mistakenly removes some tiny galaxies, those galaxies get added back later.  Although such small numbers of galaxies would have escaped the sharpening during starless stage, they will look just fine in the final image.

In short, I fully agree that no star removal is 100% complete (without false positive and false negative). However many processes that can be better done on a starless image does not require 100% star removal.  What's mistakenly removed will be added back later anyway.
Like
 
Register or login to create to post a reply.