Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 21st November 2021, 21:46   #241  |  Link
dot75
Registered User
 
Join Date: Oct 2021
Posts: 11
V2 = InpaintDelogo( mask="H:\Mask9.bmp",
\ Automask=0, aMix=-0,Loc="1018,920,-248,-106",
\ Mode="Inpaint",
\ Analyze=3, FrW=54, FrS=0,dPP=0,Show=1,Inflate=2)


https://imgur.com/a/bO2XYi6
dot75 is offline   Reply With Quote
Old 21st November 2021, 22:13   #242  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 985
You didn't set a black frame: FrB.
dPP has nothing to do with Inpaint mode.

EDIT:
How did you get that mask?
It's incorrect:


Mask should be: white where logo is, and the rest is black.

Last edited by VoodooFX; 22nd November 2021 at 05:54.
VoodooFX is offline   Reply With Quote
Old 22nd November 2021, 04:04   #243  |  Link
Danette
Registered User
 
Join Date: Apr 2013
Posts: 346
Quote:
Originally Posted by VoodooFX View Post
Code:
V1 = InpaintDelogo( mask="D:\logo1.bmp")
ReplaceFramesSimple(Last,V1,Mappings="[0 500] [3400 3800] [4000 4444]")
V2 = InpaintDelogo( mask="D:\logo2.bmp")
ReplaceFramesSimple(Last,V2,Mappings="[2020 2500]")
V3 = InpaintDelogo( mask="D:\logo3.bmp")
ReplaceFramesSimple(Last,V3,Mappings="[1100 1900]")
Had a chance to test this code approach. It works perfectly AND can handle, at least, three separate logos simultaneously. Thanks.

Question: if I am creating a manual mask (all blue 255 background with the logo white), why bother with the location of the logo? When I tried setting Loc=”0,0,-0,-0” , and applied the manual mask mentioned, the logo was covered exactly as it is when a selection tightly bound by location coordinates is used.

Quote:
Originally Posted by VoodooFX View Post
Does anyone have wishes/suggestions about delogo and stuff?

What about idea to incorporate all masks into one file? That would make it more universal, in case you would want to use masks on other videos with same logo, you would need to change only coords to move all logo masks, but at the current state you can move only by 2 pxs, it's possible to add compatibility to 1px, but lots of stuff then need to be rechecked/rewritten and probably there would be some performance penalty. I'm not sure if it's worth to bother, there are no problems for the savy avs users...
I think that you have some of my interests to use. Of particular value, to me, would be the previously mentioned idea of being able to track a logo that doesn’t change, other than its’ location. If this can be done, a further enhancement would be to have the delogo function adapt to minor variations in the logo itself, e.g.; if the logo mask changed by 2%, the delogo function would adapt as it happened.

I like that idea of all masks into one file!
Danette is offline   Reply With Quote
Old 22nd November 2021, 05:52   #244  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 985
Quote:
Originally Posted by Danette View Post
Question: if I am creating a manual mask (all blue 255 background with the logo white), why bother with the location of the logo? When I tried setting Loc=”0,0,-0,-0” , and applied the manual mask mentioned, the logo was covered exactly as it is when a selection tightly bound by location coordinates is used.
You are mixing up with Vdub's Delogo, there is no "blue" for InpaintDelogo, the base mask should be only white and black.
Loc is area which will be processed, if you process whole frame then it will be pretty slow.

Quote:
Originally Posted by Danette View Post
Of particular value, to me, would be the previously mentioned idea of being able to track a logo that doesn’t change.
That would be nice. You can try to make a thread at Avisynth Development, maybe someone would be interested in making such tracking or someone secretly has such plugin.
VoodooFX is offline   Reply With Quote
Old 22nd November 2021, 07:15   #245  |  Link
dot75
Registered User
 
Join Date: Oct 2021
Posts: 11
Quote:
Originally Posted by VoodooFX View Post
You didn't set a black frame: FrB.
dPP has nothing to do with Inpaint mode.

EDIT:
How did you get that mask?
It's incorrect:


