[FFmpeg-devel] [PATCH 1/2 v2] delogo: Use weighted interpolation

Stefano Sabatini stefasab at gmail.com
Mon Jul 1 09:48:24 CEST 2013

On date Friday 2013-06-28 13:07:19 +0200, Jean Delvare encoded:
> Hi Stefano,
> On Thu, 27 Jun 2013 23:12:45 +0200, Stefano Sabatini wrote:
> > On date Wednesday 2013-06-26 14:50:37 +0200, Jean Delvare encoded:
> > > By properly weighting each known point when computing the value of
> > > each interpolated pixel, the visual result is much better, especially
> > > on borders and/or for high or large logo areas.
> > >
> > > The algorithm I implemented guarantees that the weight of each of the
> > > 4 known points directly depends on its distance to the interpolated
> > > point. It is largely inspired from the original algorithm, the key
> > > difference being that it computes the relative weights globally
> > > instead of separating the vertical and horizontal interpolations and
> > > combining them afterward.
> > [...]
> > 
> > LGTM and nice idea.

> Also, there is another logo removal filter, vf_removelogo, and while I
> did not yet look into the code closely, it seems to be much more
> complex and slower. So there probably is value in keeping the delogo
> filter reasonably fast and simple, and use the removelogo filter for
> more advanced processing.
> There is so much more that could be experimented with, I'm sure there's
> more than one image reconstruction algorithm out there which could be
> used for logo removal. And not only on a per-picture basis... IMHO a
> good logo removal filter would use the motion vectors as an input, so
> that it can use relevant data from the previous / next frame(s) to
> improve the image reconstruction.

removelogo works in a different scenario, where the logo image is

Thus in theory we could keep this distinction, and introduce more
modes/algorithms in delogo always assuming image reconstruction, even
if they are slower.

Using a better names to distinguish the two filters better also could
be considered.
FFmpeg = Fancy and Furious Martial Puritan Evil Gladiator

More information about the ffmpeg-devel mailing list