View Full Version : I have to remove aliasing from this anime, is it possible?
Cloudstrifeff7
19th May 2011, 13:18
I have to remove aliasing from this anime, is it possible?
Example:
http://img16.imageshack.us/img16/7167/aliasing.th.png (http://imageshack.us/photo/my-images/16/aliasing.png/)
With maa, naa3 or daa I have always this aliasing. It's strange...
Thanks in advance.:)
ESPARO
21st May 2011, 06:21
hi .. can you put your script please.
ESPARO
21st May 2011, 09:34
aaah ^_^ use this : It should reduse the aliasing :
AAA(Xshrp=2,Yshrp=2,US=5,DS=5).maa()
+ you should put your script.. so can we make a better result for you.
Didée
21st May 2011, 18:01
What you have there seems pretty much like a simple SD-->HD upscale ... :rolleyes:
Strange thing is that this seems pretty much immune against the usual AA filters (even those that internally work with half-sized frames, like daa() ). For some reason, the interpolators just don't want to "bite". Perhaps it's too much blue, who knows. ;)
The follwing script seems to do a reasonable job. Beware it is slow! 4 times daa.aWarpSharp2, plus edge masking/merging.
imagesource("aliasing.png").converttoyv12()
o = last
o2 = o.sharpen(1,-1).repair(o,1)
o2 = o2.sharpen(1,-1).repair(o2,1)
ee = o.mt_edge(mode="8 0 -8 16 0 -16 8 0 -8 4",thY1=0,thY2=255,thC1=0,thC2=255,Y=3,U=1,V=1)
\ .mt_lut("x 4 - 4 *").mt_expand().mt_deflate().greyscale()
o2 #.mt_merge(o,ee.invert())
turnleft()
NediAA().awarpsharp2(depth=6,thresh=60,blur=2)
NediAA().awarpsharp2(depth=6,thresh=60,blur=2)
NediAA().awarpsharp2(depth=6,thresh=60,blur=2)
NediAA().awarpsharp2(depth=6,thresh=60,blur=2)
turnright()
o.mt_merge(last,ee,U=2,V=2)
return(last)
#-----------------------
function NediAA(clip c)
{ c.nnedi3(field=-2)
merge(selecteven(),selectodd()) }
Link: Result comparison (http://screenshotcomparison.com/comparison/53327)
CruNcher
21st May 2011, 23:58
try this TIsophote(iterations=2,type=0,tstep=0.4)
and then resharp
Didée
22nd May 2011, 00:21
If you would have tried it before suggesting it, then you wouldn't have suggested it. :)
CruNcher
22nd May 2011, 00:48
hehe ;) just tried to come up with something that wouldn't take years to complete and be a little more native, the settings where just a shot in the blue maybe heavier ones are needed though it can deform the input fast @ high settings. Sometimes i use it for left aliasing in real footage works quiet well (and is relatively fast), i was in the same situation with maa, naa3 or daa failing for me :D
imagesource("aliasing.png").converttoyv12()
o = last
o2 = o.sharpen(1,-1).repair(o,1)
o2 = o2.sharpen(1,-1).repair(o2,1)
ee = o.mt_edge(0,255,0,255,"8 0 -8 16 0 -16 8 0 -8 4",Y=3,U=1,V=1)
\ .mt_lut("x 4 - 4 *").mt_expand().mt_deflate().greyscale()
o2 #.mt_merge(o,ee.invert())
turnleft()
NediAA().awarpsharp2(depth=6,thresh=60,blur=2)
NediAA().awarpsharp2(depth=6,thresh=60,blur=2)
NediAA().awarpsharp2(depth=6,thresh=60,blur=2)
NediAA().awarpsharp2(depth=6,thresh=60,blur=2)
turnright()
o.mt_merge(last,ee,U=2,V=2)
return(last)
#-----------------------
function NediAA(clip c)
{ c.nnedi3(field=-2)
merge(selecteven(),selectodd()) }
I get "Invalid arguments to function "mt_edge"" trying this.
Didée
22nd May 2011, 12:03
Aiiii .... I used a script snipplet from an older script in conjunction with an older version of MaskTools.
Script corrected by using named parameters for mt_edge. Should work now.
Sapo84
22nd May 2011, 14:16
The follwing script seems to do a reasonable job. Beware it is slow! 4 times daa.aWarpSharp2, plus edge masking/merging.
I think the warpsharping effect is too much and it is actually destroing details.
There is a very noticable loss at (780,760) for example.
There is also a little bit of haloing near the edges.
o = last
o2 = o.sharpen(1,-1).repair(o,1)
o2 = o2.sharpen(1,-1).repair(o2,1)
ee = o.mt_edge(mode="8 0 -8 16 0 -16 8 0 -8 4",thY1=0,thY2=255,thC1=0,thC2=255,Y=3,U=1,V=1)
\ .mt_lut("x 4 - 4 *").mt_expand().mt_deflate().greyscale()
o2 #.mt_merge(o,ee.invert())
NediAA()
NediAA().awarpsharp2(depth=5,thresh=60,blur=2)
turnleft()
NediAA()
NediAA().awarpsharp2(depth=5,thresh=60,blur=2)
turnright()
dehalo_alpha(darkstr=0.1,brightstr=0.7)
dehalo_alpha(darkstr=0.1,brightstr=0.7)
o.mt_merge(last,ee,U=2,V=2)
Spline36Resize(1280,720)
naa3mod()
return(last)
function NediAA(clip c)
{ c.nnedi3(field=-2)
merge(selecteven(),selectodd()) }
FUNCTION naa3mod(Clip Clp,Bool "CP")
{
OX = Clp.Width()
OY = Clp.Height()
CP = Default(CP,True)
Clp = Clp.IsYV12() ? Clp : Clp.ConvertToYV12()
Clpnn1 = Clp.nnedi3(1, dh=true,U=CP,V=CP).nnedi3(0,U=CP,V=CP)
Clpy1 = Clpnn1.Spline36Resize(OX,OY,0,-0.5,OX,OY*2)
Clps1 = CP ? Clpy1.MergeChroma(Clpnn1.Spline36Resize(OX,OY,0,-1,OX,OY*2)) : Clpy1.MergeChroma(Clp)
Clpnn2 = Clps1.turnright().nnedi3(1, dh=true,U=CP,V=CP).nnedi3(0,U=CP,V=CP)
Clpy2 = Clpnn2.Spline36Resize(OY,OX,0,-0.5,OY,OX*2)
CP ? Clpy2.MergeChroma(Clpnn2.Spline36Resize(OY,OX,0,-1,OY,OX*2)).turnleft() : Clpy2.turnleft().MergeChroma(Clp)
Return(Last)
}
Seems decent, maybe a little slower than the original version (dropping a NediAA or two should help, at the cost of some residual aliasing).
Clip resolution is actually < 720 (I'd say 540p or 480p, this also means daa() is not actually losing resolution).
Edit: On second thought I'd say it's better to mask everything (so resizing o after the sharpening stage and masking at the end of the chain).
And, anyway, I'd try to use the lowest possible final resolution.
Cloudstrifeff7
24th May 2011, 06:53
Thank you very much! I like this script! :)
caaraa
24th May 2011, 09:28
thanks man
http://www.primeaffiliate.com/track/images/13.gifhttp://www.ohiok.com/img/i59.photobucket.com/albums/g296/edge06/comment/gothic-04.gif
mswaino2
29th July 2011, 15:22
Try "sharpening" with this script instead.
You will need this and what it claims that you require for its use.
http://avisynth.org/mediawiki/LimitedSharpen
You will also need this
http://forum.doom9.org/showthread.php?t=147695
Once you have the requirements and plugins installed just sharpen with this in the script. ss_x and ss_y are for aliasing. 1.0 is too low, 1.5 is about average, 2.0 is excellent removal. Anything higher is kind of a waste and the higher you make it the more it will slow down the script.
Santiag is a real good antialiasing filter in my opinion, use that with the sharpener right after it and it should look descent.
Import("C:\YOUR PLUGINS LOCATION\LimitedSharpenFaster.avsi")
deen()
Santiag()
LimitedSharpenFaster(ss_x=2.0, ss_y=2.0, Strength=150, overshoot=0, undershoot=0, soft=0, edgemode=0)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.