Author Topic: Better star reduction  (Read 33527 times)

Offline DaveS

  • PixInsight Addict
  • ***
  • Posts: 115
    • Dave's Astronomy Pages
Re: Better star reduction
« Reply #15 on: 2010 September 28 13:04:59 »
I then want to use a module / script that reduces stars in size without me taking a degree

That would be a significant addition to PI, and something that I very quickly found to be a negative aspect, when I started using the software just a few days ago.

Although I have written a few small astro programs in Visual Basic, for my own use, I am by no stretch of the imagination a programmer, and I greatly admire the programming skills of the people that have produced and contributed to PI.

The 'expand', 'feather' and 'minimum filter' approach that I and a great many other astro imagers have used very effectively in PS for a long time, must surely be based upon a set of basic mathematical algorithms, that are not necessarily 'copyright'.

Is it not possible for the programming expertise that resides on this forum, to code a module based on this approach, or similar, that would be make star reduction as easy and effective as it is in PS?

I know this is easy for me to say, as these things take up peoples valuable time, and clearly much of the development and growth of PI, is based upon the goodwill of the ‘team’.

Dave
8" LX200ACF
William Optics FLT110
NEQ6 Mount
SXVF-H9
SXVR-16
SX Lodestar
DMK21AU04
Baader LRGB and NB filters
DiY Observatory
http://www.progressiveastroimaging.com/davesastronomy/

Offline Emanuele

  • PixInsight Addict
  • ***
  • Posts: 270
Re: Better star reduction
« Reply #16 on: 2010 September 28 13:17:23 »
Today I spent the most part of my day playing with the Star Mask proces on one of my test images: NGC6992, taken with a BabyQ.
The FOV is filled with stars, and building a perfect star mask is almost impossible, or at least it is impossible to me.

If there are small stars in the mask, then the bigger one are missing.

I wish as well the Star Mask process would be simpler to use, and that it would also contain a "feather" and "expand" tool.
That would surely be awesome.

Emanuele

Offline twade

  • PTeam Member
  • PixInsight Old Hand
  • ****
  • Posts: 445
    • http://www.northwest-landscapes.com
Re: Better star reduction
« Reply #17 on: 2010 September 28 15:52:23 »
Emanuele,

I can send you my "star reduction" process icon that makes it pretty easy (about four or five steps).  It's not perfect, but it's a lot easier than using StarMask.  All I need is your E-mail address.

Wade

Offline Emanuele

  • PixInsight Addict
  • ***
  • Posts: 270
Re: Better star reduction
« Reply #18 on: 2010 September 29 01:06:58 »
Wade, that'd be wonderful!

My email is: backyardskies@gmail.com

:) I really appreciate it!

Offline RBA

  • PixInsight Guru
  • ****
  • Posts: 511
    • DeepSkyColors
Re: Better star reduction
« Reply #19 on: 2010 September 29 02:13:22 »
Different situations are going to require a different approach...

1.- Do you simply have a "normal" star field but wish the stars overall were a bit less prominent? (ie, smaller??)

2.- Do you have one of these shots of areas that are brutally packed with stars and don't want them to eat the features you're most interested in showing?

