importing images with a webcam
tonyp12
Posts: 1,951
·15 years ago,
·I created the Amiga hardware and software (assembly)
·to read the images from a Connectix QuickCam·webcam.
The Camera was·grayscale and used the parallel port.
The Amiga parallel·was missing some pins, so I got some from the floppy drive port.
And that also gave me the power port f or the quickcam. (uses a ps2 port on the pc)
I do have two of the cameras left, brand new in the box.
So I could·hook them up to a propeller and start coding away.
But would use like 12pins, so kind of a waste.
I guess some type of parallel to serial cmos chip could reduse it.
What would it take to use a USB webcam on the propeller?
It would be hard to find a grayscale one.
And the vga drivers 64 colors would not lend itself to display it nicely.
As it would only have 4 shades of gray.
But for robotic·image tracking, it should be OK.
·
·I created the Amiga hardware and software (assembly)
·to read the images from a Connectix QuickCam·webcam.
The Camera was·grayscale and used the parallel port.
The Amiga parallel·was missing some pins, so I got some from the floppy drive port.
And that also gave me the power port f or the quickcam. (uses a ps2 port on the pc)
I do have two of the cameras left, brand new in the box.
So I could·hook them up to a propeller and start coding away.
But would use like 12pins, so kind of a waste.
I guess some type of parallel to serial cmos chip could reduse it.
What would it take to use a USB webcam on the propeller?
It would be hard to find a grayscale one.
And the vga drivers 64 colors would not lend itself to display it nicely.
As it would only have 4 shades of gray.
But for robotic·image tracking, it should be OK.
·
Comments
http://www.circuitcellar.com/archives/viewable/224-Sander/index.html
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
www.tdswieter.com
8bit data bi-directional, plus 1out and 1in for hand shakes.
I think the demo board (out to header) does·NOT have extra 2pins for hand shake?
Seems that the DB25 connector shell has a Microchip PIC 16C65 in it.
The actual A/D conversion is done inside the parallel port connector housing
The timing for the CCD chip is done by the PIC.
But better off using Webcam's you can get now days.
http://www.dealextreme.com/details.dx/sku.12936
By going with "Driverless" USB Camera,
you would need to write one UVC driver
and many cameras would work.
Or at least make a driver for cameras that use sn9c102,
or spca561a, they output·raw GBRG
http://mxhaard.free.fr/spca5xx.html
Post Edited (tonyp12) : 4/15/2009 9:12:29 PM GMT
Have a look at the USB host spec. Then have a look at the enumeration and bit-rate requirements, then have another look at the Parallel Port version [noparse]:)[/noparse]
I'm not saying it can't be done. At 96Mhz a Propeller can time accurately enough to be a LOW_SPEED USB host, but I've not found *one* UVC camera that will function in any way, shape or form at LOW_SPEED USB.
This is where a lot of people would say "Wait for the PROP-II". I won't, but I will say you might have an uphill battle to drive a USB camera with the existing Propeller and no additional logic. I won't hypothesize about the possibilities of the next generation chips. We know too little about it [noparse]:)[/noparse]
Grab one of the UVC compatible drivers for linux (the source is readily available). You will melt your brain just trying to figure out how you might fit the logic into the current Propeller.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"VOOM"?!? Mate, this bird wouldn't "voom" if you put four million volts through it! 'E's bleedin' demised!
1: Use an ADC and 1 Propeller cog to grab video frames into memory. Then, use another cog to perform apply simple vision algorithms (look for edges, find a bright spot, look for a pattern). ViewPort makes it easy to debug your application by showing you the streamed video and the results of your vision processing- and comes with a tutorial that does this.
2: ViewPort can process video from a file, PC webcam, or the above Propeller frame grabber with the OpenCV library and the full power and memory of your PC. Results of the vision algorithm are continually sent to the Propeller. Researchers have been adding vision algorithms to OpenCV for the last 10 years, now it's in good hands at Willow Garage (funded by Google). It let's you recogize where objects like human faces are, find circles, look objects of a certain color, and much more. OpenCV was used by the Stanford team to win the last DARPA challenge. ViewPort takes all the hassles out of using it.
Good luck!
Hanno
What would be a lot more reasonable would be to use a network cam with an ethernet port and an ethernet adapter, and access the camera as a webserver. All of the hardware and software to do this is out there and you could probably streamline the TCP stack if you know it's a 1:1 connection to a fixed device. Cameras differ in what they will serve up as there are no standards; you'd want one that can serve up a LOW resolution image either as a stream in a documented format or as a series of still images. You might not have any choice about getting the data as .jpg, but .jpg was designed to be unpacked with integer math.
An even better solution would probably be to use something like the CMU cam which does its own processing and is designed to be used by a relatively dull controller.
http://www.electronics123.com/s.nl/it.A/id.2697/.f
Or $30 for a little better one:
http://www.electronics123.com/s.nl/it.A/id.2595/.f
Post Edited (tonyp12) : 4/16/2009 9:47:11 PM GMT
Prop Proto Boards are reasonably priced, and you'd have access to all 32 pins - 10 for the camera plus extras for displays, communications, etc.
Chris Micro - Thanks for that link!
Ned
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"They may have computers, and other weapons of mass destruction." - Janet Reno
Post Edited (WNed) : 4/17/2009 3:45:22 AM GMT
Here is someone that explains it:
http://www.seattlerobotics.org/Encoder/200009/qcam.html
The Camera uses 15pins !!!
So the proto board need to be used.
You could use less pins, if you used serial-to 8bit parallel·(74HC164) for the commands
And use the Nybble video transfer mode to read the picture.
(this mode was added if you have a non Bi-directional parrallel port)
/Reset_N··could be connected to some static signal.
And we are now down to 8pins and the demo board could be used.
But if we use the protoboard
Could also change the VGA driver·to a 6bit grayscale (64shades of gray)
rearrange the resistors to·R/2R DAC and output that single signal to all·3 three pins.
Hint: the $3f= white pixel, $3e=black pixel, and then gray shades are the rest.
Post Edited (tonyp12) : 4/17/2009 3:49:42 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"They may have computers, and other weapons of mass destruction." - Janet Reno