Author Topic: Star Shaping  (Read 22334 times)

Offline Jack Harvey

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 975
    • PegasusAstronomy.com & Starshadows.com
Star Shaping
« on: 2007 December 20 07:03:10 »
The thread on Ha combine brought up the topic of star shaping, something I am not doing too well at.  I usually apply a star mask and then use either a Dilatation filter on Morphological Transform or use Atrous Wavelets but set the Bias to a negative number.  My goal is to soften the edges of the stars so they do not look so sharp and punched out from the deconvolution or wavelets used to sharpen the detail inn the object.

I am very interested in the workflow and techniques of others.


--------------------------


   
El hilo de combinar Ha planteado el tema de la configuración de estrella, algo que no estoy haciendo demasiado bien en la dirección. Suelo aplicar una máscara de estrellas y, a continuación, utilizar un filtro de Dilatación en Morphological Transform o el uso Atrous Wavelets pero el conjunto Bias a un número negativo. Mi objetivo es suavizar los bordes de las estrellas, para que no mire tan fuerte y puñetazos a cabo a partir de la deconvolución o los wavelets utilizadas para afinar los detalles del objeto posada.

Estoy muy interesada en el flujo de trabajo y las técnicas de los demás.
Jack Harvey, PTeam Member
Team Leader, SSRO/PROMPT Imaging Team, CTIO

Offline vicent_peris

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 988
    • http://www.astrofoto.es/
Star Shaping
« Reply #1 on: 2007 December 20 07:45:56 »
Hi Jack,

I get the best results with a Morphological Selection filter. This filter gives you the power to regulate the strenght of the dilation / erosion filter. In this filter, a value of 1 means a pure dilation filter, and a value of 0 means a pure erosion filter.

To do a star shaping process, try a selection filter with a valur of ~0.2, a small opacity (~0.1) and many iterations (perhaps 7 or 8). All this with an active star mask, of course.

Another tip... Try to do the star shaping before applying any process that affects the star shapes. Once you have bright white disks, it's hard to recover the smooth profile of the stars.

And another tip... Many times, when I have an image with a huge dynamic range, I do a progressive midtones raising, applying each time a mild star shaping process. The final result is usually very good.


Good luck!
Vicent.

Offline Jack Harvey

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 975
    • PegasusAstronomy.com & Starshadows.com
Morphological filter
« Reply #2 on: 2007 December 20 07:56:23 »
Let me be sure I am understanding as to how to set this filter

Morphological Filter

Operator:  Dilation{Maximum}
Interlacing:  1
Iterations:  About 7
Amount:  2.00
Selection:  No choice as is greyed out

Structuring Element

Size   17
Way   1 of 1
And I selected CIrcular Structure in the buttons

Thresholds  Both at 0.00000
Jack Harvey, PTeam Member
Team Leader, SSRO/PROMPT Imaging Team, CTIO

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Star Shaping
« Reply #3 on: 2007 December 20 08:02:52 »
Hi Jack :)


No, what Vicent suggest (and what I use) is:

Morphological Filter

Operator: Selection 0.2 (or Minimum)
Interlacing: 1
Iterations: About 7 (or up to 10)
Amount: between 0.1 and 0.2
Selection: 0.2 if not using the Minimum

Structuring Element

Size 3x3 or 5x5
Way 1 of 1
CIrcular Structure or Diamond
You may try two ways, one with a circular structure, and the other with a diamond.

Thresholds Both at 0.00000
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline vicent_peris

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 988
    • http://www.astrofoto.es/
Star Shaping
« Reply #4 on: 2007 December 20 08:12:13 »
Morphological Filter

Operator: Morphological Selection
Interlacing: 1
Iterations: About 7 (or up to 10)
Amount: between 0.1 and 0.2
Selection: 0.2 if not using the Minimum

Structuring Element

Size 3x3 or 5x5
Way 1 of 1
CIrcular Structure or Diamond
You may try two ways, one with a circular structure, and the other with a diamond.

Thresholds Both at 0.00000


_________________


Another option is to apply the morphological filter many times with less iterations, alternating circular and square structures, to better preserve the circular shape of the stars.


Vicent.

Offline Jack Harvey

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 975
    • PegasusAstronomy.com & Starshadows.com
Thanks
« Reply #5 on: 2007 December 20 09:27:39 »
Now I think I got it.  Thanks
Jack Harvey, PTeam Member
Team Leader, SSRO/PROMPT Imaging Team, CTIO

Offline Jack Harvey

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 975
    • PegasusAstronomy.com & Starshadows.com
Saving Morphological Selection Profiles
« Reply #6 on: 2008 January 22 07:06:38 »
I have been using this to shape stars as you guys have suggested.  I now note there is a slot <Unnamed> that would seem to suggest that once you set a profile you can save it.  How do you do that?  Thanks
Jack Harvey, PTeam Member
Team Leader, SSRO/PROMPT Imaging Team, CTIO

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Star Shaping
« Reply #7 on: 2008 January 22 07:25:43 »
Hello Jack,

Where it says <Unnamed>, type a name for your structure --use a name that can help you later in remembering what the structure is intended for. Then click the Manage button, and the Structure Manager dialog will open.

On the Current Structure section you'll see the name you have given before. Click the Save button to add the new structure to the current structure set module (.ssm file) that you are using. By default all structures are saved to the default.ssm file, which comes with a set of useful predefined structures. Unless you are using lots of custom structures, it's normally a good idea to use this default module.

