Log in

View Full Version : How to smooth edges


runforlife
15th August 2009, 20:51
Hi! I'm looking for plugin (program) or script that can smooth this kind of edges:
1 - this kind of edges need to be smoothed (see picture below, red circle).
2 - this edges is quiet good (see picture below, green circle).

Source - standart DV PAL:
AVISource("boat.avi").SeparateFields()
http://img9.imageshack.us/img9/1319/44904956.jpg

Terka
15th August 2009, 22:24
Its because of deinterlace.
Try AVISource("boat.avi").bob(0,0.5)
or some of better deinterlacers yadif, mcbob, mvbobmod, tgmc
if you have good HW and no problems with long processing time, pick tgmc. if your output is 25 (not 50)fps, bob() is not so bad.
ps: read about deinterlace on wiki or 100fps.com ...

runforlife
16th August 2009, 11:12
Thank for answer. Yadif works well, but yadif is Win32 program only. I can’t run Yadif (mcbob, mvbobmod and others) deinterlacer on my TV. Maybe somebody knows good anli-alias filter for AVISynth, VirtualDub, Photoshop. I can’t understand how to detect this edge by using masktools.

scharfis_brain
16th August 2009, 11:26
Thank for answer. Yadif works well, but yadif is Win32 program only. I can’t run Yadif (mcbob, mvbobmod and others) deinterlacer on my TV.
I don't understand what you mean.

A very goog antialiasing-filter (ie. line interpolator) is nnedi2.dll from Tritical for AVISynth 2.5

just try:
avisource("DV.avi")
nnedi(field=-2)

shoopdabloop
16th August 2009, 21:14
TDeint+nnedi2 is pretty good for the initial deinterlacing.

runforlife
17th August 2009, 23:54
Hmm. I want to smooth edges in script like this:
AVISource().SeparateFields().'SMOOTHEDGES()'.Weave()
U can see that i don't want to deinterlace my source. I really have to smooth interlaced material without deinterlacing.

I think "NNEDI2" works pretty good. Thank.

shoopdabloop
18th August 2009, 07:47
the non-smooth edges you see after separatefields occur because each field only has every other line of the full spatial image.
this is natural.

if they are non-smooth even before separatefields, try this:

AVISource("boat.avi")
AssumeTFF()
#bob to 50p
TDeint(1,edeint=nnedi2(field=-2))
#convert to 50i
separatefields().selectevery(4,0,3).weave()

scharfis_brain
25th August 2009, 18:01
@shoopdabloop:
your script effectively does nothing, except wasting CPU cycles.

Mounir
28th August 2009, 03:35
That's interesting what would work for an Mpg (.Vob) ? Also i wanna keep 30fps progressive and not 60fps

shoopdabloop
28th August 2009, 06:36
AviSource("boat.avi")
AssumeTFF()
SeparateFields()
nnedi2(dh=true)
BilinearResize(width,height/2)
AssumeFieldBased()
Weave()