Blur in AVISYNTH

 Made with AVS Version 2.55. CPU is AMD Duron.

As base for test I used B/W movie captured from TV. Script is :


function delogo(clip)
{

#Position & size & Opacity - enter here values by logo position and size

Xp = 172
Yp = 132
X = 56
Y = 72
Op = 255


ybot = Yp + Y
xright = Xp + X

#By need:
clip = clip.ConvertToYUY2()

top = clip.Crop(Xp, Yp-2, X, 2)
bot = clip.Crop(Xp, ybot, X, 2)

left = clip.Crop(Xp-4, Yp, 4, Y)
right = clip.Crop(xright, Yp, 4, Y)


#logov = StackHorizontal(left,left, right,  right).Blur(1.58, 0.3 ).BilinearResize(X, Y)
#logov = StackHorizontal(left, left, right, right).BilinearResize(X, Y)
logov = StackHorizontal(left,left, right,  right)

#logoh = StackVertical(top, bot ).Blur(0.3,1.58).BilinearResize(X, Y)
#logoh = StackVertical(top, bot ).BilinearResize(X, Y)
logoh = StackVertical(top, bot )


#logob = Layer(logoh, logov, "fast" ) #not used in this test

#clip = clip.Layer(logoh, "add", Op, Xp, Yp)  # not used in this test
return logov  # or logoh, for test!
}


#  SOURCE
clip=avisource("D:\Movie\Mirage.avi")
clip = clip.trim(110715,110724)

#clip=clip.delogo().BilinearResize(160,160)
clip=clip.delogo()

return clip
#End of AVS script

Here is 2 small AVI file of cropped parts, which are later blurred and resized to bigger.
This is made with current state of script (no upsize to 160x160 at end, no blur).

Logoh.avi     Logov.avi

Pictures of first 5 frame, resizet to 160x160:

From Logov, no blur:

nbh1 nbh2 nbh3 nbh4 nbh5

From Logov, with blur:

bh1 bh2 bh3 bh4 bh5

From Logoh, no blur:

nbv1 nbv2 nbv3 nbv4 nbv5

From Logoh, with blur:

bv1 bv2 bv3 bv4 bv5


Note: I didn't notice bug in blur when it work with RGB colorspace.

ppera2

Mail me at:   pkpera@sezampro.yu      if have some questions, notes.