Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 


Submitted by Jack Greasley, posted on January 31, 2002




Image Description, by Jack Greasley



This IOTD is just to show you guys (and gals?) what I’ve been working on for a while. It’s a system called Point (bloody marketing people) which is used by TV companies to do “Telestration” – (Horrid word, not mine), or in other words, drawing over live TV images.

It’s currently in use by Sky TV in the UK for their Monday night football program, and by a couple of people In the United Arab Emirates. It will hopefully be used in the summer for the coverage of the world cup.

Enough of that sort of thing, onto the techie bit.

Feature List
  • OpenGL UI and rendering ~ 50fps.
  • DirectShow live video capture @ 24fps.
  • ~10 Different Animated tools including
  • Line
  • Arrows
  • Curved Arrows
  • Bitmaps
  • Spotlights,
  • Perspective corrected bitmaps
  • True-type Text
  • Freehand draw
  • Floating, customizable toolbar.
  • Skin-able UI.
  • Shadows (of a sort)
  • Undo – Redo.
  • Full serialization.
  • Fantastic programmer-art themed skin supplied as standard
  • It was implemented mainly in VC++ with OpenGL, DirectX and DirectShow thrown in for good measure. It captures (DirectShow) and displays (OpenGL) full broadcast resolution video (use of texture rectangle and BGRA extensions helped a lot)

    Although there is a static scene in the background of the sample pics, the system does display live video at ~24fps (honest).

    Various little tools are provided for drawing and illustration (various types of lines, spotlights, circles, bitmaps). It uses OpenGL to do all of the rendering, including the UI. The whole thing is controlled from a touch screen plasma or LCD monitor. One nice thing it does, is to scale bitmaps with correct perspective (there’s a quick example lower left). Curved line drawing is done with Catmull-Rom splines.

    There was some talk early on about porting it across to Irix, so I decided (as you do) to implement my own OpenGL based windowing system. The windowing system turned out, to my shame, to be a lot like MFC under the hood, although using Action objects for message calls

    Instead of the not-very OOD MFC method of direct function calls. It does however support nice things like complete application serialization, plugins and factory based object creation.

    The actual coding of the system took about three months, but the final system (after much “can you just change this?”) was ready for use after about five months. One thing that really helped was the use of test rigs from day one. The test I found most useful was a simple “Random Monkey” that just sat there and hit random points on the screen for hours, its surprising how many bugs that can turn up.

    Output is done using a professional video compositing board. At around $4000 each, they’re the reason I can’t post a demo. It runs quite nicely on a 2Ghz P4 with 1Gb ram. But the thing is finish and in use. It hasn’t crash yet. Which is lucky ‘cos if it does crash 7Million people will know about it :o)

    I will hopefully be releasing some of the source code (Core classes, Windowing System, Video capture and Display subsystems) when

    a) I can clean it up a bit. (Documentation is a little, erm thin as well)
    b) I’ve sold a couple more systems and can put some time into the project.

    The system would have been written quicker but for the hours spent reading flip-code + forums – cheers.

    Jack Greasley

    Note: to those in the UK – Monday Night Football on Sky Sports One. You know you want to!


    [prev]
    Image of the Day Gallery
    www.flipcode.com

    [next]

     
    Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
     
    Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
     
    ector

    January 31, 2002, 10:53 AM

    Seriously, really very amazingly cool!

    (first post? =)

     
    Lion V

    January 31, 2002, 10:56 AM

    Coolness.

     
    =[Scarab]=

    January 31, 2002, 11:02 AM

    Just awesome! Very nice work. And it's always pretty damn nice if 7 million people are watching your work. ;)

    I do have one question though. You say: "One nice thing it does, is to scale bitmaps with correct perspective"
    Does that mean that you can instruct the program on what depth a bitmap should be displayed (likely), or does it mean that you actually calculate depth information out of the motion video (less likely, but would be VERY cool ;).

     
    Martin Rudstrom

    January 31, 2002, 11:22 AM

    Impressive. I usually don't post here, but I must say that this is really cool!

     
    Jack Greasley

    January 31, 2002, 11:40 AM

    Hiya =[Scarab]=,

    The perspective correction is done automatically after a quick (5 second) configuration setting. Basically, during pre-transmission
    the operator gets the correct view on the screen and touches four
    points on the pitch, (normally the four corner posts) and from this
    the program works out the correct perspective to apply. It's pretty
    simple but works nicely.

    Jack (aka Bobbins)

     
    =[Scarab]=

    January 31, 2002, 11:42 AM

    Ah I see. Hadn't thought of that. Really neat! :)

     
    Chris McArthur

    January 31, 2002, 11:45 AM

    I have seen things like this before (not sure if they used OpenGL or DirectX) and always thought they were pretty damn impressive.

    Good work man!

     
    Bunnz

    January 31, 2002, 11:45 AM

    This is really really cool! Better than the usual stuff!

    Have fun
    Bunnz
    www.bunnz.com

     
    Willem

    January 31, 2002, 12:16 PM

    I like it a lot. Very nice. Unfortunately I don't receive Sky as I can't be arsed to pay for it, but I'd love to see it in action!

     
    savage

    January 31, 2002, 12:41 PM

    Looks mighty impressive. What professional video compositing board are you using for the output. I hope you are milking Sky for all they are worth :), and would it be rude to ask how much one of these systems cost?

    L8R,


    Dominique
    http://www.DelphiGamer.com := for all your Object Pascal game development needs;

     
    Jack Greasley

    January 31, 2002, 12:53 PM

    Hi savage,

    The system uses various boards from the Matrox range. I don't really want to talk about money here but the general setup is normally

    High-end rackmount PC (P4 2Ghz, 1GB) + nice graphics/capture card.
    2x compositing boards (Composite RGB and SDI - a digital broadcast format)
    48" plasma screen + touch sensitive overlay
    15" touch screen LCD
    Custom Software (see above ;o)

    So you don't get much change out of the price of a nice car.
    But most of the cost comes from the hardware, alas software is only
    one small (but significant) part of the system.

    Jack








     
    Awax

    January 31, 2002, 01:05 PM


    while(true) {
    applause();
    }



     
    maddoc

    January 31, 2002, 01:34 PM

    The next step would be: implement an AI that
    will comment the game =)

    a really interesting app
    just wanna know how many lines of code ?! =)

     
    Jack Greasley

    January 31, 2002, 01:44 PM

    Hi maddoc,

    Last time I checked (about half way through coding) there were 15k
    lines, so id say that there are about 22-25k now. There are about 65
    source files. I would give you an accurate number but I'm on someone
    else's machine at the moment. The majority or the work went into
    things like the windowing system and the tools. Making them easy
    to use and intuitive takes more code than I thought when starting out.

    Jack

     
    Andy Maddison

    January 31, 2002, 02:44 PM

    Is the Random Monkey also known as Andy Gray? :-)

     
    zed zeek

    January 31, 2002, 03:22 PM

    i take it only the arrows + certain words only make it onto the viewers screens + not all those icons?

     
    FireFoX

    January 31, 2002, 03:42 PM

    This is awesome, just awesome.

     
    Awax

    January 31, 2002, 04:20 PM

    AI ? Why Intelligence ?

    U need no brain to be a soccer commentator. I mean here in France they don't have any :) Even the "Random Monkey" might be too smart.

     
    disableddan

    January 31, 2002, 04:40 PM

    I must say, I've never seen anything like it on Flipcode! Very nice work!

     
    krogoth

    January 31, 2002, 06:03 PM

    This looks very nice - the few times that I've watched sports on TV, I've been interested in how they do that (I'm not surprised that it's with computers, but you get the idea :).

    Are the shadows static, or do they vary based on the image?

     
    Jack Greasley

    January 31, 2002, 06:30 PM

    zed zeek :

    Hi, yep, only the arrows and stuff make it to broadcast. The system
    can work in two ways, the first is to output a compositied image
    with both the video and the arrows etc on top. The second and
    most common in real life is that the system outputs both a key (the alpha channel) and the fill (the RGB info) on seperate channels and
    the studios mixing desk performs the compositing. This allows them to do things like fades and wipes.

    krogoth:

    The shadows are static. They can be thought of as 75% alpha versions of the main graphic. They are simply laid on-top of the video as it plays.

    Jack
    (am slightly drunk as have got new job and have been out to celebrate!!)


     
    Kezza

    January 31, 2002, 09:06 PM

    Woah,
    openGL feeding off DirectShow is quite impressive... and in just 3 months to boot!!!

    but how did you get around openGL's power-of-2 texturesize limitation? I'm guessing you couldn't scale the frames in realtime due to the performance cost....

    -----------------------------------------------
    - I was worried that Dejiko would get hit by a car, fall into the river and almost get eaten by a big fish
    - Hey! That's exactly what happened - nyo (Di Gi Charat)

     
    Luke Philpot

    February 01, 2002, 12:07 AM

    Cool

    Very cool.

     
    Waramp

    February 01, 2002, 12:57 AM

    he uses the texture_rectangle extension. Mentions it in his IOTD description.

     
    QRock

    February 01, 2002, 02:42 AM

    So did you teach Andy Gray how to use it? :)

     
    Alex J. Champandard

    February 01, 2002, 05:10 AM

    Thierry et Jean Michel!

    Indeed, not too brainy, but at least they get involved with the game ;) Try listening to a german football TV commentator; you can hardly tell when there's a goal...

     
    Alex J. Champandard

    February 01, 2002, 05:12 AM

    Beer is your friend.

    Congrats on the new job!

    And very nice work... looking forward to hear about your next project ;)

    Alex

     
    Jack Greasley

    February 01, 2002, 07:04 AM

    Hi QRock,

    Didn't really need to teach Andy at all, we just put it
    in front of him and he picked it up himself. He's been using
    similar (but not as good :o) systems to this for a few years,
    and the new one is much easier to use than previous incarnations.

    But I do think that what he does is REALLY impressive. Using
    a system like that, live to air with no script, while commenting
    on the match AND controlling the Video player all at the same time.

    (For those who don't have Sky , or live in the UK, Andy Gray is
    the commentator who uses the system.)


    Jack

     
    mikie

    February 01, 2002, 07:19 AM

    Looks cool -

    Something I would love to see is a live virtual replay thing...
    so you could see a goal from the balls perspective.

     
    Jack Greasley

    February 01, 2002, 07:40 AM

    mikie :

    We're actually in discussion at the moment that may allow
    this to be possible. I will be knocking up a simple VR view
    within the next month or so to allow this. I think it would
    be pretty cool as well!

    Jack

     
    This thread contains 32 messages.
    First Previous ( To view more messages, select a page: 0 1 ... out of 1) Next Last
     
     
    Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.