Log in

View Full Version : Is there any "automatic blur filter" in Avisynth


munnasunna
3rd March 2007, 11:53
Hello,
Is there any filter which can automatically blur out scenes like which have more details/color/luminace. This is just a thought which came into my mind, i was thinking maybe the filter will work like this-- if color count is 100 then the filter will blur 0.1 if it is 200 the 0.2 and so on. Is it possible using avisynth. I use Megui for encoding, x264 as the video codec. I think if such filter is used it will result in more compression, i might be wrong also. Please suggest if any.

Blue_MiSfit
3rd March 2007, 12:03
It sounds like what you are looking for is a good denoiser :) there are lots and lots of these.

I suggest starting with fft3dfilter (or its DX9 GPU accelerated cousin fft3dgpu), removegrain, etc. They can really boost compressibility and subjective image quality a lot IMO.

~MiSfit

munnasunna
3rd March 2007, 12:15
:thanks: for the quick reply :), i will try the filter mentioned and tell u if it helped.

munnasunna
3rd March 2007, 14:33
I just tried the filter fft3dfilter, i m confused,i used (sigma=4 ) i think the filter worked constantly blurring out whole of the video from start to end. I tested it on the hdtv sample video from microsoft site "coral reef adventures 720p". I m looking for a filter which can adjust the blurring relative to scene complexity which is i think similar to VBR method, like high detailed scenes will be more blurred than low detailed ones. Or may be i m doing something wrong, i dont have much idea about the filter, please tell the correct setting if possible to automate the blurring.

Blue_MiSfit
4th March 2007, 09:37
Well, sigma=4 is a very high setting :)

You need to read the documentation more carefully.

I suggest running this filter in two seperate instances, one for luma and one for chroma denoising. i.e. one with plane=3, and one with plane=0. I also generally use the inbuilt sharpening on the luma plane. I would definitely drop the sigma a lot! Possibly 2-3 on the chroma and .5 - 1.5 on the luma

As for automatically adjusting the strength on a per-scene basis, I'm not sure if any denoiser can do this. Maybe MVDegrain, since it uses motion vectors. Not sure :)

foxyshadis
4th March 2007, 11:06
vcmohan has a lot of experimental filters (http://avisynth.org/vcmohan/). They aren't all particularly effective - the flip side of experimental :p - but one very much like what you describe is VarianSlim. Two more along similar lines are AdaptiveMedian and NirMalam.

Typically an mvdegrain, frfun7, or fft3dfilter will give you very effective denoising, more easily, and degrainmedian or fluxsmooth are better for fast processing, but there's always a place for the hundreds of alternatives out there on tricky material.

Didée
4th March 2007, 13:47
From an easy practical point of view: since you're using x264, you don't need to do so. Just make a CBR encoding - x264 will use higher quantizers on complex scenes, and hence will blur those scenes more than the less complex scenes.

From the filtering point of view: it would take about whopping five lines (or so) of Avisynth code to modulate some blurring by the frame's spatial complexity.
Some time ago, Soulhunter posted two more complex avisynth functions (by mf) that can achieve what you want. Thread: "Advanced" denoising (http://forum.doom9.org/showthread.php?t=122719).
... But that was the reinvention of the wheel -- it's been already years since Homie FR made the QMF script that basically does just that, in an even more complex way. :)

Biggest problem is that this approch in general is to consider as weak & unprecise - in a word, it's "insufficient":
You can't measue "so easily" where blurring should take place and where not.

munnasunna
4th March 2007, 14:02
Currently I am testing all the filters suggested by foxyshadis, Blue_Misfit and Didée, i will tell you soon if it helped :)

munnasunna
4th March 2007, 14:40
Sorry but all the settings of those filters was difficult to understand. :( .I think i have to learn the basics of digital video. Please give me some link from where to start. :)

foxyshadis
5th March 2007, 00:48
Although it sounds like a good idea, it might be obvious after playing around that the reason more filters aren't based off it is that it's just plain not a very effective method of denoising. That happens to too many good ideas, sadly. I forgot to mention that last night, but that's why I didn't bother to put together a simple script demonstrating it.