Mask should be: white where logo is, and the rest is black.
Just via Analyze=3
the result and not good you are right iam lost lol
dot75 is offline   Reply With Quote
Old 22nd November 2021, 08:21   #246  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 985
Quote:
Originally Posted by dot75 View Post
Just via Analyze=3
the result and not good you are right iam lost lol
But you didn't set the black frame parameter there [and Automask=1 creates the base mask].
Here is the mask I made with Photoshop from your screenshot:
https://i.imgur.com/guOQbvt.png
VoodooFX is offline   Reply With Quote
Old 22nd November 2021, 08:38   #247  |  Link
dot75
Registered User
 
Join Date: Oct 2021
Posts: 11
Quote:
Originally Posted by VoodooFX View Post
But you didn't set the black frame parameter there [and Automask=1 creates the base mask].
Here is the mask I made with Photoshop from your screenshot:
https://i.imgur.com/guOQbvt.png
I'm going to start over .
you did it with Photoshop I don't know anything about photo editing I guess that's complicated to do ?
dot75 is offline   Reply With Quote
Old 22nd November 2021, 08:55   #248  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 985
Quote:
Originally Posted by dot75 View Post
I don't know anything about photo editing I guess that's complicated to do ?
It took me all ~30 seconds to do it.
VoodooFX is offline   Reply With Quote
Old 22nd November 2021, 09:13   #249  |  Link
dot75
Registered User
 
Join Date: Oct 2021
Posts: 11
Quote:
Originally Posted by VoodooFX View Post
It took me all ~30 seconds to do it.
yes when we know how to do it
I will try to learn with gimp or photofiltre

Last edited by dot75; 22nd November 2021 at 09:15.
dot75 is offline   Reply With Quote
Old 22nd November 2021, 15:34   #250  |  Link
Danette
Registered User
 
Join Date: Apr 2013
Posts: 346
Quote:
Originally Posted by VoodooFX View Post
You are mixing up with Vdub's Delogo, there is no "blue" for InpaintDelogo, the base mask should be only white and black.
No, this wasn’t a mix-up with VDub’s Delogo. When I initially made a black image for Automask, then ran it, the mask color appeared as a blue (0,0,255 RGB) in my particular image editor (it was black in another image viewer, though). So, I assumed that was ok and began using blue as the mask, but always making the logo white. Guess what: it seems to work the same with the blue mask (I can’t tell a difference in the result). However, I will return to a black mask, since it is just as easy and, perhaps, the value may be so subtle that I am overlooking it.

Using a blue mask even worked identically to a black mask when using Automask. However, I’ve decided not to use Automask because it doesn’t identify a logo image well enough and does falsely find other non-logos, despite amix settings and best efforts to get a solid black image in the location area, requiring manual adjustments in the image editor, anyway.

The other reason that I say it wasn’t a mix-up with VDub’s DeLogo is because, from a user standpoint, VDub’s DeLogo doesn’t require a user-created mask. All you need do is to capture the image, open the image in a image editor, and paint the logo red (255,0,0 RGB). VDub’s DeLogo then takes it from there and, internally, processes it all. That may be an idea for simplifying InpaintDelogo for users, since you are de-constructing VDub’s DeLogo and looking for improvement ideas.

Quote:
Originally Posted by VoodooFX View Post
That would be nice. You can try to make a thread at Avisynth Development, maybe someone would be interested in making such tracking or someone secretly has such plugin.
Done

Last edited by Danette; 22nd November 2021 at 15:36.
Danette is offline   Reply With Quote
Old 22nd November 2021, 16:58   #251  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 985
Quote:
Originally Posted by Danette View Post
When I initially made a black image for Automask, then ran it, the mask color appeared as a blue (0,0,255 RGB) in my particular image editor (it was black in another image viewer, though).
You don't create images for Automask. Automask creates images for you. I've no ideas how Black can be Blue...

Quote:
Originally Posted by Danette View Post
The other reason that I say it wasn’t a mix-up with VDub’s DeLogo is because, from a user standpoint, VDub’s DeLogo doesn’t require a user-created mask. All you need do is to capture the image, open the image in a image editor, and paint the logo red (255,0,0 RGB).
In your second sentence you describe how you make "a user-created mask" for VDub's Delogo...

