View Full Version : How to remove a lot of film grain from DVD source
DJ Alik
14th October 2003, 10:03
Hi I am trying to get rid of film grain from the Devil's Advocate DVD. It's very grainy!!! Here are some source frames
http://www-users.itlabs.umn.edu/~rusi0006/frame1.tif
http://www-users.itlabs.umn.edu/~rusi0006/frame2.tif
http://www-users.itlabs.umn.edu/~rusi0006/frame3.tif
if the link doesn't load right away try hitting refresh.
I have already tried many different things. First of all undot(). That didn't do much. Then I tried various combinations of
Temporalsoften(4,8,8,mode=2,scenechange=10)
Convolution3d("movielq")
FluxSmooth(10,15)
Can anyone suggest me a filter or a set of filters to use on this specific problem. I would be very very grateful.
digitalman
14th October 2003, 12:39
I would be interested also in some information on this. I tried backing up a 70's movie transferred to DVD(supposedly digitally remastered) and was unsuccesful in cleaning up the grainy film.
sh0dan
14th October 2003, 12:58
Filters that might help you (as I don't have anything from the source it's hard to tell).
VagueDenoiser. This one can be very powerful at grainremoval in my experience.
MipSmooth - for softer grain removal.
C3D - also for soft grain removal.
Peachsmoother.
Temporalsoften - in general not to be used with high thresholds, as it mostly causes smearing on thresholds > 5.
Boulder
14th October 2003, 14:14
I've successfully used UnDot followed by FluxSmooth at the default values with some Hitchcock collection movies (The Birds for example). They keep the details very well.
You've also got a nice halo effect around the edges of the character:scared: A slight UnFilter, possibly UnFilter(-5,-5) would help there?
DJ Alik
14th October 2003, 18:22
Thanx for all the replies. But I am not a scripting guru. Could someone tell me what exact parameters to try in a script form. Thanx
slk001
15th October 2003, 18:55
Try using the CondTemporalMedian filter. You can get it here:
http://kevin.atkinson.dhs.org/temporal_median/
I've used it to clean up older films.
DJ Alik
16th October 2003, 03:05
I did what Boulder suggested:
Undot()
FluxSmooth()
UnFilter(-5,-5)
I think the result is pretty good. I didn't actually convert the movie yet but the output frame in VDubMod looks pretty good
here is the original frame:
http://www-users.itlabs.umn.edu/~rusi0006/frame3.tif
and here is the edited
http://www-users.itlabs.umn.edu/~rusi0006/frame3mod.tif
Does anyone think there is something more to be done to improve it?
Big thanx to everyone who replied.
DJ Alik
22nd October 2003, 09:35
Ok. Not since I had a few minutes of free time I decided to test the filters on a small clip. See for yourself
http://www-users.itlabs.umn.edu/~rusi0006/sample.avi
I am not happy with results at all. Look at the background. Especially the walls and such. Lots of artifacts. I need some help with this. What should I do.
Inc
22nd October 2003, 11:13
Boulder gave me a very good hint to Peachsmoother. So I build a combination using also TempSoften and a sharpener if needed.
so try.
- on noisy DVDs....
Temporalsoften(1,3,5,3,2).Peachsmoother()
- on noisy DVDs including sharpen a bit (not in your case!)
Temporalsoften(1,3,5,3,2).Peachsmoother().unfilter(60,0)
- on less noisy DVDs....
Peachsmoother()
- on less noisy DVDs including sharpen a bit (not in your case!)
Peachsmoother().unfilter(60,0)
Just try what works for you ...
Edit: Maybe you have to convert to YUY2 before using Peachsmoother by using
ConvertToYUY2()
DJ Alik
22nd October 2003, 19:08
It looks a bit better but still there are some parts that are just horrible. Especially when the characthers are standing in front of a window and you can see the artifacts jumping around in the white background.
morsa
23rd October 2003, 03:04
if you're talking about the macroblocks try using blockbuster or addgrain or something similar.
Teegedeck
23rd October 2003, 22:49
In case you are encoding to XviD, from my experience it looks more pleasant to leave grain be. Try using the H.263 quantizer with Trellis quantization and quarterpel - it smoothes but still looks crisp. Nothing for 1-CD encodes though, as the noise of course decreases compressiblity.
MrTibs
25th October 2003, 04:14
For fixing the white halo problem, I would suggest the FixVHSOversharp filter. It will eliminate them completely. For DV source you will probably have to run it several times but the results should be much better.
gizmau
25th October 2003, 12:31
did you try the cpu-options of mpeg2dec3 allready?
Fizick
27th June 2004, 17:40
My source is not DVD (but from old 8mm film).
But how remove a lot of middle-size grain?
I try Vaguedenoiser with ugly results with high thresholds.
Any filter combination or algorithm?
Seems, the best result i have got with NeatImage photo-software.
Who know its algorithm ?
The speed is not important to me.
Sample image:
http://bag.hotmail.ru/images/grain.jpg
morsa
28th June 2004, 01:15
I guess this is a task for Frequency Domain filter, and I guess you are the right person for this, Fizick:)
Neat image uses wavelets AFAIK, but don't know its algo.
Also Restoreinpaint has a big library of filters to correct many types of problems.
Doesn't bilateral filter from Trevlac help?
Here are some links :
http://www.j2000.org/
http://www.ece.uvic.ca/~mdadams/jasper/#software
EZW codec.Uses Wavelets.
http://pesona.mmu.edu.my/~msng/EZW.html
Original Matlab:
http://perso.wanadoo.fr/polyvalens/clemens/ezw/ezw.html
Wavelet image constructor Kit
http://www.geoffdavis.net/dartmouth/wavelet/wavelet.html
Hope this helps..
d'Oursse
28th June 2004, 07:37
Fizick: you could use golddust to remove such noise. It's a quite impressive plugin. And it's slow :D
Fizick
28th June 2004, 21:59
The Golddust is great, but not sufficiently slow for me. :)
Morsa,
I already tryed some algo from Restorepaint (thanks for your point to it some time ago) , and writed some quite working script for Black Top Hat algo simulation. I use Masktools, but it is lacked in true erode-dilate for not 1-point objects.
Also I try to tweak Vaguedenoiser, but without great success.
About wavelets, i found a link:
http://taco.poly.edu/WaveletSoftware/
morsa
29th June 2004, 02:56
I name it again, just because it has many new functions, like AOS Barash denoise/deconvolution and I guess that that coupled with some Susan denoising or even a bilateral would give good results for your source.
Thanks for the link:)
Didée
29th June 2004, 08:51
This is that kind of threads making me believe I live behind the moon.
Go on, guys, go on :)
- Didée
kassandro
29th June 2004, 11:05
As Boulder mentioned Undot, I might take the opportunity to preanounce my filter RemoveGrain. With RemoveGrain(threshold=1) it behaves exactly as Undot (but a lot slower). With RemoveGrain(threshold=2) it still doesn't cause any artifacts, but does a lot more denoising. With RemoveGrain(threshold=3) thin lines may be destroyed, but usually the output remains fine even with the maximal threshold=4. Thus RemoveGrain is for fine grain, not for very crude dirt like in Fizick's picture (I couldn't download DJ Alik's pictures!). It was designed as a precleaner for RemoveDirt (http://www.RemoveDirt.de.tf), whose motion detection may be confused by grain. While the filter is quite stable now, documentation is missing and it is too slow. Right now it makes only 21 fps with a 720x576 clip and threshold=2 on my 1.3 GHZ Celeron and with SSE I hope to raise the speed beyond 100 fps. I hope to release the plugin until the end of July.
Fizick
29th June 2004, 17:08
Kassandro!
ONLY 21 fps? :scared:
I want write a similar filter with about 1 fps! :)
See my script impaint:
AVIsource("h:\smena0.avi")
loadplugin("masktools.dll")
function impaint(clip s, int difwhite, int difblack) {
opening=s.inpand().inpand().expand().expand()
maskw=YV12Subtract(s,opening).binarize(127+difwhite)
deflated=s.deflate().deflate().deflate()
closing=s.expand().expand().inpand().inpand()
maskb=YV12Subtract(closing,s).binarize(127+difblack)
inflated=s.inflate().inflate().inflate()
impaintw=maskedmerge(deflated,s,maskw)
impaintb=maskedmerge(inflated,impaintw,maskb)
return impaintb
}
converttoYV12()
dw=30
db=30
impaint(dw, db)
I want try your prelease (PM or e-mail)!
kassandro
29th June 2004, 19:24
Fizick, you can download the plugin here (http://home.pages.at/kassandro/RemoveGrain/RemoveGrain.dll). There is essentially one variable called threshold with values between 0 and 4. 0 = do nothing, 1 = slow Undot, 2 = default mode. The higher the threshold the more denoising and the slower the filter. The speed also depends on the amount of noise. The algorithm is a substantial refinement of that of Undot and will be described in detail in the documentation. With debug=true the number of pixel changes is printed to debugview. There may be up to three pixel changes per pixel (for Y, U, V values)(the debug output will be changed in the official release due for end of Juli). Please don't distribute this plugin any further.
The link seems to work only, if it is typed directly into the internet explorer.
Fizick
29th June 2004, 23:28
Thanks, I download it.
Will try tomorrow.
Fizick
1st July 2004, 23:17
Seems, maximum threshold=4 is too low for my clip. :(
By the way, i decide to release a tweaked version of Vaguedenoiser.
(the speed is surprisingly high, about 3fps :) )
But grain is still on frames. :(
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.