Stage 2: Background subtraction

In this stage, video data from each channel passed through a set of image filters consisting of a background subtractor employing a Mixture of Gaussians (MOG) Model (KaewTraKulPong and Bowden 2002). The MOG subtractor removed the majority of the stationary pixels in the scene and further excluded objects based on the pixel intensity variations caused by their motions, which was controlled by the sensitivity threshold. It also compensated for slight camera shake and detected the shadows and the inclusion of foreground objects rather than merely the outlines. The threshold of defining the ‘stationary state’ could be adjusted in the algorithm used, allowing moving objects to be distinguished from stationary ones. Hence bees could be differentiated from other dimensionally small noise sources, for example the grain generated in low-light conditions using high camera ISO (the sensitivity of the image sensor). The entire background subtraction procedure was integrated with a Gaussian blurring filter to minimize granular background noise, together with a morphological dilation filter (defined in (Haralick et al. 1987)) to enlarge the areas of useful contours and merge neighboring pixels. This stage carried the heaviest computational load for the whole procedure and was the most time consuming. Each 5-min 2.7K 60 frames per second video required approximately 15 min to process, using a laptop featuring an Intel i7-8750H CPU and Nvidia RTX2070-MQ GPU with GPU acceleration enabled during the processing. It is worthy of note that without GPU acceleration, the processing would have required approximately 10 h. The main factors determining computational load were the number of Gaussian models in the subtractor and the number of historical video frames included.

The output video frames from this stage were a set of binarized images, shown in Fig. 5. In these images, pixels in the scene are either white (useful data) or black (data ignored). Locating bee positions using the human eye is difficult, but here the algorithm accomplished this with excellent reliability and accuracy. Information redundant to the analysis such as the beehives, buildings, trees, and other objects were almost entirely removed, with any remaining artifacts filtered out in the following stages.

View from the left camera (left) and its binarized image after the processing of background subtraction (right).

Note: The content above has been extracted from a research article, so it may not display correctly.



Q&A
Please log in to submit your questions online.
Your question will be posted on the Bio-101 website. We will send your questions to the authors of this protocol and Bio-protocol community members who are experienced with this method. you will be informed using the email address associated with your Bio-protocol account.



We use cookies on this site to enhance your user experience. By using our website, you are agreeing to allow the storage of cookies on your computer.