Quote:
Originally Posted by Danette View Post
That may be an idea for simplifying InpaintDelogo for users, since you are de-constructing VDub’s DeLogo and looking for improvement ideas.
VDub mask has four colors for user to use: Blue, Red, Green and Black. That's way more complex than simply Black and White. I can't reduce colors count further.

Last edited by VoodooFX; 22nd November 2021 at 17:05.
VoodooFX is offline   Reply With Quote
Old 22nd November 2021, 18:29   #252  |  Link
dot75
Registered User
 
Join Date: Oct 2021
Posts: 11
automask work via

InpaintDelogo( mask="E:\Mask15.bmp",
\ Automask=0, aMix=0, Loc="1018,920,-248,-106",
\ Mode="Inpaint",
\ Analyze=4, FrB=499, FrW=800, FrS=0,show=1)

https://imgur.com/a/iRGknHF
dot75 is offline   Reply With Quote
Old 22nd November 2021, 19:13   #253  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 985
Quote:
Originally Posted by dot75 View Post
automask work via
You can still see logo outlines, that's because the mask doesn't cover all upscaled artifacts in your video. Try Inflate=2.
Btw, with Analyze=4 a white frame [FrW] is not used.
VoodooFX is offline   Reply With Quote
Old 22nd November 2021, 19:24   #254  |  Link
dot75
Registered User
 
Join Date: Oct 2021
Posts: 11
still artifacts


InpaintDelogo( mask="E:\Mask15.bmp",
\ Automask=0, aMix=0, Loc="1018,920,-248,-106",
\ Mode="Inpaint",
\ Analyze=4, FrB=499, FrW=800, FrS=0,show=1,Inflate=2)

https://imgur.com/a/1SC2mkD
dot75 is offline   Reply With Quote
Old 22nd November 2021, 20:21   #255  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 985
Quote:
Originally Posted by dot75 View Post
still artifacts
I don't see any, looks ok.
VoodooFX is offline   Reply With Quote
Old 22nd November 2021, 21:07   #256  |  Link
Danette
Registered User
 
Join Date: Apr 2013
Posts: 346
I think we’re getting twisted-up in semantics:

Quote:
Originally Posted by VoodooFX View Post
You don't create images for Automask. Automask creates images for you. I've no ideas how Black can be Blue...
Yes, I know about Automask creating the image/mask. It did create the black mask background with the white logo. It was my image editor that, somehow, reads that black creation of Automask as blue. Then, when I make the manual mask using blue (assuming that was ok), I found that it works with InpaintDelogo, even though it isn’t a black mask background. I guess that InpaintDelogo will work with any pure RGB mask color as long as there isn't such purity in any other part of the image.

This blue mask background was confirmed to be blue by other image editors. If you’re interested in trying this blue version, I can send the file, but you could probably do it as easily by creating the blue mask with your own editor. It’s not an issue, just a point of curiosity.

Quote:
Originally Posted by VoodooFX View Post
In your second sentence you describe how you make "a user-created mask" for VDub's Delogo...
Not exactly. There is no mask aspect necessary, from a user standpoint, in VDub’s DeLogo. It is the actual frame image, as it appears in, e.g.; AvsPmod, that is used by VDub’s DeLogo, not a black, blue, etc. colored mask image. The only thing the user needs to do is to paint the logo red. VDub’s DeLogo then takes that and, presumably, creates a mask out of it internally, out of sight from the user.

Quote:
Originally Posted by VoodooFX View Post
VDub mask has four colors for user to use: Blue, Red, Green and Black. That's way more complex than simply Black and White. I can't reduce colors count further.
Black and white are fine, as mentioned above. However, I think that InpaintDelogo can also handle, at least, blue, as well. I have not tested other two RGB colors. Again, just a point of curiosity/interest.

Quote:
Originally Posted by VoodooFX View Post
That would be nice. You can try to make a thread at Avisynth Development, maybe someone would be interested in making such tracking or someone secretly has such plugin.
Surprise: see the comment by wonkey_monkey here: https://forum.doom9.org/showthread.p...58#post1957958

