Log in

View Full Version : Need Good Logo Removal Filter


ade245
27th September 2006, 03:04
Can somebody recommend good logo removal filters?? Im new to this but im trying to remove a couple of annoying logos from my videos.....i tried Logo-Away but i didnt really like that because it only blurs away the image and the other one i tried still left an ugly blotch on the video.

So can anybody recommend a top notch logo removal filter that can remove the image and not leave any white blotches?? Any help would be appreciated, because ive been searching for a long time...so please help:D

Adub
27th September 2006, 03:55
For one, don't ask what is best.
For another, there is a nice logo remover from MSU for Virtualdub. Here is the link:
http://www.softpedia.com/get/Multimedia/Graphic/Image-Convertors/MSU-Logo-Remover-VirtualDub-Video-plugin.shtml

And lastly, Welcome to the Forums!!

ade245
27th September 2006, 04:11
Thanks for the link. How well does it work? And why shouldnt i ask for the "best":)

Guest
27th September 2006, 04:31
And why shouldnt i ask for the "best" Please read the forum rules and take special note of rule 12. Thank you. I have edited your title and post to comply.

http://forum.doom9.org/forum-rules.htm

Didée
27th September 2006, 10:13
@ ade245

If you mean something like this (http://forum.doom9.org/showthread.php?p=518035#post518035) (pictures) or like this (http://home.arcor.de/dhanselmann/_samples/LOST_comparison%232-2.mkv) (sample), then your search keywords are "Delogo"+"Avisynth"+"Didée". ;)
(Once I wrote a guide for the procedure, but it's in German, still ...)


@ Merlin777
MSU has a nice attempt there, but it's full of quirks, IMO.

AMSS0815
27th September 2006, 10:21
Hi ade245,

I can recommend the DeLogo filter by Karel Suhajda (http://neuron2.net/delogo132/delogo.html) (hosted on neurons page (http://neuron2.net)), which I'm using for my TV station logos for years. It also blurs, but there are many ways to tweak the blurring in order to get nice results. The filter is for VirtualDub, but can be imported using the function LoadVirtualDubPlugin (details here (http://www.avisynth.org/AviSynthPlugins)).

I'm currently working on a Logo-Removal (correctly speaken Image Inpainting) filter that'll keep sharp borders, but that might take a while.

I hope this helps...
Regards,
AMSS

ade245
27th September 2006, 19:31
@ ade245

If you mean something like this (http://forum.doom9.org/showthread.php?p=518035#post518035) (pictures) or like this (http://home.arcor.de/dhanselmann/_samples/LOST_comparison%232-2.mkv) (sample), then your search keywords are "Delogo"+"Avisynth"+"Didée". ;)
(Once I wrote a guide for the procedure, but it's in German, still ...)


@ Merlin777
MSU has a nice attempt there, but it's full of quirks, IMO.

So Delogo was the one that did all that work?? Damn thats good. But is Delogo for Avisynth or Virtualdub?

ade245
27th September 2006, 19:33
Thanks guys for all the help...im going to try every single one of those programs. And if u have anymore to recommend please keep em coming because im a perfectionist when it comes to things like these, and the more the better. Ill take my time going through them. Thanks once again

Chainmax
27th September 2006, 19:43
...
(Once I wrote a guide for the procedure, but it's in German, still ...)
...

We really need a german-speaking person to translate that. I know some people, but they have zero computer proficciency so I'm not sure if they could do it :(.

Didée
27th September 2006, 21:03
Ja, eine Deutsch sprechende Person, die genau weiß, worum es bei der Sache geht ... die bräuchte man dafür!

(Exactly. A German speaking person who knows what that stuff is about ... that's what would be needed!) ;)

It's not only the work of translation ... I'm also anxious, let me tell you that: It's a can of worms - once opened ... you know.
On the German board, once there started a nice small thread about Logo removal ... now look to what it has grown by now (http://forum.gleitz.info/showthread.php?t=15004&highlight=Logoentfernung). Plus a hundred-odd posts in some other threads, started by people who refrained from that monster thread.

At times it feels like one could make a full-time job out of that ... which is not an option, because of the salary.


Basically, it's really easy. To use Delogo in Avisynth, there's the wrapper script by Wilbert. Set up Delogo in Veedub as usual, save two sets of masks - one with zero repair (for basic transparency restauration), one with maximum repair (fallback solution). Then in Avisynth, by means of Wilbert's wrapper two Delogo operations are done, one time with each set of masks. Lastly, these two are combined acc. to needs, plus a little optional filtering for remaining artefacts.

Not that difficult, really.

krieger2005
27th September 2006, 21:45
The main part of your Tutorial is the preparing of the clip for Building of the Masks (Alpha, Color, ...) -> keywords:
- hard temporal denoise
- use of "SelectEvery" -> Not use of successive frames
- use a movie-part with minimum 5000 frames
- Embedding the Usage in Avisynth (your post above).

The rest can be taken from neurons site: http://neuron2.net/delogo132/delogomanual/delogo.htm

hitechluddite
2nd December 2006, 17:14
Is there any hope for a logo removal tool that will work with VOB files?

Didée
2nd December 2006, 17:37
All logo removers work on VOB files ... if you re-encode the footage.
Without re-encoding, no logo remover will ever work.

It's like with tatoos: once they are there, you just can't remove them again.
Except for laser appliances, of course, but that's the counterpart of "re-encoding", for that matter. ;)

jmac698
2nd December 2006, 18:35
logotools is "pretty good". I would demonstrate mathematically that it is the b.e.s.t. but I fear for my free speech.
Let me just say that there is a formula to recover exactly the logo if the video underneath is known. Some tools interpolate border to estimate underneath; but if you have a black picture, you know exactly what is underneath and therefore exactly the logo.
Logotools can do this, therefore it is mathematically perfect.
As for vob, the first generation of mpeg editors reencoded every frame, the 2nd generation reencoded just affected frames, that is a set of pictures known as a G.O.P. There are now devices which can reencode *part* of a picture for the ultimate quality, I saw this in the feature for a video switcher with logo-adding ability.

Didée
2nd December 2006, 21:13
logotools is "pretty good".
Might be, might be not ... we will see.


As for vob, the first generation of mpeg editors reencoded every frame, the 2nd generation reencoded just affected frames,
Indeed. The 2nd-gen ones by now even are available in many open source tools, available for no fee ...


There are now devices which can reencode *part* of a picture for the ultimate quality, I saw this in the feature for a video switcher with logo-adding ability.
Might be there are such devices. But re-encoding only part of a frame is, in detail, a highly complicated task. I'd say that we Joe Users won't have such an application any time soon. :)


that is a set of pictures known as a G.O.P.
Ah, thanks for clarification. I've been always under the impression that GOP stands for Group of Pictures ... now I know better, thanks. :D


Let me just say that there is a formula to recover exactly the logo if the video underneath is known.
That's true, and it's not even a big deal. The deal is that you don't know how the logo really looked like, before it got blended into the source ...

Some tools interpolate border to estimate underneath; but if you have a black picture, you know exactly what is underneath and therefore exactly the logo.
and that's the very point where you go wrong. If you have the logo on a black picture, then you know NOTHING except for how the logo looks on a black background. That, and not more.

For example, even if you have the logo on a black background, how would you distinguish between

- an originally 100% white logo that has been alphablended by 50%
- an originally 75% white logo that has been alphablended by 66.6%

Answer: you can't. Not without more exhaustive analyzing, involving *different* backgrounds other than black.

Since, if you don't have the exact combination of original color + alphablending value, your removal will fail everywhere exept on those black frames where you got your measure from. :)


I would demonstrate mathematically that it is the b.e.s.t. but I fear for my free speech.
No need to fear for your free speech. Just, to be on the safe side, don't use the b*st word. :)

But instead of mathematical theorising - which you would not succeed with, since in the outline above I already proved you wrong - you might of course try to

Logotools can do this, therefore it is mathematically perfect.
demonstrate how perfect LogoTools really is.

I've uploaded a little sample (http://download.yousendit.com/5BFD8BA129349444), just for you. If you want to hold up your claims, feel free to show us how perfectly you can remove that logo with LogoTools:
I'm waiting eagerly. :)

Note that my claims regarding Delogo+Avisynth were already proven: snapshots can be seen this post (http://forum.doom9.org/showthread.php?p=518035#post518035), and those were done more than two years ago ... today probably could be done better. :)
(The German Doom9 forum (Gleitz) lists a huge thread around Delogo+Avisynth. )

hitechluddite
3rd December 2006, 00:52
Ok I'm just a stupid beginner but why can't the software merely analyze the entire video and flag the content that NEVER changes since the logo is always there and unchanging? Then that component could be removed and Whatever content that was under the logo would not be modified?

So I MUST Convert my VOB remove the logo then burn the converted video to a DVD which involves another conversion? Sounds very time cnsuming not to mention the degradation of video quality. I have D/L'd virtual dub and the Msu plugin but all links to avisynth I have tried are either broken or in a language this poor farmboy can't read.. :( any help there?

hitechluddite
3rd December 2006, 01:57
I did some playing with Vituraldub and the MSU filter. It seems to work well until there is chnge in the background then you get artifacts and bleed.

foxyshadis
3rd December 2006, 06:53
Ok I'm just a stupid beginner but why can't the software merely analyze the entire video and flag the content that NEVER changes since the logo is always there and unchanging? Then that component could be removed and Whatever content that was under the logo would not be modified?

That works decently for constant 100% logos, that you hardly ever see anymore. Nowadays, they all fade in and out, or worse, have these annoying animated transitions between two logos. I have a concert that does that, haven't even bothered trying to automatically remove it.

Now, if you could provide the captured logo with a transparent background, and the position, a tool could take that and test whether the luminance changes generally follow the actual logo, attempt to guess the scalefactor by how well it correlates, and reverse it through some combination of blending and amplifying the differences. Concievably such a tool could be given a number of frames to built it from, probably using fft analysis, but you're likely to get crazy false positives that way.

Even if you capture a 50% blend with black, it should still be possible to detect 100% opacity with that, since the fingerprint doesn't change at all. You might need a little of Didée's magic dust for some hard transitions, but his bag never seems to run dry...

So I MUST Convert my VOB remove the logo then burn the converted video to a DVD which involves another conversion? Sounds very time cnsuming not to mention the degradation of video quality. I have D/L'd virtual dub and the Msu plugin but all links to avisynth I have tried are either broken or in a language this poor farmboy can't read.. :( any help there?

All links gone? o.O There's an Avisynth 2.5.7 RC1 thread just below this one. You can convert the video directly to a new mpeg2 (for dvd), so there's only one conversion going on.

hitechluddite
3rd December 2006, 14:14
OK I've avisynth 2.5.6 D/L I also have a MP2 decoder for it. Now I'm looking for Diedre's script now to apply to my files. What I'm doing should be fairly simple. I have a over 1,000 music videos burnt to DVD from VH-1. The logo is small and does not seem to change at all unless the changes are too subtle for the eye, in which case the artifacts from an improper filter should also be undetectable. If I burn my Videos on a DVD RAM When I extract them with cyberlink they are already MPEG Format so I may need no conversion at all if i go that route. Not sure if it's 2 or 4 format though.

jmac698
3rd December 2006, 20:45
Ok, let me try and if I'm wrong, I'm wrong...
final=opacity*logo+(1-opacity)*video
opacity*logo=final-(1-opacity)*video
logo=(final-(1-opacity)/opacity*video)/opacity
video=16, final=216 (video=0, final=.5)
logo=.5/opacity
If opacity=50%, logo=1 = 235.
If logo=1, opacity=.5.
l8r...

Didée
4th December 2006, 00:31
You start out with
final=opacity*logo+(1-opacity)*video
and that's fully correct. Alas, you have only *one* equation, and it contains *two* unknowns: "opacity" and "logo" ...

Single equations with two variables don't have unike solutions.

dexy
4th December 2006, 01:37
Believe me, i am perfectionist too, and i have tried a lot of, but delogo is the best (by my opinion). Use that for vdub couse you re new in this, it is much easier.

jmac698
4th December 2006, 04:28
I wasn't done...
logo=.5/opacity=(0,1), opacity=(.5,1)
Let's try both:
final=opacity*logo+(1-opacity)*video
logo=1, opacity=.5
final=.5*1+(1-.5)*0=.5
logo=.5, opacity=1
final=1*.5+(1-1)*0=.5
In other words, I'm trying to say *it doesn't matter which is which*, there is in fact only one variable here because opacity is directly related to logo.
What matters in the end is recreating the video:
video*(1-opacity)=final-opacity*logo i.e. unnormalized video
video=(final-opacity*logo)/(1-opacity) now it's normalized
logo=1, opacity=.5, final=.5 (video=0)
video=(.5-.5*1)/(1-.5)=0.
logo=.5, opacity=1
video=(.5-1*.5)/(1-1)=0 (must assume 0/0=0).

Either way, I've recovered the video. Now do you understand? Even though I've proved it, I would still like to try an example where video<>0 just to be sure...

Anyhow, if this works, pick an arbitrary number for opacity (within the constrained range), then find logo, then recover the video.
Math is tricky sometimes..

Didée
4th December 2006, 09:32
@ jmac689

No, no and again no.

For the last time: You are always assuming
Let's try both:
final=opacity*logo+(1-opacity)*video
logo=1, opacity=.5
final=.5*1+(1-.5)*0=.5
logo=.5, opacity=1
that either video or opacity is exactly 1.0.

This assumption is inadmissable. Both can be just anything.


No more formulas please. (You know there are tricky transformations-of-equations, which in the end "prove" that 2 = 3, and such ...)

If you missed it: In this post (http://forum.doom9.org/showthread.php?p=909307#post909307) I gave you a sample (http://download.yousendit.com/5BFD8BA129349444).

Stop arguing. Give visual proof.

jmac698
5th December 2006, 05:59
I haven't tried your delogo, but the results look great. I will recommend it to anyone, however are there english instructions posted somewhere?
The logotools that I have found, also work perfectly for me. I have been working on my own delogo methods before finding this tool, because none had used the formula (and also in yv12) before now.
I'm sorry that you don't understand the math, but I can show you visually that it does work.

How does your algorithm work?

jmac698
5th December 2006, 06:46
Here's a test:

#logotools test
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\old\LoadPluginEx.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\old\LogoTools.dll")

#create a logo
blankclip(1,720,480,"YUY2")
subtitle("logotest",text_color=$808080,x=280)
logo=last
colorbars(720,480).ConvertToYUY2()
overlay(last,logo,0,0,opacity=.5,mode="add")
final=last
#NoLogoAuto(clip,logoclip, logo frame number)
video=NoLogoAuto(final,logo,0)
return(video)
#return(fiinal)
#return(logo)

jmac698
5th December 2006, 07:18
neuron2 invented the same formula,
http://neuron2.net/board/viewtopic.php?p=5424&sid=9ed8a1a2694952c3747c72761e5806f0
there's also examples showing the formula working, apparently this technique is called colorburn in photoshop.

Comparison of all other tools, which don't work well:
http://people.freenet.de/doxville/Logofilter/Filterguides.htm