Analyzing a video-source with propeller
propwell
Posts: 87
Hi together,
i've got a video-signal from a camera wich is very sensitiv to IR-wavelengths. Also, i've got anoter signal from a normal camera.
Both PAL/NTSC-based. Now i want to read the pixels of the IR-image where the values are very high (very bright --> much IR-input), maybe by setting a threshold.
I've realized the OSD form Terry Hitt before, but that doesn't read the incoming signal!
Has anyone an idea for that?
Thank you,
Max
i've got a video-signal from a camera wich is very sensitiv to IR-wavelengths. Also, i've got anoter signal from a normal camera.
Both PAL/NTSC-based. Now i want to read the pixels of the IR-image where the values are very high (very bright --> much IR-input), maybe by setting a threshold.
I've realized the OSD form Terry Hitt before, but that doesn't read the incoming signal!
Has anyone an idea for that?
Thank you,
Max
Comments
http://forums.parallax.com/showthread.php?p=878680
It also links to Hanno's article about this.
Basically he uses a ADC to digitize the video signal but keeps only 4 of the bits, these nibbles can then be packed in to longs etc for storage and processing. Generally storing high bit depth high resolution data would be too much for the propeller's RAM so this is a neat fix.
I wonder as well about binning pixels to reduce resolution (and ram needs) for things like blob tracking and the like.
Graham
I'd think that mixing of 2 independend video signals is not that easy, as they can be totally out of sync.
Max,
This is definitively doable- although capturing/processing video with the Propeller is not for the faint of heart...
Download ViewPort here: hannoware.com/viewport
It comes with 2 objects that will help you:
PropCapture: frame grabber that digitizes an incoming NTSC signal into hub ram at configurable resolution with 1 cog
PropCV: pasm kernels to continually filter video signals in a cog to extract information- for example location of the brightest spot
Here's the easiest way to proceed:
- 1 cog running PropCapture to capture the IR camera
- 1 cog running PropCapture to capture the visible light camera
- 1 cog running PropCV to find the brightest spot in either captured frame (wasn't clear which you were referring to..) This will write the location of the spot into a long in ram
- 1 cog continually assembling an image using the two captures frame streams and the location to swap
- (for debugging) 1 cog to run Conduit to share data with ViewPort so you can see what's going on, including the streamed variables and the streamed video
- 1 cog to output the image to TV/VGA
Needless to say, with the Propeller's limited RAM, you won't get HD video... I believe PropCapture's low res is something like 160*100- 4 of these fit into the 32kb.
Again, not easy, but this sounds like a cool project!
Hanno
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Co-author of the official Propeller Guide- available at Amazon
Developer of ViewPort, the premier visual debugger for the Propeller (read the review here, thread here),
12Blocks, the block-based programming environment (thread here)
and PropScope, the multi-function USB oscilloscope/function generator/logic analyzer
thank you for your advise!
I think that normally it wouldn't be necessary to read and output the visible-light image, as i maybe could use the Hitt-OSD. It would be perfect if i could read the IR-Image, find the brightest spots (their koordinates) and draw these spots via the OSB onto the normal Picture!
So the resoultion of the visible-light-picture is not changed, and the resolution of the drawn images doesn't need to be to high...
[noparse]:edit:[/noparse] ah and, what kind of special hardware do i need? is this nearly real-time-possible?
Varying those points would spot the small things between the original points but could let something moving (in a perfect manor) elude any active samplings. I managed to get it to draw litle white boxes that followed the Guinea Pigs about in their run.
In homage to "The fifth element" it would keep on flaging up "She has no file". The missus just didn't see the funny side.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
Hanno
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Co-author of the official Propeller Guide- available at Amazon
Developer of ViewPort, the premier visual debugger for the Propeller (read the review here, thread here),
12Blocks, the block-based programming environment (thread here)
and PropScope, the multi-function USB oscilloscope/function generator/logic analyzer
Thanks Hanno
The prop really is versatile! So what are we going to do with Prop II when it arrives... 8x faster, >8x hub memory, vastly improved counters, 2x I/Os !!!
Message for Chip... Back to work !!!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
Hanno
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Co-author of the official Propeller Guide- available at Amazon
Developer of ViewPort, the premier visual debugger for the Propeller (read the review here, thread here),
12Blocks, the block-based programming environment (thread here)
and PropScope, the multi-function USB oscilloscope/function generator/logic analyzer
For overlaying the bright IR pixels atop the visible image, you need to make sure that the fields-of-view for the two cameras are as close to equal as possible. Otherwise (without extra scaling, and neglecting parallax -- the bad kind, not the Rocklin kind), your overlay will be accurate in the center but not at the edges. How do your two fields-of-view compare? If they're off, can you change lenses to correct one of them?
-Phil
Post Edited (Phil Pilgrim (PhiPi)) : 2/25/2010 3:29:17 AM GMT
Perhaps flicking between sources might be more versatile, that's what the predator does [noparse];)[/noparse]
Graham
thank you for your answers!
@Phil: yeah the two cameras have quite the same field-of-view. I can manage that with some optical stuff.
Has anyone some idea how to do that? I thought about maybe setting up an electrical circuit, which thresholds the video-signal to a Low/High signal, so i could read it without an ADC. Could be much faster. What do you think?
[noparse]:edit:[/noparse] i read about a multiplexer, could that help?
Post Edited (propwell) : 4/15/2010 3:00:43 PM GMT