PDA

View Full Version : Removing artefacts after deinterlacing


djidjo
3rd March 2005, 18:07
Hi folks,

I have successfully deinterlaced my PAL videos (25 to 50 fps) with KernelDeinterlace.
I have found that using TemporalSmoother before deinterlacing removes many artefacts after deinterlacing since it reduces dynamic noise and thus "false" deinterlacing due to background noise.
After deinterlacing, there are still some lines left inside moving areas. I didn't find any satisfying filter/parameters that can remove only these lines which seems to be quite easily detectable (but I may be wrong of course). I tried another TemporalSmoother, TemporalCleaner, TemporalSoften, RemoveDirt... None really worked.

So my question is : is there a filter that is "specialized" in removing remaining artefacts after deinterlacing ?

Here's my script :

LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\LeakKerneldeint.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\TemporalCleaner.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\RemoveDirt.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MPEG2Dec.dll")
AVISource("..\SdI_.05-02-18_14-08.01.avi")
#TemporalCleaner (ythresh=8, cthresh=10)
#TemporalSoften(4,8,18,15,2)
TemporalSmoother(5,3)
LeakKernelBob(order=0, sharp=true, map=false, threshold=10, linked=true)
/*here one last line to remove remaining artefacts ?*/

Thanks !
Djidjo

scharfis_brain
3rd March 2005, 18:13
hmm.
you should lower the threshold of leakkerneldeint

neuron2
3rd March 2005, 18:15
Post a screenshot of the artifacts (without postprocessing).

If it is combing sneaking through, reduce your threshold. If it is stairstepping, use an EDI deinterlacer like TomsMoComp, tdeint, or Smart Deinterlacer for VirtualDub.

Boulder
3rd March 2005, 18:50
Are you using LeakKernelBob on purpose for deinterlacing?

Besides, you should not filter the video before deinterlacing. There are some exceptions to this rule but you are not dealing with any of them;)

djidjo
3rd March 2005, 19:18
Well thanks both of you for your quick reply. I made a page with screenshots :
http://trio.ledcrush.free.fr/Deinterlace/index_frames.html

A lower threshold removes the artifacts, but I get background noise, then (although it's much reduced by the temporalsmoother before deinterlacing)

neuron2, do you mean using tomsmocomp, tdeint or smartdeint after LeakKernelBob or instead of ?

Thanks !
Djidjo

Edit : thanks also boulder. Why not processing video before deinterlacing ? The smoother removes some background noise so it removes false deinterlacing. I though it was a good idea... smoothing after seems not so good.

Leak
3rd March 2005, 19:51
Originally posted by djidjo
A lower threshold removes the artifacts, but I get background noise, then (although it's much reduced by the temporalsmoother before deinterlacing)

What exactly do you mean by background noise? Is it perhaps only visible when playing the video - because I can't find any on your threshold=1 screenshot.

Anyway, doing this kind of deinterlacing is always doing a tradeoff between lowering the quality of almost static parts and combs slipping through, so all you can do is experiment with the threshold - if I'd found an algorithm to reliably separate back- and foreground I'd probably be very rich already... :D

np: DJ Koze - Hummell (Pop Ambient 2005)

Boulder
3rd March 2005, 19:58
Originally posted by djidjo
do you mean using tomsmocomp, tdeint or smartdeint after LeakKernelBob or instead of ?

You shouldn't use LeakKernelBob for deinterlacing, use LeakKernelDeint for that. Didn't you notice you got a framerate twice of the original? :)

Edit : thanks also boulder. Why not processing video before deinterlacing ? The smoother removes some background noise so it removes false deinterlacing. I though it was a good idea... smoothing after seems not so good.
Smoothing interlaced video is a no-no, there are plenty of threads explaining things better than I can. You're much better off tweaking the threshold accordingly.

neuron2
3rd March 2005, 22:19
If you freeze frame and zoom in, you can see residual, low-level combing with threshold=20. Sure. But 20 is a large threshold. 7-10 is more reasonable. And it is a big newbie error to get all anal about freeze-framed zooms. The video plays at normal size at full-frame rate, you'll never see those things, especially at threshold 7-10. The threshold gives you a tradeoff between getting rid of perceivable combs and killing good picture detail. There's no perfect algorithm yet developed to perfectly catch combs and spare progressive picture areas.

Do not do any filtering before deinterlacing. The other posters have given good advice.

KernelDeint and clones have a hard threshold designed to spare really static areas, such as titles, logos, subtitles, etc. If that is not a concern, use TomsMoComp. It will get rid of all residual combing, but it will also filter the entire frame.

djidjo
8th March 2005, 14:32
Originally posted by neuron2
KernelDeint and clones have a hard threshold designed to spare really static areas, such as titles, logos, subtitles, etc. If that is not a concern, use TomsMoComp. It will get rid of all residual combing, but it will also filter the entire frame.

I just tried TomMoComp (with the tomsbob), I get even more noise on my static backgrounds. LeakKernelBob with threshold 10 and TemporalSmoother AFTER seems to give the best results, I'll stick with it.

Meantime, I discovered the famous mvbob() which is seems to be THE deinterlacer but it's too slow for what I want to achieve.

Thanks a lot for your help !
Djidjo