not sure if I should use cmucam
Added by Bo Bao about 1 year ago
Hi, I am doing a school project. The basic idea is to take a picture of a parking lot, and figure out which positions are still empty. Can cmucam do this image processing by itself (without arduino)? Can I use opencv on cmucam?
Thanks
BO
Replies (6)
RE: not sure if I should use cmucam - Added by Kwabena Agyeman about 1 year ago
Yes, you can do this with the CMUcam4.
Here's what you'll do:
The CMUcam4 has an image resolution of 160 by 120 pixels. Assuming you can angle the camera in a fixed position to get a good view of the parking lot - this is the most important thing you have to do. You can then use the "SW" (Set Window) feature of the CMUcam4 to toggle through the different positions in the parking lot.
The parking lot should be a different color from the color of the cars and will have a different texture. You can then use the "GH" (Get Histogram) feature to try to match the color in the current window to an expected template. Any deviation from the template means that a car is present.
You'll have to tackle other challenges beside just determining in something changed. You'll need to make it so that your system does not immediately trigger if someone walks in front of it or if there is some random noise in the system.
You'll also have to fight the lighting which will change the image histogram over time. Assuming you sample the scene a few times in specific points during the day that you can match to expected templates you should be okay.
The number of cars you want to look at may present a problem for you. If you have the ability to precisely control the position of the CMUcam4 then you could have it move around looking at different parking spaces.
The camera has a 25 degree field of view - please be aware of this.
Thanks,
RE: not sure if I should use cmucam - Added by Bo Bao about 1 year ago
Sounds cool, several more questions:
1. is xbee (zigbee module) compatible with cmucam4? or I have to cooperate with arduino?
2. is cmucam4 only for real-time image processing? Is it possible to use cmucam 4 to take pictures of the parking lot, do the image processing, send out the result data vie zigbee, and repeat this process once/min?
Thanks
Bo
RE: not sure if I should use cmucam - Added by Bo Bao about 1 year ago
Sorry, another confusion. When you explained the SW+GH method, do you mean, each time, I set the camera only to one parking spot, and use GH to figure out this specific spot is taken or not, then switch to other spot to repeat the steps? What I want is to take a bird-view picture of a, let's say , 8-spot small parking lot, ,do the processing, and send the result data (maybe a bitstring to indicate which spot is empty) out. Is it possible?
Thanks
Bo
RE: not sure if I should use cmucam - Added by Kwabena Agyeman about 1 year ago
The CMUcam4 is just a sensor. It connects to your Arduino and does real time image processing for you. You'll need to connect the zig-bee to the Arduino.
The CMUcam4 can take pictures, that's what the SD card slot is for. It can't take the picture very quickly, though, it takes about 80 seconds currently using the current 8 FPS firmware to take an image. When I release the 30 FPS firmware it will be able to take a picture in about 32 seconds. If your subject stays still during the picture taking process then you can get a 640x480 image of the subject saved to the SD card. It can take reduced resolution pictures faster. So 80x60 = 10 seconds, 160x120 = 20 seconds, 320x240 = 40 seconds.
I'm not sure if you're experienced with image processing. But, if you don't plan on using the CMucam4 for its color tracking features then you are better on not buying it. If you want a general purpose web cam then buy a computer and get open CV and go with that.
The CMUcam4 can do that task you want and make your life easier. It's not trivial to learn how to use open CV and do general purpose image processing. If you have the back ground with signal processing then go for it.
For your other question...
Yes, you tell the CMUcam4 to switch through parking spaces quickly and compare what's there. This can be done in less that 10 seconds. You're looking to see if a car is there or not... so, it's not a time sensitive task. It's perfectly fine to only look at one part of the scene at a time. You then can send the results through the zig-bee to an external computer.
Thanks,
RE: not sure if I should use cmucam - Added by julie Boyer 12 months ago
Hi Bo
I am working on a similar project, do you have any tips? D'ont really know how to start!
RE: not sure if I should use cmucam - Added by Kwabena Agyeman 12 months ago
You should email Bo by clicking on their name. You can then see their email. I don't believe anyone but me checks these forums frequently.
Thanks,
(1-6/6)