The Netherlands (Rotterdam)
Offline
Full Member
Karma: 1
Posts: 169
Arduino rocks!
|
 |
« on: November 17, 2008, 02:47:46 pm » |
Hello, Is is possible to use the Arduino with a camera/webcam? I've seen this item on sparkfun: http://www.sparkfun.com/commerce/product_info.php?products_id=8739Is it possible to connect this camera to the arduino-board and use the serial output to send data (image's) to a computer? I don't know if this is also possible with a webcam? Is it easier? I am pretty new into open source hardware/electronics! Thanks in advance, OpenSource
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 277
Posts: 25519
Solder is electric glue
|
 |
« Reply #1 on: November 18, 2008, 11:56:03 am » |
I think this came up some time ago but basically no you can't transfer the data along the serial link fast enough and there is not enough space in the memory to buffer the picture.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
God Member
Karma: 0
Posts: 572
|
 |
« Reply #2 on: November 18, 2008, 06:48:01 pm » |
use the serial output It doesn't output serial data - it outputs raw video - you could solder an RCA connector on it and connect it directly to your TV. There are camera modules that output "serial" data - sparkfun has a few. Typically they were designed for use in mobile phones. As grumpy_mike points out though, the arduino doesn't have enough bandwidth or storage space to capture/process/do anything with it. You need something like an FPGA board. Search sparkfun's forums for some examples - it's a fairly advanced project.
|
|
|
|
« Last Edit: November 18, 2008, 06:55:19 pm by trialex »
|
Logged
|
|
|
|
|
0
Offline
Full Member
Karma: 0
Posts: 207
Arduino rocks
|
 |
« Reply #3 on: November 19, 2008, 09:09:06 am » |
Whilst I agree with Mike about capturing / storing / sending the video in real-time, it may be possible to do something with the arduino, but not in real-time.
For example, if the application was such that the picture was stable for minutes at a time one could imagine the arduino could capture, store and transmit the picture without breaking into a sweat.
How close you can get to real-time would be interesting to work out.
Mike
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 24
Arduino rocks
|
 |
« Reply #4 on: November 19, 2008, 10:41:59 am » |
If you are already committed to sending video data to a computer, would it work for you to connect a web-cam camera to the computer directly, trim the data into the useful info and send it to the arduino? I suppose this all depends on the application, but I have created a project with the arduino with this arrangement for a real-time image tracking system.
What are you trying to do? With a bit more info we may find that it is not needed to connect a video stream directly to the arduino. salernos
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 277
Posts: 25519
Solder is electric glue
|
 |
« Reply #5 on: November 19, 2008, 11:50:50 am » |
Mike How close you can get to real-time would be interesting to work out. I did this in 1987, using a BBC micro and external hardware. The answer is that it depends on the image resolution you want to capture but I got to 3.5 seconds per frame. The text is here, I will try to look out the schematics but they might be long gone. http://www.doc.mmu.ac.uk/STAFF/A.Wiseman/Acorn/BodyBuild/BB87.htmlThis is based on a technique used by radio hams for SSTV (Slow Scan TV) which transmitted an image every 8 seconds. This was before computers. It is based on sampling a column of pixels every frame, then moving the column along the line. How far you move it determines the number of pixels in the X direction and also defines how long it will take you.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Sr. Member
Karma: 3
Posts: 318
Arduino rocks
|
 |
« Reply #6 on: November 19, 2008, 02:05:03 pm » |
You know, I wonder, if you could hack together something using a DOSonChip and a Serial camera like the C328R. Use hardware serial between the arduino and camera, software serial between the arduino and the DOC. So, you set the data packet size on the camera to the data packet size for the DOC. Tell the camera to take a picture, and then start receiving the data - for each packet you receive, you tell the DOC to write a data packet. Obviously, you couldn't reach speeds equivalent of video, but you can store photos once every second or two. This way you don't need enough memory to store a whole image (just one packet size worths). !c Edit: here are some links: http://www.electronics123.com/s.nl/it.A/id.2027/.f?sc=8&category=241http://www.sparkfun.com/commerce/product_info.php?products_id=8215
|
|
|
|
« Last Edit: November 19, 2008, 02:10:41 pm by drone »
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 16
Arduino rocks
|
 |
