Log in

View Full Version : DegrainDenoiseSharpen


ingoldie
26th August 2023, 15:06
Can you help me on improving the following script to get an effective result about denoising without loss of detail?

It causes loss of detail when I increase the value ​​of the denoising parameters(sigma,thSAD etc.).
But I can't get an effective result about denoising when I don't increase the value of the denoising parameters.

function DegrainDenoiseSharpen(clip c)
{
super = MSuper(c, pel=2, sharp=1)
mvbw2 = super.MAnalyse(isb = true, delta = 1, blksize=4, overlap=2)
mvbw1 = super.MAnalyse(isb = false, delta = 1, blksize=4, overlap=2)
mvfw1 = super.MAnalyse(isb = false, delta = 1, blksize=4, overlap=2)
mvfw2 = super.MAnalyse(isb = false, delta = 1, blksize=4, overlap=2)
den= MDegrain2(c.sharpen(0.57).FFT3DFilter(sigma=1.6, dehalo=0.4), super, mvbw1, mvfw1, mvbw2, mvfw2, thSAD=150)
return den
}

guest
26th August 2023, 15:25
Can you help me on improving the following script to get an effective result about denoising without loss of detail?

It causes loss of detail when I increase the value ​​of the denoising parameters(sigma,thSAD etc.).
But I can't get an effective result about denoising when I don't increase the value of the denoising parameters.

function DegrainDenoiseSharpen(clip c)
{
super = MSuper(c, pel=2, sharp=1)
mvbw2 = super.MAnalyse(isb = true, delta = 1, blksize=4, overlap=2)
mvbw1 = super.MAnalyse(isb = false, delta = 1, blksize=4, overlap=2)
mvfw1 = super.MAnalyse(isb = false, delta = 1, blksize=4, overlap=2)
mvfw2 = super.MAnalyse(isb = false, delta = 1, blksize=4, overlap=2)
den= MDegrain2(c.sharpen(0.57).FFT3DFilter(sigma=1.6, dehalo=0.4), super, mvbw1, mvfw1, mvbw2, mvfw2, thSAD=150)
return den
}

I would suggest you have a look at Dogways thread as he has many many filters that work really good.

Dogway
28th August 2023, 15:09
Use a nice prefilter and then moderate denoise settings in SMDegrain. I don't know the source so can't help further.

DTL
28th August 2023, 18:35
MDegrain2 uses really small tr of 2. If you need more degrain better to use MDegrainN with much larger tr of 5..10..15 or more. If you process sort of photon shot noise with Poisson/Gauss distribution its amplitude decreases about as SQRT((2_x_tr) + 1).
So for tr=2 you got max possible degrain of about sqrt(5)=2.2 times less of input.

With tr=16 it is about sqrt(33)=5.7 times smaller (if all blocks fit in averaging process well - SAD good below thSAD).

You can look into EZdenoise https://forum.doom9.org/showthread.php?t=183192 for syntax with MDegrainN with variable tr-value.