Author Topic: StarMask for great stars  (Read 5169 times)

Offline fhuet1

  • Newcomer
  • Posts: 14
StarMask for great stars
« on: 2016 October 15 07:24:51 »
Hello,

I have always he same problem then processing.

I can do a star mask by some methods (StarMask, or usually extracting Luminance, ATW avertsTransform eliminating 1 to 6 layers etc etc).
But my problem is always with the halos from great stars.  My scope is a refractor, so I got round great halos and they are never covered by the mask.

What I'm doing now is cloning the generated star mask (that is suitable for little-medium stars), I erase with CloneStamp all the little stars letting alone only the great stars, and make a dilation for growing them and convolution for smoothing them.

Finally, a Pixelmath adding that mask to the first one with the rest of stars.

But it takes so long and is sometime very tedious!

Is there any other solution I missed??
Thanx
Fernando



Offline Alejandro Tombolini

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1267
    • Próxima Sur
Re: StarMask for great stars
« Reply #1 on: 2016 October 15 12:22:16 »
Hi Fernando, you can manage the inclusion of big stars increasing the scale in Starmask tool. Let me copy part of an article about mask that I am writing.


Increase Scale parameter to increase the protection of big stars. You will notice that the radius of big stars increased while in the rest remained constant:



The Structure Growth section on the StarMask tool allow to control the protection of large and smalls structures in the mask. In this example if we need to extend the area of protection only on the largest stars it has to be increased the "Large-scale" parameter which apply mask protection to larger regions in the image, and at the same time we can control the growth of protection of small stars by decreasing "Compensation" value, or even setting it in cero.



Further processing of the mask can also be done within the StarMask module. If it is needed to increase the protection (higher values in the 0-1 range) you can use "Truncation". Decreasing this value improve protection in the core of the mask structures. Values of 0.5 to 0.3 are enough to have a good protection of stars cores of big stars.



Let me know if it is what you need. The mask article will include also several examples of halo masks and more detailed cases of big stars halos. 

Saludos, Alejandro. 




Offline ChoJin

  • PixInsight Addict
  • ***
  • Posts: 106
Re: StarMask for great stars
« Reply #2 on: 2016 October 15 13:06:19 »
Alejandro, could you further explain what you would do to include big star "spikes" (e.g. from newtonian reflectors)

Offline Alejandro Tombolini

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1267
    • Próxima Sur
Re: StarMask for great stars
« Reply #3 on: 2016 October 15 13:50:25 »
Hi ChoJin,

To include the spikes of big stars I would need to see the images with the spikes and depending on the process to be applied would analyze how to make the mask. The first try would be using the ExtractWaveletLayers script that will let me see the spikes by layer, and could be a good starting point for making the mask. Maybe some further processing of the layer could be needed before making the mask, perhaps with HDRMultiscaleTranformation tool.
I would also probably choose Binarize or RangeSelection tool to build the mask, but it is hard to say without being in front of the image, there are a lot of posibilities with the available tools.
Let me know if you have a specific image and I can make a try.
In this processing example there are a couple of stars with spikes, but I only had to worry in not having them on the mask in order to work in the stars cores.
Saludos, Alejandro.

Offline ChoJin

  • PixInsight Addict
  • ***
  • Posts: 106
Re: StarMask for great stars
« Reply #4 on: 2016 October 16 13:35:40 »
I'd be happy to see how you would mask (a small crop of) an image I'm currently working on.

I want to fix the core, fix the saturation/color, desaturate the background etc. and for that I need a good mask, but I always find the spikes to be challenging

here is the link to the (cropped) data: https://www.dropbox.com/s/n41ovbm82b6l4bb/stars.xisf?dl=0

NB: I attach a jpg preview to this post, I often find it annoying when people post xisf link without any preview ^^

Offline Alejandro Tombolini

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1267
    • Próxima Sur
Re: StarMask for great stars
« Reply #5 on: 2016 October 16 16:21:44 »
Hi ChoJin, thank you for sharing the image. In this case to repair the cores you can solve de mask with StarMask Tool. The objective here is to isolate the core of the big stars and let the spikes out.

Attached are the StarMask icon and also two TGV Denoise icons that I used to repair the cores.
If you have any error when open TGVDenoise module, just set weight in 50 and let the rest of values by default (I am working with Carlos module which is in test)

Please note that the values seted on the processes would need to be adjusted in case you want to apply it over the full image.

Hope this helps.

Saludos, Alejandro.

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: StarMask for great stars
« Reply #6 on: 2016 October 16 21:19:18 »
not to hijack but if you are working with carlos can you ask him if we can get the TGVRestoration and TGVInpaint modules compiled for OSX? i have done the compilation for him in the past if he can't do it.

thanks

rob

Offline ChoJin

  • PixInsight Addict
  • ***
  • Posts: 106
Re: StarMask for great stars
« Reply #7 on: 2016 October 17 07:43:14 »
Alejandro: thank you very much for your help on the core, could you still show how you would include the spikes? (I would need this to adjust the star's color saturation without modifying the galaxy, or for instance to decrease the background's color saturation without modifying the stars and their spikes)

NB: I'm a OSX user, I've never tried TGVRestoration and TGVInpaint, but I second his question about compiling them on OSX ;-)

Offline Alejandro Tombolini

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1267
    • Próxima Sur
Re: StarMask for great stars
« Reply #8 on: 2016 October 18 16:29:58 »
Hi Rob,

not to hijack but if you are working with carlos can you ask him if we can get the TGVRestoration and TGVInpaint modules compiled for OSX? i have done the compilation for him in the past if he can't do it.

Sorry for my English, what I meant was that I was working with the modules of Carlos (not with Carlos)


Alejandro: thank you very much for your help on the core, could you still show how you would include the spikes? (I would need this to adjust the star's color saturation without modifying the galaxy, or for instance to decrease the background's color saturation without modifying the stars and their spikes)

ChoJin, For the objective you describe I would use a Lightness mask protecting the bright areas of the image, and that mask would allow to decrease the saturation or reduce the noise in chrominance of the background.

Anyway, you can try with MultiscaleLinearTransform tool and delete the big scale layer, and then extract the Lightness to make the mask. This mask will cover the star core, the spikes and the reflection. See Image SpikesAndReflection

You can also delete more layers and work only with the smallest, then extract the Lightness. This mask will let you protect only the stars cores and the spikes letting you to work on the reflection. See Image OnlySpikes

You might also operate with the previous generated images with PixelMath tool and substract one from the other and obtain a mask to represent only the reflection area, without spikes and without stars to make some process on that place. See image OnlyReflection

Could be other approaches to the mask working with layers. In the gif in the next post, I have extracted the layes of the image with ExtractWaveletLayers script and substracted  each of them from the image. Each of those images can be used as mask depending on the need.

Note1: I worked over the "After" Image, the one that we had previously repaired the center.
Note2: To work with the full image you may need to adjust the values and also could be needed to apply different processes.

Hope this helps
Saludos, Alejandro

Offline Alejandro Tombolini

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1267
    • Próxima Sur
Re: StarMask for great stars
« Reply #9 on: 2016 October 18 16:30:45 »
Here the .gif

Offline ChoJin

  • PixInsight Addict
  • ***
  • Posts: 106
Re: StarMask for great stars
« Reply #10 on: 2016 October 19 05:05:00 »
Thank you very much Alejandro!

I'm going to experiment along those lines and see how I can then exclude any galaxy residual from the mask