Pages: [1] 2   Go Down
Author Topic: Arduino and camera/webcam  (Read 51315 times)
0 Members and 1 Guest are viewing this topic.
The Netherlands (Rotterdam)
Offline Offline
Full Member
***
Karma: 1
Posts: 169
Arduino rocks!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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=8739

Is 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 Offline
Brattain Member
*****
Karma: 634
Posts: 34547
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
God Member
*****
Karma: 0
Posts: 572
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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 Offline
Full Member
***
Karma: 0
Posts: 207
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
Newbie
*
Karma: 0
Posts: 24
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
Brattain Member
*****
Karma: 634
Posts: 34547
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Mike
Quote
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.html

This 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 Offline
Sr. Member
****
Karma: 4
Posts: 323
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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=241
http://www.sparkfun.com/commerce/product_info.php?products_id=8215

« Last Edit: November 19, 2008, 02:10:41 pm by drone » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 16
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
Brattain Member
*****
Karma: 634
Posts: 34547
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.jpg

Quote
If 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.

Quote
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 Offline
Brattain Member
*****
Karma: 309
Posts: 26495
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

0
Offline Offline
Full Member
***
Karma: 0
Posts: 177
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
Newbie
*
Karma: 0
Posts: 16
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Look what I just found!!

http://www.parallax.com/Store/Sensors/ObjectDetection/tabid/176/CategoryID/51/List/0/Level/a/ProductID/566/Default.aspx?SortField=ProductName%2cProductName
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 16
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Only one Line Scan of image data, but that might actually help matters for some applications.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 16
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You can get a serial camera for the arduino at .7 fps.
Again... the point is: What can you do?

http://www.sparkfun.com/commerce/product_info.php?products_id=9334
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1] 2   Go Up
Jump to: