In this work, a simple car counter is designed for camera equipped parking lot. Virtual gates are manually defined on top of image. Optical flow routine is measuring car-sized flow through the gates into both directions. Car counts are maintained in time based on optical flow triggers. Also parking lot allocation is simulateously monitored by detecting cars.
Parking lot with optical flow driven gates.
When a car is parked, it is also being detected by the system (red line).
Cars in the horizon are entering the area and detected by the gate.
Here car is leaving the area from the gate in top-left corner and system detects it.