Author Topic: ABE does not seem to apply the model  (Read 11709 times)

Offline David Serrano

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 503
ABE does not seem to apply the model
« Reply #15 on: 2009 February 20 07:58:03 »
Quote from: "Juan Conejero"
v' = v - b + M


Sorry but I don't get it. What's the benefit of/reasoning behind adding M back?
--
 David Serrano

Offline bitli

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 513
ABE does not seem to apply the model
« Reply #16 on: 2009 February 22 10:13:05 »
My understanding is that ABE in a sense does not subtract a background, but a gradient (only what is above order 0 of the interpolated surface, or something like that). So the background color balance is maintained.  I obviously cannot comment on the reason of doing so, but indeed it is surprising to some people so may be there should be some other phrasing for the subtract operation or some choice.

To neutralize the background I found the script in http://pixinsight.com/forum/viewtopic.php?t=799 (which does do an intelligent subtraction of the median), which itself automates the process described in http://pixinsight.com/examples/deconvolution/Gemini-NGC5189/en.html.  I had to dig back my Spanish book to more or less follow the thread, but in fact the script in the last page is quite self explanatory. At least the PTeam cannot say that I do not go out of my way to read the documentation :-) .

I also made an experiment by converting an image spanning a large luminosity range using PixelMath 2*$T-0.5. With rescaling on, the produced image is almost identical in f32 (it should be).
Without rescaling the image display is clipped as expected. What was not clear to me is that the image buffer is also cut at 0.0 and 1.0 (as shown in statistics and by attempting the reverse operation ($T+0.5)*2).

May I assume that all processes clip the image at 0.0 and 1.0 at the end (unless there is an explicit rescale, which already limit the values) ?

Hasta la proxima
bitli

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
ABE does not seem to apply the model
« Reply #17 on: 2009 February 23 04:12:44 »
Quote
My understanding is that ABE in a sense does not subtract a background, but a gradient (only what is above order 0 of the interpolated surface, or something like that). So the background color balance is maintained.


ABE does exactly this. By adding back the median of the image we are trying to recover the original mean background. If we don't add the median, then we are neutralizing the background (provided the background model is accurate, of course). Neutralization can be desirable or not, but for an automatized procedure we decided to implement a less invasive correction.

Anyway, I'll add an option to disable the addition of the median. With this option enabled, of course ABE will prevent any clipping of negative values automatically.

Quote
To neutralize the background I found the script in http://pixinsight.com/forum/viewtopic.php?t=799


Yes, this was a really excellent work by Oriol and David. This tool deserves a C++ implementation as a module.

Quote
May I assume that all processes clip the image at 0.0 and 1.0 at the end (unless there is an explicit rescale, which already limit the values) ?


Indeed. Floating point images (real and complex) are internally bounded to the normalized real range [0,1]. Of course, PixInsight uses the whole range of 32-bit and 64-bit IEEE 754 floating point to perform all intermediate calculations, but the final result of any process is always rescaled or truncated to [0,1], as appropriate and/or selected by the user. This is necessary for PixInsight to know what is black and what is white, among other important reasons.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline OriolLehmkuhl

  • PixInsight Addict
  • ***
  • Posts: 177
    • http://www.astrosurf.com/brego-sky
ABE does not seem to apply the model
« Reply #18 on: 2009 February 23 06:15:36 »
Quote from: "Juan Conejero"
This tool deserves a C++ implementation as a module.



 :lol:  :lol:  :lol: yes... ok! I know that, I am late on my implementations, but  I have had a lot of work in these first months of the year, sorry for that Juan ;)

The good news, are, that in the implementation of the HdrComposition tool in C++ (is almost finished) I have written some useful classes to perform the background neutralitzaton, so is straighforward to have this module :D.

Regards,