« Reply #7 on: November 25, 2009, 10:31:07 am » |
Grump Mike, I think a better answer is what can we do?
Surely we could read one pixel per frame of the video output. What If I wanted to have "really low res" images? I would like to computer vision on a micro controller because micro controllers can go on remote control helicopters.
If I wanted to read one pixel per frame could I construct a 10 by 10 matix of pixel compositions?
Lets figure out what we can do and go from there.
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 277
Posts: 25519
Solder is electric glue
|
 |
« Reply #8 on: November 25, 2009, 11:04:05 am » |
Surely we could read one pixel per frame of the video output. How without the hardware I described above? Schematic at:- http://farm3.static.flickr.com/2693/4055078865_827d4e8205_b.jpgIf I wanted to read one pixel per frame could I construct a 10 by 10 matix of pixel compositions? Yes you just have to modify that hardware to give you only one pixel per frame. As it stands you get one pixel per line. This means adding a Y axis counter in a similar way to the X axis one. Then using a comparator to sample the pixel when the video scan reached the selected point. Alternatively you could throw them away in software. The hardware could be modified to give as few pixels as you want in the X direction. The Y direction is tied to the scan lines of the video and must be averaged in software. I would like to computer vision on a micro controller because micro controllers can go on remote control helicopters Are you sure you would get anything useful out of such low resolution?
|
|
|
|
« Last Edit: November 25, 2009, 11:06:36 am by Grumpy_Mike »
|
Logged
|
|
|
|
|
Global Moderator
UK
Offline
Brattain Member
Karma: 138
Posts: 19067
I don't think you connected the grounds, Dave.
|
 |
« Reply #9 on: November 25, 2009, 11:10:55 am » |
Are you sure you would get anything useful out of such low resolution? You might get an idea of where the horizon is, but by the time you've worked it out, it could be too late!
|
|
|
|
|
Logged
|
Pete, it's a fool looks for logic in the chambers of the human heart.
|
|
|
|
0
Offline
Full Member
Karma: 0
Posts: 177
Arduino rocks
|
 |
« Reply #10 on: November 25, 2009, 01:08:53 pm » |
go and get a fonera 2.0! it costs 40 euros, have a ARM9 150 Mhz processor with 32 MB RAM, USB host and Linux. You can connect a USB webcam and process the images on that with OSS software. Plus you can connect Arduino through USB port or internal serial port and have all the I/O pins that makes Arduino so wonderful!
Even a C64 have more RAM than Arduino, you would have problems working on still pictures, let alone video feed
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 16
Arduino rocks
|
 |
« Reply #11 on: November 25, 2009, 01:21:47 pm » |
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 16
Arduino rocks
|
 |
« Reply #12 on: November 25, 2009, 01:26:21 pm » |
Only one Line Scan of image data, but that might actually help matters for some applications.
|
|
|
|
|
Logged
|
|
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 1
Arduino rocks
|
 |
« Reply #14 on: July 27, 2010, 09:08:21 pm » |
I'm new in the forum and saw this thread as it is related to something I'm doing.
I ordered the Parallax line scan camera and should have it shortly. I've seen some pretty neat applications people have come up with for it. Mike Davey uses it for simple OCR in his Turing machine.
I've also seen people use it to locate a candle and follow a line.
As I have an Arduino and a BS2e, so I can run the PBASIC samples and then translate them into C for the Arduino. It uses a synchronous serial interface to shift in the pixel values and in reading through their docs it looks pretty straight forward.
|
|
|
|
|
Logged
|
|
|
|
|
|