Image Processing
pbhuter
Posts: 36
I need to know if it is possible for the Prop chip to look at an image captured by a B/W camera (I know I can take a picture based on several forum posts), determine the five or so brightest points in the picture (it will be a bunch of light points on a dark background), locate those points on some sort of grid (based on pixel location, maybe?), and figure out the vectors between the points (I'm pretty sure it can do this last part). I need it all running on one cog, if possible, and it has to all work on the Prop chip and board. Thanks.
Comments
Not sure yet how big it will be. It will be mostly black with several points of light (white). I'm going to have external memory on my board, so I should be able to store the image there to look at it. I'm still trying to work out the capabilities of the Prop chip, and haven't actually started building anything yet. The creator of ViewPort references a camera in his "DanceBot", I would be using something similar to that, probably.
Thanks Leon.
Paul
Paul
Graham
Graham
http://www.rayslogic.com/propeller/Programming/Cameras/cameras.htm
This is a serial camera with a "preview" mode that can quickly transfer low resolution images (I think 80x60 or so). The Prop should be able to do real-time work on that in assembly...
ViewPort has 2 objects that should interest you:
- PropCVCapture uses 1 cog to find the H and V-syncs in a NTSC grayscale signal and then captures the video data into memory at several different resolutions- up to 240x200. It packs 8 pixels into each long. This video can be streamed over ViewPort's conduit so you can debug what your camera/image processing algorithm is seeing in real time. At 2mbps you get ~10fps. If you just want to find 1 single bright spot, you can use this object- it'll only take 1 cog and just enough memory for the program- it performs the analysis as the ntsc signal is coming in.
-PropCVFilter uses 1 cog to run a variety of simple vision filters on data in memory. You can stack filters to create more complicated filters. You can also use up to 4 "vision registers" to do filter math.
Hanno
Yep thats pretty much it. They have a windows utility to set options and watch the serial data going back and forth. The serial data comes out pixel by pixel, or as a jpeg (which isn't as much use here?)
http://shop.4dsystems.com.au/camera-and-imaging-modules/256-9200.html
Yesterday I landed a job which needs a dozen of these (or similar), so I'll get getting very familiar with them over the next week or two if you have any other questions.
edit: Hannos PropCV and the other options look good too, I'm going to play with some of these too. Although my application really just needs a still photo, it would be good to know how easy each of the options are to get running
But, I seem to recall that a couple of other places sold the same or similar things...