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

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: New script for denoising linear monochannel images
« Reply #75 on: 2015 December 23 20:30:34 »
jerry i had previously sent mike two fresh 600s darks and two fresh bias, 1mhz, with and without RBI - that's what he's referring to above.

rob

Offline Dimitris Platis

  • PixInsight Addict
  • ***
  • Posts: 181
Re: New script for denoising linear monochannel images
« Reply #76 on: 2015 December 24 03:04:57 »
I should add that testing the effects of the script in a Drizzled image (variance 0.8, and Noise taken from bias) I had a significant noise reduction.
Perhaps its worth just testing different parameters of the scripts at random even in Drizzled images

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: New script for denoising linear monochannel images
« Reply #77 on: 2015 December 24 08:50:31 »
Hi Dimitris,

For drizzled images, here is a starting point for experimentation. Set Combination count to the number of images combined in the drizzle, set Interpolation method to Nearest Neighbor, set detector parameters as usual (gain and Gaussian noise from bias), and set Variance scale as shown in the table below. This table shows values for various Drop shrink values and an Output scale of 2. The resulting denoising will likely be conservative and minimal, but the result will be in a sense "SNR safe" as it accounts for the relatively large noise correlation introduced by drizzle up-sampling. Use this as a starting point, you may try increasing Variance scale to get more denoising at risk of artifacts and loss of SNR.

For bayer drizzled images, you can try something similar. (Warning: this application to bayer drizzle is theoretical and has not been tested so it may be wrong.) For R and B channels, do as above using a Variance scale of 0.11 (the entry in the table corresponding to a Drop shrink value of 0.5). For the G channel, use the same variance scale of 0.11, but double the Combination count value to account for the two G channels. Again, use this as a starting point and increase Variance scale at your own risk.

I want to say again that the results with these suggestions will likely be minimally denoised. Almost or completely to the point of not even worth doing. But they might be a useful starting point for playing around with the script.

Thanks,
Mike

Drop shrinkVariance scale
0.50.11
0.60.13
0.70.15
0.80.16
0.90.17
1.00.17
« Last Edit: 2015 December 24 10:19:04 by mschuster »

Offline Dimitris Platis

  • PixInsight Addict
  • ***
  • Posts: 181
Re: New script for denoising linear monochannel images
« Reply #78 on: 2015 December 24 11:18:46 »
How exactly would u measure loss of SNR for different Variances?

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: New script for denoising linear monochannel images
« Reply #79 on: 2015 December 24 17:55:43 »
Unfortunately I don't. Variance scale contributes to an input noise hypothesis, the denoiser gives an optimal solution for this input and a built-in set of denoising processes. The denoiser does not give comparisons between solutions for different inputs, in a form that would help answer your question. As a result, my SNR comments for different inputs are qualitative: the higher the specified noise (maybe beyond a justifiable uncorrelated detector and shot noise specification), the higher the risk of confusing signal and noise and the introduction of artifacts. When playing around with drizzle images, just be aware of the risk and judge for yourself whether the result looks acceptable or not.

Thanks,
Mike
« Last Edit: 2015 December 24 18:06:17 by mschuster »

Offline Dimitris Platis

  • PixInsight Addict
  • ***
  • Posts: 181
Re: New script for denoising linear monochannel images
« Reply #80 on: 2015 December 24 23:17:48 »
At the completed Drizzled image state I agree it is difficult to estimate SNR.....however, I must say that even at Variance 0.8 (tested with a Heart and Soul image) no loss or blurring if u wish of structures where observed.
The noise reduction seemed to be done correctly in a manner that seemed natural and not artificial.

Offline jerryyyyy

  • PixInsight Old Hand
  • ****
  • Posts: 425
    • Astrobin Images
Re: New script for denoising linear monochannel images
« Reply #81 on: 2015 December 25 10:39:39 »
Hi Dimitris,

For drizzled images, here is a starting point for experimentation. Set Combination count to the number of images combined in the drizzle, set Interpolation method to Nearest Neighbor, set detector parameters as usual (gain and Gaussian noise from bias), and set Variance scale as shown in the table below. This table shows values for various Drop shrink values and an Output scale of 2. The resulting denoising will likely be conservative and minimal, but the result will be in a sense "SNR safe" as it accounts for the relatively large noise correlation introduced by drizzle up-sampling. Use this as a starting point, you may try increasing Variance scale to get more denoising at risk of artifacts and loss of SNR.

For bayer drizzled images, you can try something similar. (Warning: this application to bayer drizzle is theoretical and has not been tested so it may be wrong.) For R and B channels, do as above using a Variance scale of 0.11 (the entry in the table corresponding to a Drop shrink value of 0.5). For the G channel, use the same variance scale of 0.11, but double the Combination count value to account for the two G channels. Again, use this as a starting point and increase Variance scale at your own risk.

