Target detection method for moving cows based on background subtraction - Kaixuan, Zhao; Dongjian, He (International Journal of Agricultural and Biological Engineering, 2015)
Target detection is the fundamental work for perceiving the behavior of cows using video analysis automatically. The videos captured in farming scenes often suffer from a complex background, which leads to difficulty in detecting the target and inconvenience in the subsequent images analysis. In this study, a method was proposed to detect the moving target accurately for cows based on background subtraction. Firstly, the bounding rectangle of cows was calculated using the frames difference method to extract the local background in frames, which were averaged and spliced into one image as the entire background image. Secondly, the size and location of a cow’s body were determined by the bounding rectangle of cows, and the body area was tracked through the video by the binary images. Thirdly, the summation coefficients on RGB channels were adjusted to improve the contrast between the target and background images. Finally, taking the body area in every frame as reference area, the performance of target detection was evaluated by the reference area to determine the optimal summation coefficients on RGB channels, and then background subtraction was processed again to finish the detection. A total of 129 videos were used to test the detection algorithm, and the accuracy of the algorithm was 88.34%, which was 24.85% higher than the classical background subtraction method. The study shows that the algorithm proposed in this study is feasible to detect the target accurately and timely when cows are walking straight in the farming environment under natural light, and this method can improve the detection performance and is an extension to the classical background subtraction method. DOI: 10.3965/j.ijabe.20150801.006 Citation: Zhao K X, He D J. Target detection method for moving cows based on background subtraction. Int J Agric & Biol Eng, 2015; 8(1): 42－49.