Log in

View Full Version : Enhance/extract noise only


anton_foy
24th February 2023, 11:01
How to enhance or extract noise and not details? Tricky I bet.
The result I am trying to achieve is a mask where white is no noise and black is noise. Then I can use this mask and blur it (average blur) to regulate opacity of a denoising filter. This is suppose to be a cheap way to avoid using runtime filters since they are slow.

I have tried:
mt_makediff(last,last.sharpen(0.1)).mt_binarize()
But it reveals details too much.

Any other suggestions are welcome!

kedautinh12
24th February 2023, 13:31
Try --nr in x264 or --nr-inter in x265 (try use big value and if it affect details very much, you can reduce value)

anton_foy
24th February 2023, 13:47
Try --nr in x264 or --nr-inter in x265 (try use big value and if it affect details very much, you can reduce value)

Thanks but how can I use this filtering in Avs+?
I need to use it as a mask.

anton_foy
24th February 2023, 20:01
@Dogway
Sorry don't want to bugger you really but I think you have some thoughts of what to use.

My thinking reversed the sharpening aspect and turns towards ex_bilateral/adaptive/ex_fluxsmoothT (low threshold) or undot mode. Would this be a good idea to recognize and extract grain? Maybe temporal is preferable in this case of high ISO noise/grain or a mix with spatial?

Arx1meD
24th February 2023, 20:02
I have tried:
mt_makediff(last,last.sharpen(0.1)).mt_binarize()
But it reveals details too much.
Change the threshold value from 0 to 255.
For example mt_binarize(threshold=128)

Also try adding mt_inpand(thY=128) and mt_expand(thY=128). Change the value of thY for the result you want.

anton_foy
24th February 2023, 20:10
Change the threshold value from 0 to 255.
For example mt_binarize(threshold=128)

Also try adding mt_inpand(thY=128) and mt_expand(thY=128). Change the value of thY for the result you want.

Thank you! Very clever, but do you think I would need to assort to the temporal aspect in this case? Just reverse to fluxsmoothT or another temporal filter to catch the dancing noise?

Edit: I mean as the authour of fluxsmooth explains that noise is random and temporally so, it should be treated as such which this filter does.

Dogway
24th February 2023, 20:51
@Dogway
Sorry don't want to bugger you really but I think you have some thoughts of what to use.

My thinking reversed the sharpening aspect and turns towards ex_bilateral/adaptive/ex_fluxsmoothT (low threshold) or undot mode. Would this be a good idea to recognize and extract grain? Maybe temporal is preferable in this case of high ISO noise/grain or a mix with spatial?

Yes, detecting grain is basically degraining. Use a good temporal denoiser that it's not too slow. In an example before I used SMDegrain itself (second code block here (https://forum.doom9.org/showthread.php?p=1975232)) although it was just for calculating stats. I removed edges from the diff, as edges are not noise. In the same step you can augment or shape the grain mask at your whim.

anton_foy
24th February 2023, 21:18
Yes, detecting grain is basically degraining. Use a good temporal denoiser that it's not too slow. In an example before I used SMDegrain itself (second code block here (https://forum.doom9.org/showthread.php?p=1975232)) although it was just for calculating stats. I removed edges from the diff, as edges are not noise. In the same step you can augment or shape the grain mask at your whim.

Thanks man! Great info, don't know how I missed this.