3.- Do you want to get rid of just the tiny ones? (but, they're so pretty!)

4.- Or make those tennis balls to look more like stars?

I'm curious too about what that script does because I certainly use different techniques depending on the case. In fact, I often consider to try something "else" (this is where the fun begins). I have used Photoshop techniques in the past, and ever since I started to get better results with the MT/wavelets/etc, I have never gone back to solve this problem with PS again. Oh and I'm not the religious type here, I use whatever works better for me, I don't care who sells it  >:D

The minimum filter in PS is like using the erosion operator with a structuring element where all the values in the mask are "1". As such, the minimum filter in PS can never produce better results than the MT tool in PI because the minimum filter can be perfectly mimicked with MT (now, with the added features of MT this wouldn't make sense and that's why the MT tool is a much better choice). The only differential factor in whatever technique Dave is using then is in the mask (in PS, the expanded/feathered selection). My take is that via wavelets and/or StarMask one should be able to build a mask that'd work as good or better than the feathered selection in PS. BTW I may be the weird type but I never use the erosion operator, I usually pick the Morphological selection operator and slide the selection slider to the left a certain amount to give more erosion than dilation. No scientific reason, it just fancies me doing it that way  :angel:

If the problem is that a MT (with a good mask and all) dims the core of the stars, you can either give them a bit of the punch back with a slight bias over the small scales using wavelets, or simply "save" such cores (again, using wavelets) and add them later to the MT'ed image with PixelMath. This requires no degree and it's rather intuitive IMHO.



Offline Emanuele

  • PixInsight Addict
  • ***
  • Posts: 270
Re: Better star reduction
« Reply #20 on: 2010 September 29 02:51:58 »
Rogelio,

thanks for your impressions and thoughts on this.

For my images, I usually want to reducer the stars - make the smaller - so that the nebulosity of galactic cirrus is more visible. That's all.
Focus is usually great on my images so all I want is to reduce them of intensity and reduce their size.

I will post an image of NGC6992 tonight, when I get home so that we have something to work it, to keep it practical.

Offline DaveS

  • PixInsight Addict
  • ***
  • Posts: 115
    • Dave's Astronomy Pages
Re: Better star reduction
« Reply #21 on: 2010 September 29 03:03:43 »
That's an interesting response RBA, and I fully agree that different images require a different approach, and there is no 'one size fits all' answer.

For me, options 1,2 and 4 from your list apply, and never option 3.

I have only been using PI for just over a week, so am very much a novice when it comes any in-depth knowledge of the software. However, I'm not new to astro image processing, and the difference between PI's MT and PS's 'expand', 'feather' and 'minimum' process, was very quickly apparent, and despite experimentation I cannot achieve as good a star reduction result, as I do with PS.

However, I am very willing to accept that this is very much down to my inexperience with PI. Then again, learning to use the processes in PS, was very easy and logical. To me at least.

As with most software, it is very easy for the skilled developer to forget that the product will be used by people who have no understanding of software development, or the underlying complex mathematical algorithms that make it work.

Having spent the last 20 years of my working career in a research and development environment, I am comfortable with this. To the non-technical end user, the terms ‘expand’, ‘feather’, and minimum are meaningful, whereas Morphological Transformation sounds like something out of a science fiction novel.

I know that this is somewhat going off at a tangent, with respect to the subject matter of this thread, but it does relate to making process easy to use by users at al levels, as well as giving an effective result.

Dave
« Last Edit: 2010 September 29 04:43:40 by DaveS »
8" LX200ACF
William Optics FLT110
NEQ6 Mount
SXVF-H9
SXVR-16
SX Lodestar
DMK21AU04
Baader LRGB and NB filters
DiY Observatory
http://www.progressiveastroimaging.com/davesastronomy/

Offline DaveS

  • PixInsight Addict
  • ***
  • Posts: 115
    • Dave's Astronomy Pages
Re: Better star reduction
« Reply #22 on: 2010 September 29 06:18:54 »
I think that I'm beginning to see some correlation between the effects of PI's erosion filter, and PS's minimum filter.

Earlier on I said that if you apply the PS minimum filter more that once to an image, the stars will take on a diamond shape, and that this could be corrected by rotating the image through 90 degrees before applying the minimum filter again.

With PI, as you apply another iteration of the erosion filter, the stars start to take on a diamond shape by about the 5th or 6th iteration. This is with the Interlacing and amount set to 1. I am assuming that the default 1 in the amount 'box' relates to 1 pixel?

So, it would seem that the erosion algorithm used in both PS and PI are much the same, but that a single iteration of the minimum filter in PS produces a greater reduction in star size, without having to resort to multiple iterations.

From this, I deduce that the minimum filter in PS, more aggressive than that in PI, and as such is able to produce effective star reduction without multiple iterations, and the subsequent deformation of the star shape.

If this is the case, then could not the aggressiveness of the erosion filter in PI, be increased so that less iterations are required to reduce the stars to a suitable level?

As I have said before I am no technical expert in these matters, but am just trying to think within the bounds of my limited knowledge. You may tell me that this not a practical solution, and will respect your expert knowledge.

Dave
8" LX200ACF
William Optics FLT110
NEQ6 Mount
SXVF-H9
SXVR-16
SX Lodestar
DMK21AU04
Baader LRGB and NB filters
DiY Observatory
http://www.progressiveastroimaging.com/davesastronomy/

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: Better star reduction
« Reply #23 on: 2010 September 29 07:12:50 »
Hi Dave
It is possible that this filter in PS uses larger structuring elements. With morphological filters you cannot increase aggressiveness beyond the current maximum setting. As I said before, what this filters do is to calculate statistical data in a neighbourhood you define by the structuring element. You choose either you want the minimum, maximum, median or any other value in the series.
As you saw, PI interface for this process is quite complex. This is for a very good reason: control. Here you control everything that is related to the calculation, and a few extra parameters were added to allow a "selective execution", to protect sharp edges, or low contrast data. Sincerely, I don't think PS implementation is better in any way.

Oh, by the way, the name "Morphological Transformation" is used because this is the "technical" name by all these kind of filters are grouped, and is based on its properties on binary image, where they are used to modify the shape of objects.
Regards,

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

Offline DaveS

  • PixInsight Addict
  • ***
  • Posts: 115
    • Dave's Astronomy Pages
Re: Better star reduction
« Reply #24 on: 2010 September 29 09:06:50 »
Hi Carlos

Thank you for that explanation, I follow the logic of what you are saying, and I'm learning more about  the workings of PI every day  :)

You could call it an unfortunate characteristic of mine, but coming from an R&D background, I always find the need to know why something is happening, as opposed to just accepting it, because it does.  :)