Last edited by Danette; 22nd November 2021 at 22:02.
Danette is offline   Reply With Quote
Old 22nd November 2021, 22:41   #257  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 985
Quote:
Originally Posted by Danette View Post
It was my image editor that, somehow, reads that black creation of Automask as blue.
What is that image editor?

Quote:
Originally Posted by Danette View Post
If you’re interested in trying this blue version, I can send the file
No need, any image is binarized according to levels [whatever numbers I did put there].

Quote:
Originally Posted by Danette View Post
Not exactly. There is no mask aspect necessary, from a user standpoint, in VDub’s DeLogo. It is the actual frame image, as it appears
If you don't understand what mask means, that doesn't make a mask not a mask.

Quote:
Originally Posted by Danette View Post
not a black, blue, etc. colored mask image. The only thing the user needs to do is to paint the logo red.
That's for opaque logos, for transparent one there are four colors for a mask.

Last edited by VoodooFX; 22nd November 2021 at 23:34.
VoodooFX is offline   Reply With Quote
Old 23rd November 2021, 00:43   #258  |  Link
Danette
Registered User
 
Join Date: Apr 2013
Posts: 346
The image editor is an old version of Ulead PhotoImpact.

Perhaps I don’t understand what a mask is, as you said. When we paint the logo, that is the mask …correct?

What I have found is that, for both color and B&W videos, if I use a saved image of a video frame and simply paint the logo gray or white, with the PhotoImpact mask tool, it works without having a black base layer. This is similar to VDubs DeLogo, except that white or gray is used to paint the logo instead of red. Do you see anything wrong with this approach to using InpaintDelogo?

BTW: wonkey_monkey is looking for examples of moving logos within a video, in case you can provide any. The link is in a previous post.

Last edited by Danette; 23rd November 2021 at 00:45.
Danette is offline   Reply With Quote
Old 23rd November 2021, 02:06   #259  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 985
Quote:
Originally Posted by Danette View Post
Do you see anything wrong with this approach to using InpaintDelogo?
If programs tell you to use black and white and you paint there god knows what, do you think it's right? Is Black color against your religion or something, what is the problem?

Quote:
Originally Posted by Danette View Post
This is similar to VDubs DeLogo
It's opposite of "similar", in VDub you do as instructed - paint mask red, when in here against all instructions you paint some random colors. Why you don't paint some random stuff in VDub's masks?
I don't understand, at all...

Last edited by VoodooFX; 23rd November 2021 at 14:26.
VoodooFX is offline   Reply With Quote
Old 23rd November 2021, 03:17   #260  |  Link
Danette
Registered User
 
Join Date: Apr 2013
Posts: 346
Quote:
Originally Posted by VoodooFX View Post
It's opposite of "similar", in VDub you do as you instructed - paint mask red, when in here against all instructions you paint some random colors. Why you don't paint some random stuff in VDub's masks?
I don't understand, at all...
This was taken out of context. Vdubd DeLogo instructions are quite clear and easy to understand.

Sorry to cause frustration, but the InpaintDelogo instructions leave much to be desired in terms of guidance. So, we are left to our own devices in terms of choosing a color for manual mask creation. I’d be very interested if you could point me to any part of the manual where it states what color to paint the logo and whether or not the background/base should be a certain color. I started with RGB, black and white. After much trial and error, I came up with gray and white as those colors that work for painting the logo.

From what I can tell of the instructions, virtually all guidance is for Automask, but Automask performs rather poorly on every video that I’ve thrown at it. Using the Automask base of black caused my image editor to exhibit a blue base. Not all image editors appear to be created equally so, when you expect black, but get blue, you work with that, since it does the job. With no instruction for manual mask creation apparent, I look for trial and error solutions. From this process, I found that the black base seems to work no better than an original video image. I was simply asking for confirmation that the process I stumbled upon, when not using Automask, was ok given what you know of the code.

Much of the problems that many are struggling with on this thread could be avoided by providing a step-by-step guide on manual mask creation.

I'll back away and follow the progress as others squeeze info out in this thread.

Incidentally: you were quite helpful on other issues and I thank you for that.

Last edited by Danette; 23rd November 2021 at 03:24.
Danette is offline   Reply With Quote
Reply

Tags
delogo, hardsubs, ocr, remove, watermark

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:55.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.