Registered User
Join Date: Feb 2008
Posts: 46
|
Okay, here's the whole thing modified to use GRunT. When I try to run this, I get the error message "ConditionalFilter does not have a named argument 'show'".
function BumpEven(clip inc, int offset, float thresh, clip incRGB)
{
c1 = incRGB.Crop(0,offset-1,0,offset-240)
c2 = incRGB.Crop(0,offset,0,offset-239)
inc = ConditionalFilter(inc, inc.Crop(0,offset,0,0).AddBorders(0,0,0,offset), inc,
\ "RGBDifference(c1, c2) > thresh", args="c1, c2, thresh")
return (offset > 1) ? BumpOdd(inc, offset-1, thresh, incRGB) : inc
}
function BumpOdd(clip inc, int offset, float thresh, clip incRGB)
{
c1 = incRGB.Crop(0,offset-1,0,offset-240)
c2 = incRGB.Crop(0,offset,0,offset-239)
inc = ConditionalFilter(inc,
\ inc.ConvertToRGB().Crop(0,offset,0,0).AddBorders(0,0,0,offset).ConvertToYV12(),
\ inc,
\ "RGBDifference(c1, c2) > thresh", args="c1, c2, thresh")
return (offset > 1) ? BumpEven(inc, offset-1, thresh, incRGB) : inc
}
function Bump(clip inc, int maxOffset, float thresh)
{
incRGB = inc.ConvertToRGB()
Assert(maxOffset > 0)
inc = (maxOffset % 2 == 0) ? BumpEven(inc, maxOffset, thresh, incRGB) :
\ BumpOdd(inc, maxOffset, thresh, incRGB)
return inc
}
|