VGA( (640*480) Image size camera. position tracking

Hello All,
I am working on a project that requires me to know where a given particle has moved. For example a particle moved from location a to location b. therefore the particle is x and y coordinates from a reference location. I know we need a camera that has image size VGA (640 and 480). I want to use the arduino for the project so then my question is: Do you guys know of any affordable (under $50) camera that can do what I want and also interface with the arduino without any problems? Also do you guys have any source codes for position tracking using camera?
Thanks I would greatly appreciate any help.

Unfortunately, Arduinos and cameras don't fit together. I never read about someone who was successfull.

ogome28:
Do you guys know of any affordable (under $50) camera that can do what I want

There are plenty of cheap USB cameras with that sort of resolution.

ogome28:
and also interface with the arduino without any problems?

No. Conventional wisdom is that Arduinos simply don't have sufficient resources to process images of that size. You might conceivably find that some of the higher spec Arduinos have enough memory and processing power to deal with it, but I haven't noticed any reports of anyone managing this sort of thing - you'd be blazing the trail, and I suspect you'd find it was simply not possible.

ogome28:
Also do you guys have any source codes for position tracking using camera?

OpenCV is great for that sort of thing, but needs a PC or comparable machine to run on.

PeterH:
OpenCV is great for that sort of thing, but needs a PC or comparable machine to run on.

I see that Rasberry Pi users have been running OpenCV: Raspberry Pi + OpenCV - MitchTech | MitchTech

A Raspberry Pi is an Arm single board computer that runs Linux (or other OSes or even bare metal), so it is programmed somewhat differently than Arduinos are. Lets see: Adafruit sells a bare R-pi for $39 http://www.adafruit.com/products/998, and has a bunch of other stuff for Pi's also Raspberry Pi Products Category on Adafruit Industries.

In terms of specs, an Uno has 2 kilobytes (2048) of read/write memory, 32 kilobytes of memory for storing the programs, and runs at 16 Mhz. By comparison, the R-pi has 512 megabytes for both program and data space and runs at 700 Mhz. You need nearly a megabyte to hold one frame from a 640x480 camera, and do tracking you would need to hold at least 2 images in memory at the same time.

Thank you for your help. The information you provided was useful. Thanks.

Issue 7 of the MagPi magazine... "Arduino and RasPi get Connected"
http://www.themagpi.com/