[MPlayer-dev-eng] [CFTWWI] VF logodetect/logoremove

Shachar Raindel shacharr at gmail.com
Fri Aug 12 00:48:03 CEST 2005


On 8/11/05, Rich Felker <dalias at aerifal.cx> wrote:
> On Thu, Aug 11, 2005 at 04:42:13PM +0200, Ivo wrote:
> > On Thursday 11 August 2005 11:45, Gaetan SEMET wrote:
> > > Logo removals would be so nice in mplayer...
> > > Do you know this project :
> > > http://www-sop.inria.fr/odyssee/research/tschumperle-deriche:02d/appliu/
> > > It's a powerful image reconstruction library.
> > > I don't think it is usable for "live" processing, but it may be
> > > interesting to look at it.
> >
> > It's certainly interesting. Thanks! Just now that I had lost interest :)
> >
> > You're right it's not usable for realtime processing. It needs thousands of
> > itterations. I have the parrot example running for minutes now and the
> > fence is still mostly vissible. Parts are gone though and it looks good.
> > So, for image reconstruction, it's useless, unless you can bear 1 frame per
> > hour or something. Even if you limit the region you reconstruct, it will
> > still take thousands of itterations and maybe five to ten minutes to
> > reconstruct only one frame.
> 
> Of course it's probably shitty code that uses doubles all over the
> place, and all sorts of other inefficiencies. Just rewriting it
> properly would probably get a 10x speedup, without even considering
> algorithmic optimizations. Of course this is just a guess, based on
> the way academic proof of concept code usually works..
> 

Another good way to speed-up the code is to reduce the size of the
area we are applying this filter to - a nice box about 30 pixels away
from the logo will do the trick, and will usually give huge speed-up -
we reduce the size of the problem by a factor of about 50, gaining a
huge speed-up, almost for free (we are now risking creating an ugly
contour on or bounding box edge, but this can be solved by slowly
blending from the filtered area to the non-filtered one, and/or
adjusting the various channels to match the area as much as possible.

I have tested removing a logo, and got great results after about 1000
iterations, which took about 30 seconds on my PC - P-4 3.0 GHz with 1
GB of Dual DDR 400 MHz. You can see the result here:
http://tx.technion.ac.il/~raindel/man_delogo.xcf.bz2 - layered gimp
picture, which has the original, and the block with the logo after the
filter. I had to manually adjust the brightness for some weird reason
- the filter has reduced it in a considerable amount. The results of
running the filter on a whole screen (also got very nice results after
about 1000-1500 iterations, but was much slower) are available here:
http://tx.technion.ac.il/~raindel/whole_screen.png .

Now, get 10 times speed-up from straight-forward optimization, 2 times
optimizations by using the predicted image as the initial condition
for the next impainting, and 2 times speed-up by using a dual-core
system, and you got a nice 1.5fps rate for ultra high quality logo
removal. Now, is this algorithm usable for removing logos?

> > But, I have also run the denoising examples, and that could be interesting
> > as a high quality denoiser. After 40-60 itterations, all the noise is gone
> > and the result looks very good. It will still be slow as hell (maybe one
> > frame per ten seconds), but for encoding small video clips, it might just
> > be feasible.
> 
> Optimized, this would be perfectly fine. I'm used to 1fps or slower
> encoding anyway.
> 

Now, you can get it, for removing logos as well.

   Shachar




More information about the MPlayer-dev-eng mailing list