Accepting now that it is not possible the increase the agressiveness beyond the current maximum setting, and knowing that in PS there is a way around the deformed stars (90 deg rotation), albeit a bit of a crude 'fix', is there a process by which the deformed (diamond shaped) stars can be corrected after MT?. Perhaps not the correct word, but a form of "de-convolution" on the star layer maybe.

I understand that Morphological Transformation is the correct generic technical term. Technical terminolgy was part of my everyday working life, but the point I was making was, that I and the people that I worked with knew the terminology, but to those outside of our area of expertise, it was a foreign language  ???.

When giving presenations, it was often necessary to speak in terms that everybody would understand. My point being that the newcomer to astro image processing and PI, could be frightened off by the technical terminolgy used to describe what they were looking to do. e.g. star reduction.

Again, I'm speaking constructively, not destructively.

Dave
8" LX200ACF
William Optics FLT110
NEQ6 Mount
SXVF-H9
SXVR-16
SX Lodestar
DMK21AU04
Baader LRGB and NB filters
DiY Observatory
http://www.progressiveastroimaging.com/davesastronomy/

Offline RBA

  • PixInsight Guru
  • ****
  • Posts: 511
    • DeepSkyColors
Re: Better star reduction
« Reply #25 on: 2010 September 29 10:23:07 »
I have only been using PI for just over a week, so am very much a novice when it comes any in-depth knowledge of the software. However, I'm not new to astro image processing, and the difference between PI's MT and PS's 'expand', 'feather' and 'minimum' process, was very quickly apparent, and despite experimentation I cannot achieve as good a star reduction result, as I do with PS.

I understand. that's why I went through this comparison and pointed out that the difference in this case may very well be in the masking process, although I can see that with the many options the MT tool offers, it too is possible to have things go wrong, versus the single slider in PS's Minimum filter.

Quote
However, I am very willing to accept that this is very much down to my inexperience with PI. Then again, learning to use the processes in PS, was very easy and logical. To me at least.

