Target detection method for moving cows based on background subtraction

Zhao Kaixuan, He Dongjian

Abstract


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.

Keywords


moving cows, target detection, background subtraction, image analysis, target tracking, video analysis

Full Text:

PDF

References


Ji B, Zhu W, Liu B, Li X, Ma C. Video analysis for tachypnea of pigs based on fluctuating ridge-abdome. Transactions of the CSAE, 2011; 27(1): 191–195. (in Chinese with English abstract)

Zhu W, Pu X, Li X, Lu C. Automatic identification system of pigs with suspected case based on behavior monitoring. Transactions of the CSAE, 2010; 26(1): 188–192. (in Chinese with English abstract)

Wen C, Wang S, Zhao X, Wang M, Ma L, Liu Y. Visual dictionary for cows sow-activity recognition. Transactions of the CSAM, 2014; 45(1): 266–274. (in Chinese with English abstract)

Wang L, Wang C, Zheng K. Design and implementation of network video surveillance system for laying hens farm based on ARM. Transactions of the CSAM, 2012; 43(2): 186–191. (in Chinese with English abstract)

Porto S, Arcidiacono C, Anguzza U, Cascone G. A computer vision-based system for the automatic detection of lying behaviour of dairy cows in free-stall barns. Biosystems Engineering, 2013; 115(2): 184–194.

Mendes E D M, Carstens G E, Tedeschi L O, Pinchak W E, Friend T H. Validation of a system for monitoring feeding behavior in beef cattle. Journal of Animal Science, 2011; 89(9): 2904–2910.

Brown-Brandl T M, Eigenberg R A. Development of a livestock feeding behavior monitoring system. Transactions of the ASABE, 2011; 54(5): 1913–1920.

Tosi M V, Ferrante V, Mattiello S, Canali E, Verga M. Comparison of video and direct observation methods for measuring oral behaviour in veal calves. Italian Journal of Animal Science, 2006; 5(1): 19–27.

Pluk A, Bahr C, Poursaberi A, Maertens W, Van Nuffel A, Berckmans D. Automatic measurement of touch and release angles of the fetlock joint for lameness detection in dairy cattle using vision techniques. Journal of Dairy Science, 2012; 95(4): 1738–1748.

Viazzi S, Bahr C, Schlageter-Tello A, Van Hertem T, Romanini C E B, Pluk A, et al. Analysis of individual classification of lameness using automatic measurement of back posture in dairy cattle. Journal of Dairy Science, 2013; 96(1): 257–266.

Poursaberi A, Bahr C, Pluk A, Nuffel A V, Berckmans D. Real-time automatic lameness detection based on back posture extraction in dairy cattle: Shape analysis of cow with image processing techniques. Computer and Electronics in Agriculture. 2010; 74(1): 110–119.

Pluk A, Bahr C, Leroy T, Poursaberi A, Song X, Vranken E, et al. Evaluation of step overlap as an automatic measure in dairy cow locomotion. Transactions of the ASABE, 2010; 53(4): 1305–1312.

Song X, Leroy T, Vranken E, Maertens W. Automatic detection of lameness in dairy cattle—Vision-based trackway analysis in cow's locomotion. Computers and Electronics in Agriculture, 2008; 64(1): 39–44.

Han B, Davis L S. Density-based multifeature background subtraction with Support Vector Machine. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2012; 34(5): 1017–1023.

Barnich O, Van Droogenbroeck M. ViBe: a universal background subtraction algorithm for video sequences. IEEE Transactions on Image Processing, 2011; 20(6): 1709–1724.

Wang K Q, Xu L, Fang Y K, Li J W. One-against-all frame differences based hand detection for human and mobile interaction. Neurocomputing, 2013; 120(SI): 185–191.

Yin H P, Chai Y, Yang S X, Yang X Y. Fast-moving target tracking based on mean shift and frame-difference methods. Journal of Systems Engineering and Electronics, 2011; 22(4): 587–592.

Brox T, Malik J. Large displacement optical flow: descriptor matching in variational motion estimation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2011; 33(3): 500–513.

Xu L, Jia J Y, Matsushita Y. Motion detail preserving optical flow estimation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2012; 34(9): 1744–1757.

Li S X, Chang H X, Zhu C F. Adaptive pyramid mean shift for global real-time visual tracking. Image and Vision Computing. 2010; 28(3): 424–437.

Rathi Y, Vaswani N, Tannenbaum A, Yezzi A. Tracking deforming objects using particle filtering for geometric active contours. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2007; 29(8): 1470–1475.

Song H B, Zhang W Y, Zhang X X, Zou R Z. Shadow removal method of apples based on fuzzy set theory. Transactions of the CSAE, 2014; 30(3): 135–141. (in Chinese with English abstract)




Copyright (c)



2023-2026 Copyright IJABE Editing and Publishing Office