Before contours can be found, video is converted to grayscale, background subtraction is performed and results get binarized. Circles are characterized by the aspect ratio of the individual blob.