I would say that PS's goal is to be a powerful but generic software. As such, they for example, give fancy names to simple pixelmath operations - everyone who uses Photoshop "knows" what the Screen blending mode is, but not many know, nor care, that the Screen mode is simply this PixelMath operation: R = 1 - (1-Target) x (1-Blend). In short, Photoshop probably tries to take away some of the thinking process that goes with doing this or that thing. PixInsight on the other hand tries to give you as many options as you can tweak, and while many of the defaults are often better left alone, this sometimes forces you to know how things are done. In the end, you gain knowledge and experience, but some people just rather get things done (hence the popularity of action tool packages for PS such as this one from Noel Carboni - forgot the name)...

This is not to say that in PI you must do everything manually. Many many things do happen behind the curtain as well, but overall you have more control over what you're doing.

Quote
Having spent the last 20 years of my working career in a research and development environment, I am comfortable with this. To the non-technical end user, the terms ‘expand’, ‘feather’, and minimum are meaningful, whereas Morphological Transformation sounds like something out of a science fiction novel.

You and Carlos have already commented on this, but here's my take...

Astrophotography as a whole is a complex discipline that deals with many "obfuscated" terms. During image capture we don't mind using terms such as FWHM, dithering, bias, binning, ADU, and a very very VERY long etc. Why should we feel that ornamenting the terms we use when we reach the post-processing steps is the right thing, and calling things by their real name is obfuscated? (not saying you said this, but some people do)... By calling things by their names we are in fact learning and using the right universal language of image processing. I think that's a GOOD thing. Terms such as dust'n'scratches, levels, lighten blending mode, etc. is not part of the discipline of image processing, but Photoshop-slang.  BTW I don't mind learning "slang" about any given software, doesn't bother me, but I am happy that PI, for the most part, doesn't invent new words for well-known and defined processes nor follows someone else's "slang" when there's a universal name for it. We just need to learn it. Just like one day we learned what the heck does FWHM mean and no one complained ;)

One last thing.. You talked about rotating the image (45 degrees I presume) to work around the diamond-effect of PS's minimum filter. You do understand that every time you do a rotation that involves pixel interpolation (any rotation that isn't 90, 180 or 270 degrees), you're in fact losing details and resolution. It may do for your stars what you want, but I think the price to pay isn't worth it. My opinion (also speaking constructively ;) )

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: Better star reduction
« Reply #26 on: 2010 September 29 11:04:13 »
Quote
Thank you for that explanation, I follow the logic of what you are saying, and I'm learning more about  the workings of PI every day  smile

You could call it an unfortunate characteristic of mine, but coming from an R&D background, I always find the need to know why something is happening, as opposed to just accepting it, because it does.  smile

That is precisesly the spirit we have here. It is not to learn more about PI ways to do things. It is about learning "Digital Image Processing". We want to know what is happening, and why, and we want you to know. :)

Quote
Accepting now that it is not possible the increase the agressiveness beyond the current maximum setting, and knowing that in PS there is a way around the deformed stars (90 deg rotation), albeit a bit of a crude 'fix', is there a process by which the deformed (diamond shaped) stars can be corrected after MT?. Perhaps not the correct word, but a form of "de-convolution" on the star layer maybe.

I don't get why rotating the image 90° should fix that. As far as you use symmetrical structuring elements, I don't see any reason why anything should change. Anyway, what do work fine is rotating the structuring element 45°. For example, applying a 5x5 box, and then a 7x7 diamond generates less artefacts (in terms of modifying the shape of the stars... shape, morphology... :D got it? ) In fact, this procedure was suggested a long time ago by Vicent, to create a "large scale" image, deleting the stars with MT filters (and then smooth the result with layer deletion in ATWT). I use that method to create a sort of sepparation between stars and other small scale elements from the medium and large scale ones, and process them appart. This works well on large field pictures.

