Author Topic: STF Auto Ignore zero pixels  (Read 2326 times)

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2131
    • View Profile
STF Auto Ignore zero pixels
« on: 2012 April 16 02:52:46 »
When working with mosaics, the aligned panels usually contain lots of zero pixels. The auto-STF that is generated for these is useless and produces results such as this one: http://pixinsight.com/forum/index.php?action=dlattach;topic=4137.0;attach=4557;image . If it would ignore zero pixels, the produced STF would probably be just what the user wants.
Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline fneyer

  • Newcomer
  • Posts: 29
    • View Profile
Re: STF Auto Ignore zero pixels
« Reply #1 on: 2012 April 16 22:55:27 »
This would indeed be very useful. Similarly, it would be good if 'FrameAdaption' adjusts the image based on the non-zero pixels and defines the valid area automatically.
Fabian

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2131
    • View Profile
Re: STF Auto Ignore zero pixels
« Reply #2 on: 2012 April 17 01:18:11 »
I thought frame adaption already does this, but I am not sure. The documentation does not say anything about it. Juan?

If it does not: Yes, this would be important for FrameAdaption, LinearFit, STF.
Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline fneyer

  • Newcomer
  • Posts: 29
    • View Profile
Re: STF Auto Ignore zero pixels
« Reply #3 on: 2012 April 17 02:08:41 »
I got wrong result (in terms of FrameAdaption) when I tried to combine two submosaics: I defined the overlapping areas for StarAlignment which also had some black pixels (since the two images already were mosaics). I tried several ways but it only worked when I defined the preview area in the reference frame strictly without zero pixels. Also, the corresponding area in the other image had to be free of zero pixels. As a result, the overlapping region was quite small which made it more difficult to correctly align the mosaic parts.

In case of LinearFit, the zero pixels are not considered (range can be defined). However, it would be very nice if the linear fit function could be calculated just by a user defined preview area in the reference image.
Fabian

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 6862
    • View Profile
    • http://pixinsight.com/
Re: STF Auto Ignore zero pixels
« Reply #4 on: 2012 April 17 03:55:30 »
When working with mosaics, the aligned panels usually contain lots of zero pixels. The auto-STF that is generated for these is useless

I am aware of this problem. The PI core application maintains a number of data items for all images, including statistical and histogram data among others, which we call global data. Global statistics are computed and maintained (that is, recomputed only when necessary) automatically by the core and shared with all tools and processes requiring them. This greatly improves efficiency of the whole platform because computing statistics is a relatively expensive operation.

The problem is that global statistics don't use pixel rejection, that is, statistical values are computed for the actual pixels of the images, including zeros and ones. The STF AutoStretch feature uses global statistics, so now you know why it does not reject zero pixels.

The solution to this problem is replacing the current fixed scheme of global objects with a more flexible cache of module-defined global objects. This will be available during the version 1.8 cycle. A related additional improvement is also planned: optional 20-bit global histograms, which are really necessary for HDR images, where the current 16-bit histograms lead to posterization of screen renditions. This will have to wait until PI 1.9 or perhaps PI 2.0.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 6862
    • View Profile
    • http://pixinsight.com/
Re: STF Auto Ignore zero pixels
« Reply #5 on: 2012 April 17 04:02:36 »
I thought frame adaption already does this, but I am not sure. The documentation does not say anything about it. Juan?

The frame adaptation feature of StarAlignment rejects all pixels less than or equal to zero and greater than 0.92. you're right that the documentation does not mention this, which is an error; I'll fix it in the next documentation update.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/