loading
 
Counting cars
Alex from Romania  [2 posts]
13 year
I'm trying to count the number of cars entering or exiting a junction, on multiple lanes. I've tried to make a running program but I wasn't able so far to find the right solution.
My goal is to count the total number of cars, going in the same direction. I would like to write the result in a file so that I will have a corelation between "car number" and "video time".
You can see what I have done so far in the attached *.robo file.
The video can be downloaded from here:
http://www.4shared.com/video/fiMvNZYW/MVI_0947.html

How can I reach my objective?


program.robo
Anonymous 13 year
Alex,

See the attached robofile.

The basic idea is to create counting 'zones' that when a disturbance is seen then the counter is incremented. We use the movement module to determine this disturbance and then the color sample module to define the zone. We use 3 zones one for each lane.

This almost works perfectly except for a truck that counts as 2 since it is high and gets into the adjoining lane. To fix that problem the camera should be mounted directly above the traffic pointing down. Ideally the camera should be made as steady as possible too.

Also note the VBscript uses 2 thresholds based on the color sampled. If the present threshold is triggered then a car is assumed to be in the trigger zone. Once the value falls below the absent threshold the car is assumed to be gone and is reset to detect the next. You can play with these numbers a bit if you'd like.

Regardless, the attached robofile should be run against your video and will count 37 cars (actual 36).

STeven.



program.robo
Anonymous 13 year
You should also download the most recent copy of RR as we leveraged a couple of fixes to the visual anchor module.

STeven.
Alex from Romania  [2 posts] 13 year
Thank you Steven, I figured that I should download the latest version by myself. Regarding the .robo file, it works really well. At this moment i'm trying to make some minor modifications but now I'm sure you're a genius.

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index