Shop OBEX P1 Docs P2 Docs Learn Events
Video Overlay — Parallax Forums

Video Overlay

aeadingaeading Posts: 3
edited 2012-01-01 01:42 in Propeller 1
Hi
I would like to overlay GPS coordinates onto a composite video signal say at the bottom of the video feed. The GPS data would be captured via RS232 then parsed out then overlayed. I have achieved this using 3rd party overlay IC from decade engineering (BOB Card) but this unit runs in at a high cost is the video overlay possible ?
Thanks
«1

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-01-12 15:29
    Have a look at Hitt Consulting's Propeller-based video overlay device (www.hittconsulting.com/hcosd.htm). The design and code is available if you want to make your own or you can buy the finished product from him. It's designed for connecting to a logic level serial GPS output.

    The main thing you need from his design is the sync separator and the video DAC.

    Post Edited (Mike Green) : 1/12/2009 3:35:04 PM GMT
  • BeanBean Posts: 8,129
    edited 2009-01-12 15:57
    Mike is correct. You are free to use my design for you own use, I encourage it.

    If you are making a commercial product that you are selling, I charge a $5.00 per unit license fee if you use a significant portion of my design.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ·The next time you need a hero don't look up in the sky...Look in the mirror.


    ·
  • shanghai_foolshanghai_fool Posts: 149
    edited 2009-01-12 22:30
    You could also use a MAX7456 if you can find one. SPI input. Works well with Propeller.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-01-12 22:43
    DigiKey has the Maxim part, but it's double the price of a Propeller! If it could genlock onto the colorburst and do a color overlay, it might be worth the extra money. But it can't: it's just black and white.

    -Phil
  • shanghai_foolshanghai_fool Posts: 149
    edited 2009-01-12 22:59
    I also don't like the built-in character addresses but is the simplest solution I have found so far. Let me know if you find something else. I was able to reprogram most of the ASCII characters to correct addresses but it still leaves a lot to be desired. Especially color. I am sure there are chips available as they are used in most video recorders for menus but I haven't found any info on them.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-01-12 23:28
    Overlay chips used to be available in abundance from the likes of Philips, Rohm, and NEC, for example. Most did color and were relatively inexpensive. But they needed a lot of external parts to work, such as a sync separator, DC restorer, analog switches, and a line driver. Why they're not still around, I don't know. It may be because the overlay functions got built into the general video processing chips as TV, VCR, and DVD electronics became integrated on a larger scale.

    One of my overarching goals, since the day I started working with the Propeller, has been to genlock its chroma generator to incoming colorbursts and do a color overlay. I'm sure it's possible, but I'm not sure how just yet.

    -Phil
  • shanghai_foolshanghai_fool Posts: 149
    edited 2009-01-12 23:46
    Well, video is entering a new world order now as NTSC is going the way of Betamax, etc. Everything now is HD. No more analog video. I don't know if I will be around long enough for it to filter down to surveilance and general/micro cameras. I'm hoping there will be OSD chips for HD as well.

    You are correct as most companies are integrating so many functions into single specs of silicon, it may not be available as a separate device.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-01-12 23:54
    shanghai_fool said...
    Well, video is entering a new world order now as NTSC is going the way of Betamax, etc. Everything now is HD. No more analog video.
    That's definitely not the case. NTSC is alive and well in the CCTV market and will be for many years to come. It's only broadcast analog video that's soon to disappear.

    -Phil
  • shanghai_foolshanghai_fool Posts: 149
    edited 2009-01-13 00:24
    It will filter down quicker than you may think.I imagine all those CCTV manufacturers are now thinking "How can we resell everything we have already sold?" By upgrading to HD, of course.

    Somebody must have it, otherwise, how can the TV shows zoom in to a 6 pixel car tag and read the ID? Or better yet, a windshield sticker from 100' that I can barely read at 2 feet. [noparse]:)[/noparse]
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-01-13 00:35
    The price of the HD stuff will have to come down to the sub-$10 NTSC board camera level before we see NTSC begin to disappear. That won't happen any time soon.

    -Phil
  • shanghai_foolshanghai_fool Posts: 149
    edited 2009-01-13 00:51
    Soon is a relative term. 6 years ago, I bought a JVC HD-1 for $4000, now HD Cams are a couple hundred. I also remember paying $400 (in 1975 dollars) for an 8080. So, the $10 HD cam will probably be $20 then. But then again, soon is never soon enough.

    Imagine what the Propeller would have been worth a decade ago?
  • BradCBradC Posts: 2,601
    edited 2009-01-13 02:01
    shanghai_fool said...
    It will filter down quicker than you may think.I imagine all those CCTV manufacturers are now thinking "How can we resell everything we have already sold?" By upgrading to HD, of course.

    Somebody must have it, otherwise, how can the TV shows zoom in to a 6 pixel car tag and read the ID? Or better yet, a windshield sticker from 100' that I can barely read at 2 feet. [noparse]:)[/noparse]

    There are already some very nice (multi) megapixel digital CCTV cameras around, and the picture quality is *superb*. The biggest issue there is simply the amount of bandwidth required to compress, transport and record this stuff. The other issue is image latency. An analogue camera switched by an analogue matrix and into an analogue monitor has an unnoticable latency. Digital is another story entirely with end to end latencies exceeding 1/4 second on some stuff, and worse on cheaper gear. That is a big annoyance when you are operating a movable camera.

    I played with a nice camera/lens combo recently that allowed me to read the manufacturers data nameplate off a crane over 3km away.

    ... sorry to drift off topic [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cardinal Fang! Fetch the comfy chair.
  • BeanBean Posts: 8,129
    edited 2009-01-13 02:37
    I have used the MAX7456, it works okay. But it is expensive and uses ALOT of power.
    There was rumors about a color version. But I've never seen anything about it.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ·The next time you need a hero don't look up in the sky...Look in the mirror.


    ·
  • shanghai_foolshanghai_fool Posts: 149
    edited 2009-01-13 03:20
    I think it may be do-able with the prop. Just need to sync external video to VGA driver. Drive output pin high for white, low for black and change to input (tri-state) to pass video. It would take a better engineer than me though.
  • shanghai_foolshanghai_fool Posts: 149
    edited 2009-01-13 14:44
    The guy that did the Viewport has done some amazing video stuff with the prop. He takes video in thru an ADC and processes it so if he can do that, just getting the sync shouldn't be too hard. Take a look at his demos and tutorials.
    I'm beginning to think anything is possible with the prop.
  • JavalinJavalin Posts: 892
    edited 2009-01-13 15:48
    >I'm beginning to think anything is possible with the prop.
    ditto.

    I've done a black and white overlay but the long term goal when I have time is colour.

    Phil - can you expand on the colour burst bit? I've read various things previously and never really sussed it. Surely it cannot be that hard?

    James
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-01-13 17:11
    James,

    The 3.579545 MHz colorburst at the beginning of each line of NTSC video provides a phase reference against which chroma information within the line is measured. In normal Propeller video output, the Propeller provides both the colorburst and the phased chroma modulation within each line that produce the various colors. This is done with an internal x16 chroma clock. In an overlay situation, the incoming video stream provides the color bursts, and any colored graphics that the overlay sytem produces have to be phase referenced to the incoming colorburst. What makes this hard with the Propeller is that there's no direct access to the phase of its chroma clock; but, in order to lock onto the incoming colorbursts, this phase has to be adjusted from the program. Otherwise the colors it produces will not only vary from the colors specified but may also drift, producing a rainbow effect rather than solid colors.

    -Phil
  • Blue SkyBlue Sky Posts: 2
    edited 2009-01-13 21:51
    I'd love to have a color OSD. Two actually, one for each eye!
    I was excited about the MC1378 RGB-composite overlay chip until I looked at the data sheets.
    Many arcane and unabtainable coils & such.
    You can find it here under Analogue Video Encoders: http://icc.skku.ac.kr/~won/electro/videochips.html
    -Dave
  • Blue SkyBlue Sky Posts: 2
    edited 2009-01-14 00:44
  • JavalinJavalin Posts: 892
    edited 2009-01-14 09:00
    Phil,

    Thanks for that. I assume youd need to read the colour burst part of the line via an ADC to get the phase information?

    James
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-01-14 09:13
    James,

    A comparator would probably work if you set the threshold right. The bigger challenge is matching the phase with the Propeller's chroma clock.

    -Phil
  • GreyBox TimGreyBox Tim Posts: 60
    edited 2009-01-15 06:04
    Phil Pilgrim (PhiPi) said...
    shanghai_fool said...
    Well, video is entering a new world order now as NTSC is going the way of Betamax, etc. Everything now is HD. No more analog video.
    That's definitely not the case. NTSC is alive and well in the CCTV market and will be for many years to come. It's only broadcast analog video that's soon to disappear.

    -Phil
    From what I've seen, the H.264 compressed digital video is taking over all of the new stuff for systems with more than 16 cameras - basically anything larger than a small convenience store (and even those are starting to go digital).· Most of the "cheap" NTSC stuff I see out there is "garbage" (QCIF -·and at the price, what else would one expect), any reasonable quality will still set you back $60+US - but many of those have Bt.656 parallel digital line that you can hack on the camera PCB (so you can even get around the analog thing if you are so inclined).

    All of the digital HD for CCTV cameras are basically going H.264/MJPEG unless it's part of a video-conference system.· The infrastructure is easier for installers when the camera is POE-100b-T (any "idiot" these days·can run a Cat-5, and terminate the ends properly).· The most complicated parts are starting to be the cameras - while you don't need a "quad" or a "mux" any more - just a desktop computer running XP with suffucient storage space and IE 6 or IE 7 (plus a switch with POE injection).

    I just picked up a 5MP H.264 for less than $900US - Sweet deal, multiple users can log into the feed simultaneously, at diferent bit-rates and resolutions (and even H.264 or MJPEG depending on the availability of Java in the browser), the camera pushes the stream to a folder on a "server" (can be any machine with a shared drive...).


    The big deal about network cameras is the infrastructure savings.· If you have·64 cameras in one building, but the security office is in another, it used to mean running 64 high-quality coax to the other building, or running a fiber-mux ($$$$$$).· With a network video system, you can piggy-back an existing corporate network for the bandwidth (with a VPN), or you can use another set of fiber pairs to a standard switch in the other building (keeps the part-numbers down, allows the on-site IT staff to support the CCTV system).· Many networks also feautre fail-over support so that if the inter-building fiber was damaged, an alternate route can be negotiated for un-interrupted CCTV service (whereas with coax, if one gets cut, that camera is down until the a new cable is pulled, or it's re-routed to a spare coax in the existing conduit - assuming the installer had the foresight to pull some...).

    You also don't need to run: power, control, video (all can be contained in the same Cat-5).

    -Tim

    P.S. Oh yeah, on-topic: I'd use a dedicated sync extractor (like a National LMH1980 - which can be had from Digikey for ~$5US), and a video mux IC with an Parallax-SX to do the overlay on Composite video...· Probably your cheapest bet.· Otherwise, if you want a good quality overlay, you have to decode and re-encode the video with dedicated ICs so that the micro can have access to the digital form of the video signal data (much easier to sync to and correctly modify for color...). Take a look at the Analog Device ADV7180 and ADV7391 decoder/encoders (respectively), cheap, small, not very many pins, and the video can be bussed with BT.656 muxed parallel data at 27MHz for NTSC color 480i. -T

    Post Edited (GreyBox Tim) : 1/15/2009 6:27:55 AM GMT
  • propwellpropwell Posts: 87
    edited 2009-06-29 10:42
    I'm just trying to build my own overlay-circuit, but i can't really handle it.
    Attached is my schematics, how i built it, but it doesn't work! The screen just shows nothing!

    I'm not shure about the connection to the prop, because in the OSD-Files-Schematics, there is always Pin 0,1 and 2 showed!
    Can someone give me a short help? Is there maybe a version of the OSD-Program which doesn't use an GPS- or something-else-data, just to output some text?

    Thanks for your help!

    Propwell
    1275 x 776 - 33K
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-06-30 02:18
    It's not enough to read just the VSYNC output. You also need HSYNC or — if you only want one input — CSYNC, from which you can extract both via programming.

    -Phil
  • propwellpropwell Posts: 87
    edited 2009-06-30 10:45
    thanks Phil, but i thought my way was the way it was built on the Hitt-Consulting-schematic? Doesn't it work like this?
  • computer guycomputer guy Posts: 1,113
    edited 2009-06-30 13:08
    propwell said...
    thanks Phil, but i thought my way was the way it was built on the Hitt-Consulting-schematic? Doesn't it work like this?

    In the Hitt Consulting schematic the prop is connected to CSYNC via a 1k resistor. You have the prop connected to VSYNC via a 1k resistor


    Hope this helps

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Building Blocks To The Propeller Chip A web site designed to help people who are new to the propeller chip.

    Guitar Hero controller using the prop (WIP) --> HERE
  • propwellpropwell Posts: 87
    edited 2009-07-02 09:11
    thanks for your help, computer guy, but i connected now the CSync-Pin instead of the VSync-Pin but the monitor still is black.
    I've got some questions:
    1. In the HITT_Video_Overlay_012.spin the schematics show Pin 0-3 used, but in the schematics.pdf, there are the Pins 16-19 and 22 used! Could that be the problem?
    2. How does the program behave when there is no input-video-signal?
    3. I use the Overlay_test_Display.spin for testing, because it has no GPS and other stuff in it. Is there a chance to change it to PAL?

    Thank you alls!
  • propwellpropwell Posts: 87
    edited 2009-07-02 09:12
    attached, the program i use for testing!
  • Ole Man EarlOle Man Earl Posts: 262
    edited 2009-07-02 18:11
    Works just fine on my system. Pin0 is the vert sync input from the lm1881 sync seperator chip and pin 1 is the overlayed video out.
    Earl

    PS I used your program with no modifications.
  • propwellpropwell Posts: 87
    edited 2009-07-03 06:31
    Hey Earl, thanks for testing. But i'm confused about the pins! Do i really have to connect it to Pin0 and 1 on the Propeller? Because of the HITT-Schematics (where it's connected to 26...) i've connected the Pins 0-4 to another device already!

    Seems to not be that far away! Thank you very much!

    [noparse]:edit:[/noparse] ah and earl, could please describe me how the monitor looks when there's no input-signal?

    Post Edited (propwell) : 7/3/2009 6:41:20 AM GMT
Sign In or Register to comment.