Author Topic: HDRMultiscale Transform - different result in Preview vs. Full Image  (Read 2190 times)

Offline rbotero

  • Newcomer
  • Posts: 36
    • View Profile
    • http://www.astrobin.com/users/rbotero/
Hello All

First post to the forum from a newbie to PxI.   I have been using v1.8 for a couple of months now and am pretty comfortable this issue I'm reporting it's not happened to me before and I could not find it reported/solved in the forums (from the searches I have made).

I am processing some Ha info on M106 and am now applying HDRMT to the stretched data.  I usually test this on previews and then apply to the full image with identical results.  The process is being masked at both levels.  My preview shows me the desired result but when I apply it to the full image the outcome is very different (much lower effect).  I cannot reproduce this same behaviour in L or RGB data I processed earlier.  I was applying a mask from the L image to the Ha data and I thought it could be something to do with that so I changed to a Ha mask but to no avail.   

Posting below some screenshots and code; please let me know what else would be of use.

Thanks

Roberto

--------

Before applying HDRMT to Preview:

https://www.dropbox.com/s/r2zxxacfchzi5wa/preHDRMT-Preview.jpg?dl=0

Applying HDRMT to Preview:

https://www.dropbox.com/s/gx0il5eare0uvky/HDRMT-Preview.jpg?dl=0

Result of HDRMT for Preview:

https://www.dropbox.com/s/eh12ztbvnpqexsw/postHDRMT-Preview.jpg?dl=0

Before HDRMT Full Image (same view as Preview):

https://www.dropbox.com/s/92jnqme1bhfgpl1/preHDRMT-Full.jpg?dl=0

Applying HDRMT to Full Image:

https://www.dropbox.com/s/g1u97j6c2u1unfs/HDRMT-Full.jpg?dl=0

Result of HDRMT for Full Image:

https://www.dropbox.com/s/tpd185fw79nvy9l/postHDRMT-Full.jpg?dl=0

For completeness also below is a link to the Ha.xisf file:  https://www.dropbox.com/s/d5uev62m6cvjdhy/M106-Ha.xisf?dl=0

And the HDRMT code:

Code: [Select]
/*
 * Start time: 2015/04/24 09:45:46 UTC
 * Execution time: 22.194 s
 */
var P = new HDRMultiscaleTransform;
P.numberOfLayers = 5;
P.numberOfIterations = 1;
P.invertedIterations = true;
P.overdrive = 0.050;
P.medianTransform = true;
P.scalingFunctionData = [
   0.003906,0.015625,0.023438,0.015625,0.003906,
   0.015625,0.0625,0.09375,0.0625,0.015625,
   0.023438,0.09375,0.140625,0.09375,0.023438,
   0.015625,0.0625,0.09375,0.0625,0.015625,
   0.003906,0.015625,0.023438,0.015625,0.003906
];
P.scalingFunctionRowFilter = [
   0.0625,0.25,
   0.375,0.25,
   0.0625
];
P.scalingFunctionColFilter = [
   0.0625,0.25,
   0.375,0.25,
   0.0625
];
P.scalingFunctionName = "B3 Spline (5)";
P.deringing = false;
P.smallScaleDeringing = 0.000;
P.largeScaleDeringing = 0.250;
P.outputDeringingMaps = false;
P.midtonesBalanceMode = HDRMultiscaleTransform.prototype.Automatic;
P.midtonesBalance = 0.500000;
P.toLightness = true;
P.preserveHue = false;
P.luminanceMask = true;

Offline llpastro

  • PixInsight Addict
  • ***
  • Posts: 196
    • View Profile
    • Sonoran Dark Skies
See the "HDRMT Issue" discussion under the General catagory.

Larry
AP 140 Refractor
SBIG ST-10XME
AP Mach 1 Mount
ATS Portable Pier
Tucson, Arizona

Offline rbotero

  • Newcomer
  • Posts: 36
    • View Profile
    • http://www.astrobin.com/users/rbotero/
Thank you Larry; will read it.  :D

I have managed to solve my particular issue using the SubstituteWithPreview Script after running the HDMT process on the individual previews.

Roberto

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 6934
    • View Profile
    • http://pixinsight.com/
Hi Roberto,

This is normal behavior. Most multiscale analysis algorithms don't fully support partial previews. The main reason lies in the natural scale dependency of these algorithms. If you define a preview that does not include a good representation of large-scale image structures, the result may not be what you'll get when you apply the same process to the whole image, and in some cases the differences can be substantial.

In the MultiscaleLinearTransform and MultiscaleMedianTransform tools, we have implemented a special cache system that precomputes the necessary transforms on-demand for the whole parent image, and reuses cached data dynamically under the hood. This allows precise partial previsualization of these processes, including real-time previews.

Unfortunately, a similar implementation is impractical (for now) for the HDRMultiscaleTransform process. To avoid this problem completely with HDRMT, define full previews (= previews covering their whole parent images). To minimize this problem with partial previews, try to define relatively large previews including representative bright and dark image features.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline rbotero

  • Newcomer
  • Posts: 36
    • View Profile
    • http://www.astrobin.com/users/rbotero/
Hola Juan

Thank you for your email. I suspected something like this but was surprised to find that the algorithm would work well on the previews of my L image and then on full image (same for RGB) but this would not be the case for the Ha data. Same subject same previews and actually same HDRMT parameters for L and Ha data. The signal is obviously lower in the Ha frame. Maybe if I had a similar SNR to the L image it would work?

Thanks again

Roberto

Offline Warhen

  • PTeam Member
  • PixInsight Old Hand
  • ****
  • Posts: 484
    • View Profile
    • Billions and Billions
Thanks Juan. I see sort of the opposite behavior- small previews show the desired result, large previews as well as the parent image show no result. As you may have seen in the thread on the General forum, I used SubstituteWithPreview script to be able to utilize that result with the parent image.

FWIW, While MLT's 'precise partial previsualization' is nice, it takes a while and isn't quick enough (for me) to toggle before/after results. I find it better to actually apply to a preview and quickly Ctrl+Shift+Z/Y to compare. Thanks!
Best always, Warren

Warren A. Keller
www.ip4ap.com