ppera2
19th May 2005, 21:14
It is based on Dekafka AVS script. I changed it, so no need to colorspace conversion to RGB32 by usual YUY2 capture.
There is no need to make mask bitmap too. Blurring is dropped out,
because it makes some green artifacts at right edge, and no really need for it, because bilinear upsize blurs well.
Plus: Works with YUY2 colorspace, no conversion to RGB
Fast
No need to make mask
Minus: It covers bigger area than masked delogo solutions
However, by covering original logo with reactangle it is totally masked, so hard to guess what whas there, what may be good in some cases.
Here is function, and example how to call it:
function delogo(clip)
{
#TV BBC15, Res 576x560 (crop top & bot. by 8) - memo, optional
#Position & size & Opacity - enter here values by logo position and size
Xp = 488
Yp = 18
X = 48 #Must be dividable by 4
Y = 66
Op = 255
#By need:
#clip = clip.ConvertToYUY2()
top = clip.Crop(Xp, Yp-2, X, 2)
bot = clip.Crop(Xp, Yp+Y, X, 2)
left = clip.Crop(Xp-4, Yp, 4, Y)
right = clip.Crop(Xp+X, Yp, 4, Y)
logoh = StackVertical(top, bot).BilinearResize(X, Y)
logov = StackHorizontal(left, right).BilinearResize(X, Y)
logob = Layer(logoh, logov, "fast" )
clip = clip.Layer(logob, "add", Op, Xp, Yp)
return clip
}
# SOURCE
clip=SegmentedAvisource("J:\Capture1.avi",pixel_type="yuy2")
#Crop by need...
clip=clip.delogo()
#Resize, filters....
clip=clip.BilinearResize(Width,Height)
return clip
Btw: when use blur in AVS with narrow clips, it results with some green artefacts at right side. Is it because of small dimensions or general bug? It is best viewable by B/W clips.
There is no need to make mask bitmap too. Blurring is dropped out,
because it makes some green artifacts at right edge, and no really need for it, because bilinear upsize blurs well.
Plus: Works with YUY2 colorspace, no conversion to RGB
Fast
No need to make mask
Minus: It covers bigger area than masked delogo solutions
However, by covering original logo with reactangle it is totally masked, so hard to guess what whas there, what may be good in some cases.
Here is function, and example how to call it:
function delogo(clip)
{
#TV BBC15, Res 576x560 (crop top & bot. by 8) - memo, optional
#Position & size & Opacity - enter here values by logo position and size
Xp = 488
Yp = 18
X = 48 #Must be dividable by 4
Y = 66
Op = 255
#By need:
#clip = clip.ConvertToYUY2()
top = clip.Crop(Xp, Yp-2, X, 2)
bot = clip.Crop(Xp, Yp+Y, X, 2)
left = clip.Crop(Xp-4, Yp, 4, Y)
right = clip.Crop(Xp+X, Yp, 4, Y)
logoh = StackVertical(top, bot).BilinearResize(X, Y)
logov = StackHorizontal(left, right).BilinearResize(X, Y)
logob = Layer(logoh, logov, "fast" )
clip = clip.Layer(logob, "add", Op, Xp, Yp)
return clip
}
# SOURCE
clip=SegmentedAvisource("J:\Capture1.avi",pixel_type="yuy2")
#Crop by need...
clip=clip.delogo()
#Resize, filters....
clip=clip.BilinearResize(Width,Height)
return clip
Btw: when use blur in AVS with narrow clips, it results with some green artefacts at right side. Is it because of small dimensions or general bug? It is best viewable by B/W clips.