I want to say again that the results with these suggestions will likely be minimally denoised. Almost or completely to the point of not even worth doing. But they might be a useful starting point for playing around with the script.

Thanks,
Mike

Drop shrinkVariance scale
0.50.11
0.60.13
0.70.15
0.80.16
0.90.17
1.00.17

Just like to report this is working fine on a new image.  No checkerboarding.  Must have been that image.

To use these Table, save as a txt file?  Did not seem to identify a .txt file. 
« Last Edit: 2015 December 25 17:19:30 by jerryyyyy »
Takahashi 180ED
Astrophysics Mach1
SBIG STT-8300M and Nikon D800
PixInsight Maxim DL 6 CCDComander TheSkyX FocusMax

Offline javajunkie2121

  • Newcomer
  • Posts: 42
Re: New script for denoising linear monochannel images
« Reply #82 on: 2015 December 29 18:17:14 »
Hi:

Has anyone had image size errors when trying to use a master light and a master flat in the script?

I have a red filter light master 2x2 bin and a matching master red flat 2x2 bin and the script is giving me the unequal size error? 

I hadn't had trouble using the master flat for image calibration.  Not sure if I'm using the flatfield compensation correctly?

jeff

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: New script for denoising linear monochannel images
« Reply #83 on: 2015 December 29 19:02:12 »
Hi Jeff,

Sorry for the trouble, the script does test for equal width and height. I double checked the code and don't see a bug. Maybe you could put both in dropbox and I will test.

Thanks,
Mike
« Last Edit: 2015 December 30 06:51:21 by mschuster »

Offline javajunkie2121

  • Newcomer
  • Posts: 42
Re: New script for denoising linear monochannel images
« Reply #84 on: 2015 December 30 07:32:23 »
Hi Mike:

here's link to the 2 files: https://www.dropbox.com/sh/tldr6nwgzi648g0/AACAyK-Rn9_1fxOXSREz86SLa?dl=0

master flat was 25 flat frames, bias subtracted, combined with image integration
master red light was 11 frames, flat and dark calibrated, combined with image integration

jeff

Offline martin farmer

  • Newcomer
  • Posts: 32
Re: New script for denoising linear monochannel images
« Reply #85 on: 2015 December 30 07:40:43 »
Hello,

I have run into a message from this excellent noise routine:-

Attempt to execute a Script instance recursively. Sorry, but this is not supported in this version of Pixinsight.

Version 1.14 of MureDenoise
Pixinsight Version 01.08.04.1195 Ripley (x64)
Running on a MacBook Pro under OSX 10.11.2 El Capitan

Is there a newer version of this script?

Thanks

Martin

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: New script for denoising linear monochannel images
« Reply #86 on: 2015 December 30 08:59:48 »
Hi Jeff,

Thanks for the files. The images do have unequal size, so the script is working properly: Master red is 3352x2532 and Master flat is 1676x1266.

For denoising, you may upsample the flat using the process IntegerResample with the parameters Resample Factor set to 2 and Upsample selected. For image calibration I would not want to upsample a flat, but for denoising upsampling will not introduce problems since the script applies a large scale smoothing filter.

Note: Master red might be a drizzle result. If so, note that the script does not denoise drizzle properly.

Thanks,
Mike
« Last Edit: 2015 December 30 09:09:13 by mschuster »

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: New script for denoising linear monochannel images
« Reply #87 on: 2015 December 30 09:15:59 »
Hi Martin,

Thank you, sorry for the problem. 1.14 is the current version. Can you explain how to reproduce the error?

Thanks,
Mike

Offline martin farmer

  • Newcomer
  • Posts: 32
Re: New script for denoising linear monochannel images
« Reply #88 on: 2015 December 31 01:03:16 »
Hello Mike,

I have to hold my hands up on this. It was my fault.
I got this message by setting the parameters in the dialogue box then dragging the triangle over to apply it to the image. Instead of clicking the Denoise button.

I put it down to my age!

The script works very well on my mono narrowband frames prior to stacking. I find it does not alter the structure contained in the picture but the pepper like noise.

Many thanks Mike for writing this useful script.

Martin

Offline joelshort

  • PixInsight Addict
  • ***
  • Posts: 260
    • Buckeyestargazer.net
Re: New script for denoising linear monochannel images
« Reply #89 on: 2016 January 06 19:56:46 »
I just became aware of this script and boy does it look promising.  Initial tests really impressed me.  I have a couple questions:
1.  Am I correct in assuming that if using a master flat I cannot perform DynamicCrop on the light frames prior to MureDenoise?

2.  In reply #30 it was suggested to use information in the ImageIntegration log file as a guide for setting the variance scale.  What information should I look for in the log?

Thanks for your work on this script.  Again, it looks to be an amazing tool.
Joel Short
www.buckeyestargazer.net
CFF135 f6.7, SV80ST, G3-16200M, QHY163M, QHY183M