Log in

View Full Version : [IDEA]: Logo detection


E-Male
27th September 2002, 12:57
I got an idea for a simple logo detection filter:
it has one paramater, lets call it X
the filter looks at the pixels in the frame and commpares each to the ones at the same place in the previous X frames if they are the same this pixels is turned black in the output else itīs made white

would be nice if someone could tell me of this can be programmed as simple as it seems to me (no idea how to do it myself, yet) or if someone even could make it

I a have a thousend ideas how to improve it, once itīs working
hope someone with the needed programming skills helps me out with coding

cu
e-male

Malcolm
27th September 2002, 13:52
Well, first of all, you'll need another parameter for a threshold, or else the pixels will always be a little different because of noise and such..
And then, 'X' must be _very_ big, or else you'll black out still scenes.

Another problem is, that this method only detects 'still logos'. Animated logos and logos with transparency won't be detected. Maybe you can detect logos with transparency by setting the threshold high enough...

i could imagine that one can achieve the same result by using one of the existing temporal filters and playing around with layer & mask...
(i.e. setting a high value for the temporal filter, then generating a mask from the result and applying it to the source)

bye, Malcolm

E-Male
27th September 2002, 16:01
Originally posted by Malcolm
Well, first of all, you'll need another parameter for a threshold, or else the pixels will always be a little different because of noise and such..

First of my additional ideas
But i just wanted to present the basic concept first



And then, 'X' must be _very_ big, or else you'll black out still scenes.


I gues every filter must be used right
[I also gues there is a basic misunderstanding:
the resulting clip, or better one frame of it exported as bmp, should be the basic for a mask for a logo removeing plugin]



Another problem is, that this method only detects 'still logos'. Animated logos and logos with transparency won't be detected. Maybe you can detect logos with transparency by setting the threshold high enough...


itīs intendet for still logos, hardsubs and so on
but for example if you got a still logo with an aniamtion in it there is only a litle bit of work in a painting program necessary to make the mask work



i could imagine that one can achieve the same result by using one of the existing temporal filters and playing around with layer & mask...
(i.e. setting a high value for the temporal filter, then generating a mask from the result and applying it to the source)


not sure i perfectly understood that, but i think that goes along with the missunderstanding (at least i think tehre is one) I mentioned above


my second additional idea is that there are parameters to specify the colors to be used (my exampel just used black and white) so this filter can be adjusted to the logo removing filter thats used, reducing the work needed to be done in teh paintign program even more

cu
e-male

Malcolm
27th September 2002, 16:18
don't get me wrong. i think your idea is good. i just wanted to point out some problems that may occur. And i guess that's why you posted your idea, or?!

Originally posted by E-Male


First of my additional ideas
But i just wanted to present the basic concept first

o.k.


I gues every filter must be used right
[I also gues there is a basic misunderstanding:
the resulting clip, or better one frame of it exported as bmp, should be the basic for a mask for a logo removeing plugin]

Sure; i just wanted to say, that it will be _veeery_ slow then, because X _has_ to be big!


itīs intendet for still logos, hardsubs and so on
but for example if you got a still logo with an aniamtion in it there is only a litle bit of work in a painting program necessary to make the mask work

I guess for hardsubs, X has to be low, or else the sub changes and won't be detected. but the you'll black out still areas..

my second additional idea is that there are parameters to specify the colors to be used (my exampel just used black and white) so this filter can be adjusted to the logo removing filter thats used, reducing the work needed to be done in teh paintign program even more

cu
e-male

there's a thread about a filter for a hardsub-removal. One of the ideas is, that hardsubs usually have one single color (e.g. pure white). Another idea is, that they occur in a fixed area (at the bottom of the clip).
One could use these assumptions to write a filter...

bye, Malcolm

E-Male
27th September 2002, 16:39
i didnīt got you wrong, i hope i didnīt sound rude

most problems you think of can be eliminated by using the right part of the movie (or what ever you wanna convert)
for example when the whole thing got the same logo, you just need one scene that fades to black (with the logo remaining) and voila, you got your mask :)

for the subs: to make it really good iīll have to make a new mask for every single sub and use each on teh right frames (iīll only do that on one movie with very few subs, so donīt think iīm a workaholic :))))

that there mostly is a specified areea where all susb are and that they have one maybe two colors would be the next ideas *g*

CU
E-Male

p.s. Iīll write it myself, but i didnīt foudn any getting started tuturial für aviysynth plugins :((
anyone got one?

Guest
27th September 2002, 17:01
p.s. Iīll write it myself, but i didnīt foudn any getting started tuturial für aviysynth plugins :((
anyone got one?

Didn't look very hard did you? :)

Try the original Avisynth web site of Ben Rudiak-Gould. Also, several threads here deal with getting started writing Avisynth filters. Seek and ye shall find.

E-Male
27th September 2002, 19:34
sorry neuron2, but i canīt find anything :( :( :(

Guest
27th September 2002, 19:54
Try this:

http://www.avisynth.org/index.php?page=FilterSDK

E-Male
27th September 2002, 20:06
THX