I will preface this with I am a completely new to arduino, so I am looking to see if this is even possible before delving further down this route. I am new to a research project this summer, but the people before me spent months trying to get this to work with arduino and have had little success.
Basically the project needs the arduino to capture an image using a camera which is using 640x480 pixels and is in 8 bit (We are specifically using https://www.1394store.com/eshop/product.asp?dept_id=55&pf_id=2063 but the camera is liable to change). The problem is we need to do image processing on these images with no less than about 10 images to eliminate noise from the camera. I know arduino suffers from lack of memory forcing the image processing to occur on a PC.
Our project constraints include:
We need this process to happen moderately fast, perhaps a minute or two for some 10 photos. I've been told the most successful trial of ours took a minute to transfer one image.
We also can't make the resolution too low to increase speed because the analysis of the images is the entire goal of the project, opposed to using arduino for tracking.
We need the transfer to occur wirelessly for portability issues.
I am basically wondering if a minute is reasonable for arduino to transfer an image, or is that a result of inefficient programming and it could take a couple seconds? Just for reference a pc took 50 photos with our camera in about 4 seconds. I apologize if I inadvertently left out an important detail, I just am looking to see if it is possible before trying to figure out how to actually do it.
It doesn't look feasible. Assuming you could stage the data into Arduino memory and relay it to the PC, you're still stuck with sending it over the serial port. Even running at 115200 baud, one of those raw images would take nearly 30s to transmit. That camera appears to be using firewire, which is orders of magnitude faster. What are you trying to gain by using arduino rather than connecting the camera directly to the PC?
You can do the very simple arithmetic for yourself.
Assume 8 bit monochrome, so 640 * 480 = 307 200 bytes.
Say we're sending over a serial line, so a minimum overhead of 2 bits per byte, so 3 072 000 bits.
Divide by a reasonably fast serial rate of 115200 bits per second, and we arrive at about 26.66 seconds per frame.
And that isn't taking into account overheads for synchronisation.
That's assuming that you have all the data to send. If you are also reading the data, using a serial interface, from the camera at the same rate, you'll need to double the time, or use a Mega with the camera on a different hardware serial port.
The plan was to use an arduino so that you would not need a computer to run the test. The user won't do any manual image processing, it'll all be automatic with programs. At this point I guess we're going to have to look for an alternative to an arduino because we will still need that mobility away from a computer.
Thanks for the response everyone, really appreciate it.
So what I'm gathering then is that we're basically limited by the speed of the serial line, with that speed not being affected by arduino memory issues? And more importantly that any alternative approach is still going to be limited by the serial line transfer and not by any memory shortages? That's not good news then. Thanks again.
Sorry for the really simple questions. I'm a mechanical engineering student who got stuck with the computer/electrical end of this project.
Yes. It's 115200 bits per second. Even my multi-core, over-clocked, super-fast, crazy PC I brought back from the future will still only take 115200 bits per second to mean, well, 115200 bits per second.
And more importantly that any alternative approach is still going to be limited by the serial line transfer and not by any memory shortages?
The approach is first going to be limited by the speed of serial data transfer. IF you overcome that limit, you need to have some data to transfer. Where is that data going to come from? How do you get the data from the camera? Does the entire picture need to be held in memory at one time?
Answers to these questions will determine whether the one minute frame rate is even possible.
Re-reading the OP, I notice that the transfer from remote camera capture system to PC is required to be wireless. I know my Async labs wifi shield uses SPI to communicate with the Arduino. Would this give the kind of speeds required? Of course, even if it did, it still leaves the questions of pulling images from the camera at decent speed and managing with very little memory.