Colour based tracking using particle filters.
The interesting bit here is that the filter can estimate the position and number of players (objects) at the same time. So multiple players of the same team (thus sharing similar colours) can be detected and tracked. The algorithm is explained in the paper here

 


 

Real time vehicle counting and classification.
A camera is placed above the motorway and classifies all vehicles.
Usually this is tackled with a background/foreground segmentation into blobs and blobs are analysed to determine what they are (classical video surveillance approach). However, in this video the moving shadows of the trees create horrible false detections which makes the traditional approach fail (miserably 😉 ).

To avoid that, I trained a Viola-Jones detector (for real time) with front images of cars and and trucks. At the end of the cascade, another classifier classifies the front image into truck or car. Once a car/truck is detected, it needs to be track (to count it only once). I used an affine tracker based on Harris corners and LK optical flow: you detect corners, then determine where they have moved in the next image. I impose the motion model to be affine, so RANSAC helps me a lot here.
As you can see in the video, cars are detected in the shade but then move under the sun. Interestingly the tracker manages to keep tracking, although the brightness constraint, a hypothesis in the LK optical flow, is not satisfied. That’s why you see a few red arrows going crazy (that’s individual corner tracks)

 

Real time vehicle counting and classification (2d part).
A part from shadows, stop and go situations (i.e. situation where vehicles would stop for a undetermined period of time and then start again, e.g. due to traffic jam) are another nighmare of the background/foreground based approaches. Vehicles disappear in the background, appear again, etc.

This video shows the same algorithm as above in a stop and go situation (recorded on the Brussels ring – a motorway with lot’s of traffic jams…).