DeLogo ... find den Fehler nicht

  • Ein Freund hat sich mit seiner DVB-Karte Spiderman von SciFi gegrabbt und mir jetzt die Dateien gegeben damit ich ihm das Logo wegrechne, dafür würd ich natürlich am liebsten DeLogo nehmen, die resultate die ich hier bisher gesehen hab sind wirklich ... krass ^^. Das einzige Problem ist, die Funktion funktioniert bei mir nicht richtig. ServeLogo ist in Ordnung, Masken hab ich alle, aber wenn ich dann DeLogo benutzen will kommen nur Fehlermeldungen. Erst wurde mir gesagt es wären falsche Parameter, jetzt kommt die Meldung das die Hilfsfunktion nicht Funktioniert ("I don't know what "-" means" in VD_DeLogo". Hat einer von euch vielleicht 'ne Idee? Hier mal die Skripte:

    DeLogo

    Code
    function VD_DeLogo(clip clip, bool "on_frames", string "range", string "file_deblend", string "file_alpha",\ string "file_color", string "file_repair", float "depth", float "power", int "par_X", int "par_Y", bool "interlaced"){    LoadVirtualdubPlugin("D:\Encoding\AviSynth Filters\DeLogo\delogo.vdf", "_VD_DeLogo")    X = round(10*depth)    Y = round(10*power)    # theoretically: z = 100*log10(par_X/par_Y), as approximation I took a minimax-approximation (calculated with Maple):    v = - 48.96556825 + 63.18825967*par_X - 16.00966389*par_X*par_X + 2.473556539*par_X*par_X*par_X    \ – .2133268695*par_X*par_X*par_X*par_X    \ + .009456579673*par_X*par_X*par_X*par_X*par_X - .0001675297934*par_X*par_X*par_X*par_X*par_X*par_X    w = - 48.96556825 + 63.18825967*par_X - 16.00966389*par_X*par_X + 2.473556539*par_X*par_X*par_X    \ – .2133268695*par_X*par_X*par_X*par_X    \ + .009456579673*par_X*par_X*par_X*par_X*par_X - .0001675297934*par_X*par_X*par_X*par_X*par_X*par_X    z = round(v) - round(w)    return clip._VD_DeLogo(default(on_frames,false)?1:0, default(range,""), default(file_deblend,""), default(file_alpha,""),    \ default(file_color,""), default(file_repair,""), default(X,15), default(Y,40), default(interlaced,false)?1:0, z)}### ### ###function delogo( clip clp, int Lwidth, int Lheight, string loc, string name,  \               float "Cmix", float "Lmix", string "name2", bool "i", bool "PP",float "amount")        {         name2=default(name2,"")         PP=default(PP,false)         amount=default(amount,1.0)         logomask=(name2=="")?clp:imagereader(name2).loop().trim(0,framecount(clp)).converttoyv12(matrix="PC.601")        # return logomask.histogram(mode="levels")         Lmix=default(Lmix,0.0)         Cmix=default(Cmix,0.0)         i=default(i,false)         ox=clp.width         oy=clp.height         x1 = (LeftStr(loc,1)=="L")  ? 0 : ox-Lwidth         y1 = (RightStr(loc,1)=="O") ? 0 : oy-Lheight         logo = clp.crop(x1,y1,Lwidth,Lheight)         row  = (x1==0) ? (y1==0) ? clp.crop(Lwidth,0,-0,Lheight) : clp.crop(Lwidth,oy-Lheight,-0,-0)          \             : (y1==0) ? clp.crop(0,0,x1,Lheight) : clp.crop(0,oy-Lheight,x1,-0)         rest =           (y1==0) ? clp.crop(0,Lheight,-0,-0): clp.crop(0,0,-0,oy-Lheight)         ConvertToRGB(logo)        # log1=VD_DeLogo(false, "", "ana2.bmp", "alpha-G3.bmp", "color-G3.bmp", "repair.bmp",  1.5, 3.0, 1, 1, i).ConvertToYV12()         log1=VD_DeLogo(false, "", name+"_deblend.bmp", name+"_alpha.bmp", name+"_color.bmp", name+"_repair.bmp",  1.5, 3.0, 1, 1, i).ConvertToYV12()         log2 = (Cmix==0.0 && Lmix==0.0)          \   ? log1 : VD_DeLogo(false, "", name+"_deblend.bmp", name+"_alpha.bmp", name+"_color.bmp", name+"_repair_c.bmp",  2.5, 3.0, 1, 1, i).ConvertToYV12()         LL=string(int(round(Lmix)))         LL1=string(int(round(Lmix*100.0)))        # log1.DEdgemask(0,255,0,255,"1 1 1 1 0 1 1 1 1",U=2,V=2)        # log1.yv12convolution("1 8 28 56 76 56 28 8 1","1 8 28 56 76 56 28 8 1")         PP ? (i ? log1.yv12convolution("1 8 28 56 76 56 28 8 1","1 0 28 0 76 0 28 0 1")        \        : log1.yv12convolution("1 8 28 56 76 56 28 8 1","1 8 28 56 76 56 28 8 1") )        \   : log1       #  log1.yv12convolution("1 8 28 56 76 56 28 8 1","1 0 6 0 15 0 20 0 15 0 6 0 1")         log1=Lmix<=1.0?log1:yv12lutxy(last,log1,yexpr="x y "+LL+" + > x "+LL+" - x y "+LL+" - < x "+LL+" + y ? ?",U=2,V=2)         Cmix==0.0 ? log1 : MergeChroma(log1,log2,Cmix)         Lmix==0.0 ? last       \: Lmix >1.0 ? yv12lutxy(last,log2,yexpr="x y "+LL+" + > x "+LL+" - x y "+LL+" - < x "+LL+" + y ? ?",U=2,V=2)       \:             yv12lutxy(last,log2,yexpr="x 100 "+LL1+" - * y "+LL1+" * + 100 /",U=2,V=2)     #  \:             MergeLuma(last,log2,Lmix) ## -->"Access violation" ... yippieh ... müsse mache yv12lutxy ...        # PP?yv12convolution("1 8 28 56 76 56 28 8 1","1 0 28 0 76 0 28 0 1",U=2,V=2):last         PP?(i?separatefields.Removegrain(2).weave:removegrain(2)):last         PP?temporalsoften(2,11,11,23,2).AddGrain(5,.0,.0):last        # PP?repair(last.sharpen(1),last,mode=1,modeU=3):last         name2==""?last:maskedmerge(logo,last,logomask.FitY2UV(),Y=3,U=3,V=3)         row2 = (x1==0) ? stackhorizontal(last,row) : stackhorizontal(row,last)         y1==0          ? stackvertical( row2,rest) : stackvertical( rest,row2)         return last         }### ### ###Function ServeLogo( clip clp, int Lwidth, int Lheight, string loc, int "SnipSize", int "avg" )    { SnipSize = default( SnipSize, 56 )      avg = default( avg, 3 )      x1 = (LeftStr(loc,1)=="L") ? 0 : clp.width-Lwidth      y1 = (RightStr(loc,1)=="O") ? 0 : clp.height-Lheight      clp.crop(x1,y1,Lwidth,Lheight)      SelectRangeEvery( SnipSize, 1 )      return TemporalSoften( avg,255,255,255,2 )    }

    Mein AviSynth-Skript für Spiderman


    Das obere ist die geladenen DeLogoKomplett.avs, und meine Masken heißen SciFi_alpha.bmp, SciFi_color.bmp, usw. Das DeLogo Skript hat Dideé als von ihm getestet geposted, sollte also eigentlich funktionieren :/

  • Da ist entweder (Dir) ein Fehler beim Exportieren des Scriptes aus dem PDF heraus aufgetreten, oder (mir) beim Erstellen des PDFs.

    Die beiden Minuszeichen in den Zeilen 9 u. 12 sind keine Minuszeichen, sondern das Sonderzeichen ASCII $96, das genau so aussieht wie ein Minuszeichen ...

    Entweder diese beiden Zeichen löschen & mit richtigen Minuszeichen ersetzen & Script dann neu abspeichern, oder einfach gleich die Funktion aus dem Archiv mit dem Guide verwenden. So war es ja auch gedacht. :)

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!