View Single Post
Old 8th December 2019, 13:13   #50  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Modified InpaintDelogo_v1.13.avsi.7z @ SendSpace in sig beneath this post. [available for 30 days only, will attach when ascertained that works ok]

Quote:
# Version 1.11 : 2019/08/31. Public release.
# Version 1.12 : 2019/09/06. Various tweaks. New parameters. "Inflate" and "Deep" changed.
# Version 1.13 : 2019/12/08. Allow -ve LogoX,LogoY, and +ve LogoW,LogoH in Loc string. StainlessS.
Quote:
# string "Loc" : Select (crop) the part of the picture around the logo.
# Example: Loc="30,420,-540,-30".
# Example: Loc="-200,-100,-30,-20". [ssS: Added, LogoX=Width-200, LogoY=Height-100, LogoX2=Width-30, LogoY2=Height-20]
EDIT: Actually above should be Loc="-200,-100,-30,-20". [ssS: Added, LogoX=Width-200, LogoY=Height-100, LogoX2=Width-30-1, LogoY2=Height-20-1, same as -ve cropping for width and height]

EDIT: OR eg, Loc="-200,-100,30,20". [ LogoX=Width-200, LogoY=Height-100, LogoW=30, LogoH=20]

Quote:
bugloc2 = (loc == "0,0,-0,-0" || loc == "0,0,0,0") ? true : false # ssS: Added:- || loc == "0,0,0,0"
Quote:
# assert ( findstr(loc,"-" ) != 0 , """Incorrect "Loc".""") # ssS: Commented OUT, we now allow +ve width and height in loc
Both in InpaintDelogo() and InpaintLoc()
Quote:
a = (a < 0 ) ? x+a : a # ssS: Added, convert -ve logoX to +ve LogoX
b = (b < 0 ) ? y+b : b # ssS: Added, convert -ve logoY to +ve LogoY
c = (c > 0 ) ? a+c-x: c # ssS: Added, convert +ve width to -ve width
d = (d > 0 ) ? b+d-y: d # ssS: Added, convert +ve height to -ve height

Manolito,

What magic arguments do you use for removing fully opaque logos ?

I've done a mod to VoodooFX InpaintDelogo, v1.13, but dont know how to test it as I cannot get it working.
[I am real busy and dont got no time to figure it out, so pleading to you for assist].

I'm not sure is possible without any kind of analysis, and below will fail if analysis is mandatory ['mask is full' or similar error].

I want to test with something like this.
Code:
Import("InpaintDelogo_v1.13.avsi")
WH=512
A=BlankClip(width=WH/2,height=WH/2)
B=A.Invert StackHorizontal(A,B)
StackVertical(Invert)
trim(0,-100)                # 100 frames, RGB32

LogoW    = Width/2
LogoH    = Height/2
LogoX    = (Width-LogoW)/2
LogoY    = (Height-LogoH)/2

Overlay(Last.BlankClip(Width=LogoW,height=LogoH,color=$8080C0),x=LogoX,y=LogoY)     # Make dummy logo

loc=RT_string("%d,%d,%d,%d",LogoX,LogoY,LogoW,LogoH)                                # location of logo

# Return InpaintLoc(loc)                                                            # Mark/overlay logo area with 0.5 transparent light green

#InpaintDelogo(loc=loc,mode="Inpaint",mask="d:\EXLOGO\tmp.bmp",AutoMask=1)          # NO Idea what to use here for static fully opaque logo, We do not need any kind of analyse, we know where it is.

#Uglarm(LogoX,LogoY,LogoW,LogoH)                                                    # test delogo using Uglarm

Return Last

__END__

InpaintDelogo( mask="d:\EXLOGO\tmp.bmp",
\ Automask=0, aMix=0, Loc=loc,
\ Mode="Inpaint",
\ Analyze=1, Fr1=0, Fr2=0, FrS=0, ReAnalyze=0,
\ dPP=3, dPPm=3, Interp=2, InterpM=0, Deep=2,
\ oPP=6, oPPm=3, oTune=0, KillShape=0, Inflate=1, Turbo=0,
\ Sharpness=45, PreBlur=6.5, PostBlur=4.0, Radius=8.0, prePP=0,
\ GrainPP=2,
\ Show=0, mShow=0, rSize=4)
Baseclip


Dummy Logo


InpaintLoc marked


Uglarm delogo test


EDIT: VoodooFX dont seem to have been around lately, no indication on user profile when he/she/it last visited. [no idea why last visit missing from user profile, is usually there]
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 8th December 2019 at 14:13.
StainlessS is offline   Reply With Quote