Log in

View Full Version : Remove Static Grain / Frosted Glass Effect


ShocWave
25th December 2009, 06:00
I recently imported a Japanese DVD, and it seems to have a strange static grain effect added to the video. It feels like you're watching the movie through a plane of frosted glass, and is a little distracting.

I tried smoothing the picture with FFT but the results were not very good. mctemporaldenoise did a pretty good job with some tweaking, but the static noise remained in the darker areas.

My question is... Since the noise is mostly static, is it possible to make some sort of mask and apply it to every frame to remove the frosted glass effect?

Below is a screencap from the DVD.
http://img138.imageshack.us/img138/2581/35618576.th.png (http://img138.imageshack.us/i/35618576.png/)

Since it is difficult to see the effect unless you see the clip in motion, I've cut a short m2v file from DGIndex:
http://www.megaupload.com/?d=32UDXLSS

MadRat
26th December 2009, 05:07
That is... very peculiar. Are you sure the video isn't supposed to look like that? What script were you using with FFT3DFilter? :script:

thetoof
26th December 2009, 09:27
I guess you could use the masktools to create a mask of the static areas between a large number of frames, but then there are a few problems:
- since what you want to remove is virtually everywhere, how to make the output better than applying a big blur?
- since this is anime, how do you make sure that what is selected is not simply static elements of the animation - you'd crush details on still backgrounds

As I was writing the above, I didn't see any filter that I know about that could do that, so I guess a good old fft3dfilter or dfttest could do the trick *waiting for the crazy ass file to download - 5-10 mb is usually more than enough...*

2 ways: dfttest with a small blocksize and its smart way of recentering the block on the pixel to filter to reduce detail loss or fft3dfilter with ajusted sigmas

mpeg2source("VTS_01_1.demuxed.d2v")
tfm()
tdecimate()
interleave(last,last.dfttest(smode=0,tbsize=1,sbsize=5,sigma=5))#ajust sigma

mpeg2source("VTS_01_1.demuxed.d2v")
tfm()
tdecimate()
interleave(last,last.fft3dfilter(bw=16,bh=16,oh=8,ow=8,plane=4,bt=1,sigma4=0,sigma3=2,sigma2=3,sigma=10).gradfun2dbmod())
Ajust sigmas as you wish to trade between detail and grain removal. As you can see I added a gf2dbmod call after fft3dfilter to dither the introduced banding... lets say "adding good static grain to make gradients look better after removing (too much) "bad" one"

Hope this helps.