BTW, another method to create a star mask is to use the ATWT. Just disable every scale layer greater than 8px (for example) and apply it. Then, use curves or the HT to leave out non stellar features (assuming the their edges were not as sharp as the stars, this works fine). Then MT lets you fine tune the size of the star mask (in this case, MT works as the expand/feather feature, while the mask is the selection).

BWT2, there are no layers in PI ;) (well, wavelet layers are the exception, but they are another beasts). Masks are just other images, that act as such when you create the link, but they still have their own life. You are not putting them on top of the caller image, in the sence of layers.

Quote
Again, I'm speaking constructively, not destructively.
Don't worry!!! Critics make us grow. Keep them comming.
I understand your point about the technical name. At the end, this is (will be) Juan's choise, but IMO, if using the technical name gives you a better idea of what is happening, or encourages to to learn more about it, then it should stay. And, in the very specific case of the MT, I simply cannot think on a better name. They are not used just to shrink the stars... you may modify the size of features in a mask, fill gasps, "open bridges"...
Regards,

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

Offline DaveS

  • PixInsight Addict
  • ***
  • Posts: 115
    • Dave's Astronomy Pages
Re: Better star reduction
« Reply #27 on: 2010 September 29 11:31:56 »
Another well though out response RBA, thanks you.

Perhaps I'm trying to play 'devils advocate' here, and see things from both 'sides of the fence'. In that although I have a technically inquisitive mind, other people don't, and become discouraged by 'tech speak' used to describe a process that could be phrased in layman’s language.

Although technically correct, I wouldn't ask someone to pass me the Sodium Chloride, when I wanted the Salt ;)

I do know that people have been 'frightened off' by PI's less than conventional GUI, technical terms, and lack of documentation (albeit that is now being addressed), which is sad because the software has a lot offer the astro imager. In business terms it represents a lot of lost revenue that could have been 'ploughed back' into the ongoing development of the product.

I note what you say about detail being lost by 45 deg image rotation (sorry that I incorrectly said 90 deg), but as I also said, I find that a single application of the PS minimum filter (preceded by expand and feather), gives me all the star reduction need without distorting the stars. So I don't use the 45 deg rotation technique, as I don't need to.

I have used Noel Carboni’s  ‘actions’ for star reduction, and although it works well, I much prefer to do the job myself.

I can only assume that Noel sequences the already in-place PS ‘tools’ into an automated routine, but I could be wrong.

For me at least, I have learnt much about the working structure of PI, mainly thanks to Carlos, and hopefully other members will also have done so.

The more I learn about PI, and the more I experiment with it, the more I’m getting to like it.

Dave
8" LX200ACF
William Optics FLT110
NEQ6 Mount
SXVF-H9
SXVR-16
SX Lodestar
DMK21AU04
Baader LRGB and NB filters
DiY Observatory
http://www.progressiveastroimaging.com/davesastronomy/

Offline DaveS

  • PixInsight Addict
  • ***
  • Posts: 115
    • Dave's Astronomy Pages
Re: Better star reduction
« Reply #28 on: 2010 September 29 11:41:44 »
BTW, another method to create a star mask is to use the ATWT. Just disable every scale layer greater than 8px (for example) and apply it. Then, use curves or the HT to leave out non stellar features (assuming the their edges were not as sharp as the stars, this works fine). Then MT lets you fine tune the size of the star mask (in this case, MT works as the expand/feather feature, while the mask is the selection).

There you go, another option within PI has 'surfaced'  8), thanks Carlos, you are indeed very helpful  :)

Dave
8" LX200ACF
William Optics FLT110
NEQ6 Mount
SXVF-H9
SXVR-16
SX Lodestar
DMK21AU04
Baader LRGB and NB filters
DiY Observatory
http://www.progressiveastroimaging.com/davesastronomy/

Offline Harry page

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1458
    • http://www.harrysastroshed.com
Re: Better star reduction
« Reply #29 on: 2010 September 29 12:28:36 »
Hi

Some interesting answers , will need to read hard to get into the old brain

don't stop the talking

Harry
Harry Page