If you save your own structures in this way, make a backup copy of the .ssm file before installing a new version of PixInsight, because it will be overwritten. (this is something that we have to fix in future versions...).

Cheers,
Juan
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Jack Harvey

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 975
    • PegasusAstronomy.com & Starshadows.com
Hmmmmm
« Reply #8 on: 2008 January 22 07:40:34 »
I did the above and save the StarShaping ssm.  When I returned the Morph filters to the default settings then tried to load the newly created Star Shaping by going to Manage, selecting the Star Shaping ssm and hitting Load I did not see the parameters in the Morphological box change to what I had defined as Star Shaping???
Jack Harvey, PTeam Member
Team Leader, SSRO/PROMPT Imaging Team, CTIO

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Star Shaping
« Reply #9 on: 2008 January 22 07:47:54 »
Jack,

You must select a structure on the Structure Manager dialog, in the Available Structures section. Just select the desired structure with the combo box, then click the Pick button.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Jack Harvey

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 975
    • PegasusAstronomy.com & Starshadows.com
Hmmm
« Reply #10 on: 2008 January 22 07:56:40 »
Ok I tried that  and it did insert the 5x5 circular structure name into  the name slot.  However the above parameters stayed at defaults values and did not switch to the Star Shaping values I saved
Default                                    Star Shaping
Minimal                                 Morph Selection  
Interlacing   1                                 1
Iterations     1                                 9
Amount         1.0                           0.20
Selection  greyed out                  0.15
Jack Harvey, PTeam Member
Team Leader, SSRO/PROMPT Imaging Team, CTIO

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Star Shaping
« Reply #11 on: 2008 January 22 08:05:12 »
This is normal. What is saved in the .ssm file is just the structuring element. You can use a structuring element with any morphological filtering parameters.

To save all your settings, you must create a process icon from the MorphologicalTransform window (you know, the blue triangle). Then you can save the icon to a .psm file. You can easily build a good library of MorphologicalTransform icons in this way.

Hope this does the trick for you ;)
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Jack Harvey

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 975
    • PegasusAstronomy.com & Starshadows.com
DUH<G>
« Reply #12 on: 2008 January 22 08:09:00 »
Thanks Juan I should have figured that out.  Appreciate the help.
Jack Harvey, PTeam Member
Team Leader, SSRO/PROMPT Imaging Team, CTIO

Offline Simon Hicks

  • PixInsight Old Hand
  • ****
  • Posts: 333
Star Shaping
« Reply #13 on: 2008 January 26 10:34:51 »
Hi guys,
               I have been following this discussion about star shaping with great interest.....I can never get perfectly round stars!  :cry:

Question 1: I have tried the various methods above with some success, but its usually quite variable. The first question is about the use of the Morphological erosion filter. On one of my images all the stars were slightly sqashed in the vertical direction looking a bit like a rugby ball lying on its side. I tried the erosion filter with different structure elements with limited success....until I used a 9x9 structure and actually painted on some extra squares to make it look the same shape and orientation as the shape of the stars. Hey presto, a few iterations and the stars were smaller, rounder (very close to true circles) and brighter...close to being ideal.

However, I've tried it since with nothing like the same success. Was I just lucky the first time, or is this how the structure element works? If so, then is there a way to automate it (sample a standard star in the image?). If this was just luck, then how do I know what shape element to pick?

Question 2: I have been heavily processing some images of M42 to try and bring out some very very faint nebulocity inspired by seeing Wade's Halpha image on the gallery (what a picture!!!). My pictures (3 x 5min subs) were taken with a very cheap Tamron 500mm F8 mirror lens on a Canon 400D, so bringing out any of the faint nebulocity was quite a challenge. At one point I overdid the processing on some of the regions and washed out some of the small faint stars. I had lost the history, (d'oh) so rather than start again I created a star mask of the original. I think I used Growth and Comp = 1 (or 0?) to stop the stars from growing. This gave me nice pinpoint, circular stars....but they were white, obviously no colour information in a starmask. So I then used pixelmaths to give me a new image (the original multiplied by the starmask) which resulted in sharp coloured stars. I could then use Pixelmaths again with an iif statement to put the new stars on the final image only where they had been lost.

Now this is really a fiddle as far as I am concerned. The stars are totally (well almost) fabricated. However, the result was very nice.  :D .

So I was wondering if this could give any ideas as to an elegant way of automatically improving star shape, effectively by using some of the features of the starmask...i.e. lovely circular stars with the right relative intensity, size, cross-section and position.

Just a thought.

Cheers
             Simon

Offline Jack Harvey

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 975
    • PegasusAstronomy.com & Starshadows.com
Howdy
« Reply #14 on: 2008 January 26 11:37:39 »
Simon  I am still struggling also with this.  What works for one image will not work for the others and sometimes nothing seems to work without leaving a bunch of artifact.  So I am still not convinced on this technique.

Of course nothing can improve on getting nice round stars to start with by good polar alignment and guididng and absence of wind etc.  But occasionally Murphey intervenes and you get irregular stars.

Hopefully more advice to come<G>.

In fact it would be instructive if you coluld submit a crop of some of your irregular stars and see if some of the PixInsight Team members could make a step by step tutorial showing the setting used and results.
Jack Harvey, PTeam Member
Team Leader, SSRO/PROMPT Imaging Team, CTIO