[mythtv] [PATCH]Black border filter

Kristof Pelckmans kristof.pelckmans at antwerpen.be
Wed Sep 1 06:57:14 EDT 2004


> Sounds like a good idea.   Unfortunately, I wasn't able to get it do to
> anything.  I was somewhat confused by the explanation of the parameters...

Ok, I've overlooked one, I'll try again :

example :
blackborder=0:70:76:430:18:20,blackborder=0:40:46:490:18:20

The first filter detects a 16:9 video stream in a 4:3 capture stream
and the second is for a 14:9 video stream in a 4:3 capture stream.

The different parameters :
1) 0 for horizontal, 1 for vertical (not implemented)
2) start line for detection of first line of video
3) end line for detection of first line of video
4) number of lines to consider when a black border is found
   this number depends on the aspect ratio you are looking for and the width of
the video - I guess expressing this as an aspect would make it more general...
5) 'black' pixel threshold : all pixels below this threshold will be
   considered as black
   range : from 0 to 255, 0 for a black pixel, 255 for a white pixel
6) 'black' line threshold : minimum number of black pixels that have to be
   present to consider a line 'black'
   range : from 0 to video capture width - see comment below

> w/rt the 'black line threshold', wouldn't it be better to express this
> as a percentage rather than a pixel count?  By using a fixed number of
> pixels, you're tuning the filter for use with one particular horizontal
> resolution, whereas if you use a percentage, the filter adapts itself
> automatically to the resolution of the source material.
Internally it is converted to percentage, but I didn't do it to not
overcomplicate the parameters : that would make :
blackborder=0:40:46:490:18:0.2

What output plugin are you using ? I have some code that grabs an image when
you press pause so you can use it with The Gimp...

Ciaos,

Kristof



More information about the mythtv-dev mailing list