Log in

View Full Version : Having trouble anti-aliasing live action video


Daner
12th December 2006, 19:35
I'm trying to anti-alias some DVD footage of a television show which was captured using a DV camera and shows up in DGIndex as 29.97fps Interlaced NTSC / 100% VIDEO, yet possesses none of the combing artifacts seen in pure interlaced video. However, it does show significant aliasing on diagonal edges, which I'm guessing is because they performed some sort of deinterlacing on the footage to make it progressive on the DVD, but that's just a guess. Regardless, I've been trying out a number of methods to anti-alias the edges in this video and am not having very good results. I've tried TIsophote, SangNom, LimitedSharpen, as well as a simple Blur(0,1), but I'll be honest that I don't really have much experience using these filters. Any advice or suggestions you can give for this particular source material would be greatly appreciated. Here's a short clip of the untouched source to test with:

MPEG2 SAMPLE CLIP (4.5MB) (http://www.netdepot.org/personal/VTS_01_1.demuxed.m2v)

And here's a screenshot showing some of the aliasing:
http://www.netdepot.org/personal/aliasing.png

wonkey_monkey
13th December 2006, 00:40
Have you tried EEDI2, after separating fields?

David

Mug Funky
13th December 2006, 02:16
i've been using this on stuff that's been deinterlaced (gaah! don't get me started on that crap!)

function undeint (clip c, int "field",int "min", int "max")
{
field=default(field,1)

min=default(min,8)
max=default(max,48)

c= field==1 ? c.assumetff() : c.assumebff()
eedied = c.separatefields().selecteven().eedi2()
bobbed = c.bob(0,.5).selecteven()
edges=mt_lutxy(eedied,bobbed,expr="x y - abs "+string(min)+" > x y - abs "+string(max)+" < & 255 0 ?")
mt_merge(bobbed,eedied,edges.fity2uv(),y=3,u=3,v=3).removegrain(1)
}

usage:

you'll want to try either undeint(0) or undeint(1) and see which is sharper (it depends on which field was ditched during deinterlacing). don't run both in the same script :)

you'll need mt_masktools (masktools v2) and eedi2.

it basically only uses eedi2 when the difference between it and a dumb bob is greater than a threshold. that way noise doesn't dance around as much as with plain eedi2, but edges get the benefit. play with "min" and "max" to adjust it, but as it is now works quite well. it's only stuff with artificially added noise that might benefit from rasing min.

Daner
13th December 2006, 11:55
Thank you Mug Funky, I'll give your script a try! One problem though: I've installed both MaskTools 2.0 alpha 30 and EEDI2, but I still get errors from AviSynth saying it can't find "fity2uv" or "removegrain."

Didée
13th December 2006, 12:09
1) Obviously, you need to load the RemoveGrain (http://home.arcor.de/kassandro/RemoveGrain/RemoveGrain.rar) plugin.


2) FitY2UV has been in v1.5.x of MaskTools, in v2 it's no more present. Either load both old & new MaskTools, or even better, replace
mt_merge(bobbed,eedied,edges.fity2uv(),y=3,u=3,v=3).removegrain(1)

with

mt_merge(bobbed,eedied,edges,luma=true,y=3,u=3,v=3).removegrain(1)


@ Mug Funky: a binary mask ... uuaarrgghh. :D

Chainmax
13th December 2006, 19:10
How about this (http://forum.doom9.org/showthread.php?p=913284)? It was used on a PAL video, but the process seems independent of the source's standard.