Advice requested on low resolution vision system. (the nub of the question is below in THE QUESTION)
Apologies for a long post and my thanks go to anyone who takes the interest to read it. I hope I have included the important points
BACKGROUND
I have a conveyor (model railway track with tray fixed to railway carriges) with fixed sized trays and I want to identify whether there is an item on the tray and the object's approximate location and size.
Step 1. The tray arrives empty - The trays are a uniformly plain colour.
Step 2. A machine passes over it and sometimes deposits an item in the tray. The system has no knowledge of the items (size, shape, colour etc)
Step 3. The tray is inspected by camera (fixed position overhead) -This is used for sorting the trays down different routes.
I have this working with a high resolution camera attached to a pc but the process is too slow often because of other required activity on the pc.
CAMERA HARDWARE OPTION
So I am looking at the CMUcam products (alternative suggestions are welcome)
http://www.cmucam.org/projects/cmucam4/
Note: I have copied what I think is a keypart of the specification at the end of the question.
SOFTWARE TASK
The process is:
-
I have an image of the tray empty taken at step 1 which I call the BaseImage
-
During Step 2 I take images 100 ms apart (ImageA and ImageB)
2.1 if ImageA and ImageB differ significantly then I know there is activity still going on over the tray
2.2 If ImageA and ImageB are substantially the same then I know the item is stationary -
Comparing (pixel comparison) the BaseImage with either ImageA or ImageB I can identify the existence and perimeter of the object)
From a basic coding point of view this is fairly trivial.
THE QUESTIONS
- Is there a better way?
- How do I store and address the images - I am not clear whether I can process them in the way I need in the camera
- or if I use the arduino - How can I use additional storage with the arduino?
- Is there another question I should be asking?
CAMERA SPEC
VGA resolution (640x480) RGB565/YUV655 color sensor
Image processing rate of 30 frames per second
Raw image dumps over serial or to flash card
(640:320:160:80)x(480:240:120:60) image resolution
RGB565/YUV655 color space
Onboard Image Processing (QQVGA 160x120)
Track user defined color blobs in the RGB/YUV color space
Mean, median, mode and standard deviation data collection – sampled from a 40x120 resolution
Segmented (thresholded) image capture for tracking visualization (over serial or to flash card)
80x60 image resolution
Monochrome color space
Histogram generation (up to 128 Bins) – sampled from a 40x120 resolution
Arbitrary image clipping (windowing)
µSD/µSDHC flash card slot with FAT16/32 full file system driver support
w/ Directory and File manipulation