[mythtv-users] remove channel logo?

Preston Crow pc-mythtv06a at crowcastle.net
Wed May 10 14:07:15 EDT 2006


On Wed, 2006-05-10 at 13:26 -0400, Wendy Seltzer wrote:
> That said, mplayer has a sometimes-useful approximation.
> 
> delogo[=x:y:w:h:t]
> 	
> Suppresses a TV station logo by a simple interpolation of the
> surrounding pixels. Just set a rectangle covering the logo and watch
> it disappear (and sometimes something even uglier appear − your
> mileage may vary).
> 	<x>,<y>
> top left corner of the logo
> <w>,<h>
> width and height of the cleared rectangle
> <t>
> Thickness of the fuzzy edge of the rectangle (added to w and h). When
> set to -1, a green rectangle is drawn on the screen to simplify
> finding the right x,y,w,h parameters.
> 	
> 
> remove-logo=/path/to/logo_bitmap_file_name.pgm
> 	
> Suppresses a TV station logo, using a PGM or PPM image file to
> determine which pixels comprise the logo. The width and height of the
> image file must match those of the video stream being processed. Uses
> the filter image and a circular blur algorithm to remove the logo.
> 	
> /path/to/logo_bitmap_file_name.pgm
> [path] + filename of the filter image.

With some stations, you want to mask out the logo and then interpolate
to make a guess as to the original contents.  But many stations use a
translucent logo, so you have more information to work with.  I think
some have a slight 3-D effect, where the pixel you see is based on a
different pixel in the original image.

What you really need to do is to determine the algorithm used to insert
the logo, then reverse it.  For pixels that you lack full information
for, you can extrapolate based on surrounding pixels and based on motion
from adjacent frames.

And, of course, some stations occasionally animate their logo, making it
even more complicated.

Doing it right is very non-trivial, and doing it at run-time with live
TV is even harder.



More information about the mythtv-users mailing list