[mythtv] Patch to autodetect 4:3 Zoom aspect ratio

Mårten Bohlin mabo at mochc.net
Fri Feb 29 12:58:05 UTC 2008

To answer the original question my detection is verry naive. The first
implementation just checked two lines on the screen (The vertical
lines you can see on the debug output
http://www.mochc.net/myth-dev/LetterBoxDebugg.jpg). And then it checks
that the detected image is on a horizontal line. And this has to occur
in three consecutive frames. If a pixel is "black" or not was only a
threshold on the Y component in the YVU.

The latest version of the patch checks that the brightness(Y) do not
change to much instead of just using a threshold.

So yes there is a lot of things that could be done to make it at least
theoretically better.

But I think what would make the biggest differens was if you could
look one minute in to the future, but since I would like my algorithm
to work in Live TV.


On Fri, Feb 29, 2008 at 6:54 AM, Justin <luitjens at cs.utah.edu> wrote:
> This would likely work as long as you know where the cut offs should
>  be.  If not what happens if the screen has a few black lines at the
>  bottom because it is a dark part of the scene?   One thing that would
>  help prevent this would be to look over a couple frames and not a single
>  frame.   Or what if the TV icon goes over into the black bars?
>  Justin
>  Chris Pinkham wrote:
>  > * On Thu Feb 28, 2008 at 10:59:54AM -0700, Justin wrote:
>  >
>  >> What is the edge detection algorithm you are using?  Moving to a more
>  >> sophisticated algorithm could prevent false detections.
>  >>
>  >
>  > I haven't looked at his code, but what more is required other than "all lines
>  > above this are black, the next is not" and vice versa for the bottom bar.
>  > That's what I did in the commercial flagging code does to detect the letter
>  > and pillar boxes.  In order to make things faster, the commercial flagger
>  > doesn't check every pixel, but enough to be accurate.  A screen of thin
>  > vertical lines might make it past the detection, but that's a fringe case.
>  >
>  > --
>  > Chris
>  > _______________________________________________
>  > mythtv-dev mailing list
>  > mythtv-dev at mythtv.org
>  > http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>  >
>  _______________________________________________
>  mythtv-dev mailing list
>  mythtv-dev at mythtv.org
>  http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

More information about the mythtv-dev mailing list