Author Topic: Unexpected StarMask behavior  (Read 3070 times)

Offline RBA

  • PixInsight Guru
  • ****
  • Posts: 511
    • DeepSkyColors
Unexpected StarMask behavior
« on: 2011 February 21 00:28:07 »
Unexpected for me at least...

It seems that if I create a star mask off an image, the results may differ from applying the same star mask parameters over just a subsection of the image (say, creating a preview and then a new image from the preview).

What I mean is, the resulting masks may be protecting stars in different ways.

Looks like there's a reason for that, since creating a star mask off a preview seems to analyze the whole image rather than just the preview, and I doubt that's accidental.

Bit of a bummer. Why is that?
« Last Edit: 2011 February 21 01:24:49 by RBA »

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Unexpected StarMask behavior
« Reply #1 on: 2011 February 21 02:12:12 »
The StarMask tool uses a multiscale algorithm to isolate significant image structures (this is the 'structure detection' phase). Unfortunately, a drawback of many multiscale processes is that they are not fully previewable. The reason is that these algorithms are strongly dependent on large-scale features of the image as a whole, which vary when they work on a partial preview. There are cases —as the one you are encountering, probably—, where the differences can be quite significant.

Another example of non-previewable multiscale process is HDRWaveletTransform. In general, you can use a partial preview consistently only if it covers the whole range of brightness present in the image; otherwise the preview results are not guaranteed to be the same obtained for the whole image.

We have these problems in mind and always try to find ways to overcome them, but it is difficult. Anyway, the next version of these tools will provide a significant performance improvement (along with all wavelet-based tools in PixInsight), so this will be less of a problem.

To prevent these problems, define a complete preview (one covering the whole parent image) and work with it. At least, in this way you can get the benefits derived from the volatile nature of previews (no disk swap files and automatic undo), especially with your L-sized RAM ;)
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline RBA

  • PixInsight Guru
  • ****
  • Posts: 511
    • DeepSkyColors
Re: Unexpected StarMask behavior
« Reply #2 on: 2011 February 21 11:56:04 »
Thanks for the reply.

Yes I'm aware of the issue with HDRWT and the previews. I just wasn't aware that StarMask had a similar issue.

Anyway, the next version of these tools will provide a significant performance improvement (along with all wavelet-based tools in PixInsight), so this will be less of a problem.

Well, that'd do it, since the reason I was doing the StarMask on a separate (sub)image was to speed up the mask creation process until producing a mask that'd fit my needs at that moment. Of course, when I found it and applied it to the whole image, that's when I noticed the resulting image was actually different. I'll do the whole-preview thing for the time being.

Thanks again!