My algorithm for tracking is simple:
For all the frames in the video:
Compute the background by a sliding average.
Do an image subtraction of the background image from the current image.
Convert the resultant image to a binary image and use a connected component labeling
threshold on area to reduce noise
for all the blobs on the current frame:
compute position(centroid), area, boundingbox
compare the current blob's position, area against the global blob set
if positions are the nearest and within a certain threshold, add position to the matching global blob
if the positions are not near, add to global blob set
if a blob's trajectory has shown the intended direction path in the specified area, turn on boolean flag for triggering
Results:
night time bike:
No comments:
Post a Comment