Author Topic: New script for denoising linear monochannel images  (Read 42717 times)

Offline blinky

  • Member
  • *
  • Posts: 65
    • View Profile
Re: New script for denoising linear monochannel images
« Reply #150 on: 2019 October 07 14:08:49 »
Only thing is, if I load the variance scale from the stack, then the denoise does not work, the before & after images are the same, leave it at 1 and its fine though

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1029
    • View Profile
Re: New script for denoising linear monochannel images
« Reply #151 on: 2019 October 18 20:37:05 »
Only thing is, if I load the variance scale from the stack, then the denoise does not work, the before & after images are the same, leave it at 1 and its fine though

If the script appears not to be working, check the "Method noise" value in the process console log. If non-zero, then the script is in fact doing something. Depending on the image, the current STF stretch, and especially for very deep stacks where the noise level has been driven down significantly, the difference can be hard to see or distinguish from typical background variations due to unresolved stars, galaxies, and nebulae.

Regarding the loaded variance scale, the loaded value is an estimate that unfortunately does not completely account for the image normalization and weighting operations done by ImageIntegration. Feel free to adjust this value. As a double check, you can redo your processing using Nearest Neighbor interpolation in StarAlignment, and both output normalization and image weighting turned off in ImageIntegration. Doing so basically removes all of PI's pixel level modifications and hence best preserves image noise statistics, and so makes the script's job more straightforward.

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1029
    • View Profile
Re: New script for denoising linear monochannel images
« Reply #152 on: 2019 November 11 08:11:58 »
MureDenoise 1.23 should appear soon as an auto update. Change log:

  • Addressed a PixInsight 1.8.8 metadata compatibility issue involving load variance scale.
  • Removed support for load variance scale from a process log file.
  • Improved the handling of ill-conditioned linear systems that may arise when optimizing the denoising process.
  • Included an optional gradient classifier to provide a minor increase in the adaptivity and accuracy of the denoising process, but also increases processing time by about 50%.

Include gradient classifier is a new checkbox in the dialog. At least on my projects, its denoising improvements are minor and typically visible only with boosted STF stretch. Two examples are shown below. The differences may be more visible if you view them on your computer in a darkened room.

Example 1: 20 hour integration


Example 1: Include gradient classifier disabled


Example 1: Include gradient classifier enabled


Example 2: 15 hour integration


Example 2: Include gradient classifier disabled


Example 2: Include gradient classifier enabled


Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1029
    • View Profile
Re: New script for denoising linear monochannel images
« Reply #153 on: 2019 November 11 19:55:23 »
Here is another example of the Include gradient classifier option. A 20 hour Ha integration of a higher contrast target, for which the gradient classifier appears to be effective. The crops are shown at boosted stretch.

Original 20 hour integration, showing the crop location


Crop of original


Include gradient classifier disabled


Include gradient classifier enabled

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1029
    • View Profile
Re: New script for denoising linear monochannel images
« Reply #154 on: Today at 07:39 »
MureDenoise 1.24 should appear soon as an auto update.

MureDenoise 1.24 uses a new scheme to account for ImageIntegration's normalization, weighting, and output rescaling operations. Rather than load Variance scale, you enable the option Use image metadata. When enabled, the new scheme estimates and applies a linear image transformation for improved accuracy in the accounting.

When Use image metadata is enabled, Variance scale remains unchanged. As before, you may increase or decrease its value to control the amount of denoising. Combination count will be loaded.

The following ImageIntegration settings are supported: Image Integration > Combination: Average. Image Integration > Normalization: No normalization, Additive, or Additive with scaling. Image Integration > Weights: all values. The script is not smart enough to handle other settings, it will apply no transformation in these cases.

Thank you Juan for providing the metadata that makes this improvement possible.