首页 | 本学科首页   官方微博 | 高级检索  
     检索      

基于头尾定位的群养猪运动轨迹追踪
引用本文:高云,郁厚安,雷明刚,黎煊,郭旭,刁亚萍.基于头尾定位的群养猪运动轨迹追踪[J].农业工程学报,2017,33(2):220-226.
作者姓名:高云  郁厚安  雷明刚  黎煊  郭旭  刁亚萍
作者单位:1. 华中农业大学工学院,武汉 430070; 生猪健康养殖协同创新中心,武汉 430070;2. 华中农业大学工学院,武汉,430070;3. 生猪健康养殖协同创新中心,武汉 430070; 华中农业大学动物科技学院动物医学院,武汉 430070
基金项目:十三五国家重点研发计划项目(2016YFD0500506);湖北省自然科学基金(2014CFB317);现代农业技术体系(CARS-36)
摘    要:猪的头/尾位置直观反映了猪的进食、饮水、争斗、追逐等日常活动。从群养猪俯视视频中有效分割粘连的猪个体,找出猪的头/尾部,并以头/尾坐标实现较精准的运动轨迹追踪有着较大的难度。该研究采用改进分水岭分割算法分割视频图像帧中的粘连猪个体;对分割后的猪体提取头/尾轮廓,分别用类Hough聚类和圆度识别算法识别每头猪的头/尾,用运动趋势算法修正头/尾识别的误差,生成以头/尾部为定位坐标的运动轨迹。运算结果和人工标记对比证明类Hough聚类和圆度识别算法的头尾识别正确率分别为71.79%和79.67%;经过运动趋势修正后,以头部为定位坐标生成的运动轨迹与人工标记生成运动轨迹吻合良好;对比头/尾轨迹和质心轨迹可以发现,头/尾轨迹能够更多获取猪个体和群体活动、运动信息。该研究对于实现自动记录和分析猪个体和群体的活动行为提供新的思路和方法。

关 键 词:算法  图像识别  图像分割  猪群  猪个体  头/尾识别  改进分水岭  运动轨迹
收稿时间:2016/6/15 0:00:00
修稿时间:2016/11/20 0:00:00

Trajectory tracking for group housed pigs based on locations of head/tail
Gao Yun,Yu Hou''an,Lei Minggang,Li Xuan,Guo Xu and Diao Yaping.Trajectory tracking for group housed pigs based on locations of head/tail[J].Transactions of the Chinese Society of Agricultural Engineering,2017,33(2):220-226.
Authors:Gao Yun  Yu Hou'an  Lei Minggang  Li Xuan  Guo Xu and Diao Yaping
Institution:1. College of Engineering, Huazhong Agricultural University, Wuhan 430070, China; 2. The Cooperative Innovation Center for Sustainable Pig Production, Wuhan 430070, China;,1. College of Engineering, Huazhong Agricultural University, Wuhan 430070, China;,2. The Cooperative Innovation Center for Sustainable Pig Production, Wuhan 430070, China; 3. College of Animal Science and Technology, College of Animal Medicine, Huazhong Agricultural University, Wuhan 430070, China;,1. College of Engineering, Huazhong Agricultural University, Wuhan 430070, China; 2. The Cooperative Innovation Center for Sustainable Pig Production, Wuhan 430070, China;,1. College of Engineering, Huazhong Agricultural University, Wuhan 430070, China; and 1. College of Engineering, Huazhong Agricultural University, Wuhan 430070, China;
Abstract:Abstract: Observing animal''s individual and social behaviors is the most effective way to assess animal welfare and healthy. Automated trajectory tracking based on head/tail locations is supposed to be extremely helpful for the realization of pig behavior recognition, especially for group housed pigs in the commercial pig facility. The methods of trajectory tracking for group housed pigs based on head/tail location were described in this paper. The video of group housed nurseries was taken in a commercial pig breeding farm of Hubei Jinlin Original Breeding Swine Co. Ltd. on January 12th, 2016. A high resolution camera (Woshida CL03) was used to record 15 min video. Afterwards, image frames were extracted from the original video in a one-second time interval. Image frames were processed in a computer (configured with IntelCore i7-4790 CPU (central processing unit), 3.6 GHz, 8 G memory) with MATLAB software platform. The image processing for each image frame included 4 steps: background removal, pigs division, head/tail identification and trajectory tracking modification. The background removal was based on the RGB (red, green, blue) color space, from which a vector of RGB mean values of the pig''s body was calculated. If the Euclidean distance between the RGB values of one pixel and the RGB mean values vector was less than a small threshold of 100, the pixel was involved in a pig body area and set as 1. Otherwise, it was outside any pig body area and set as 0. When all pixels of the image frame were scanned and calculated by this method, a binary image was acquired. The white area referred to pig''s body area, while the black area referred to the background. After that, the morphology erosion and expansion were utilized before the watershed segmentation algorithm to improve the dividing effect for the pigs with adhesion. Pigs division was implemented on the binary images with the improved watershed segmentation algorithm. To discriminate each pig in each image frame, a video tracking and marking method was necessary to be implemented in the video. After being manually marked with the identify number in the first frame, each pig had a unique number and was labelled automatically throughout the video. Abstracting image frames from the video with a very short time interval (1 s), the distance of 2 centroids of the identical pig between 2 continuous image frames would be sufficiently small. Therefore, the video tracking was to find the pig with the closest distance in the next image frame and mark it with the same identify number of the current pig until all the pigs were marked. After each pig was marked throughout the video, using the head/tail location as the coordinates of the pig, the trajectory of each pig in herd could be tracked by the trajectory calculation. Extracting the outline of each pig in frames, the head and the tail outlines were divided from the whole outline, after a sixth of whole outline distance was moved along the outline in 2 opposite directions from the 2 intersection points of the outline and short axis of the minimum bounding rectangle. After the head/tail outline curve was gained from each pig outline, 2 recognition algorithms, the analogous Hough clustering recognition algorithm and the roundness recognition algorithm, were employed to identify the head/tail of each pig. Thus the location of the pig''s head/tail could be spotted by locating the centroid of the heat/tail curve. Then the trajectory tracking of the pigs was calculated based on the location of head/tail, and corrected by the motion trends of pigs. Experiment showed that the background was successfully removed from each image frame using the Euclidean distance of RGB values between the pixels and the mean value vector. The improved watershed segmentation algorithm has been verified as an effective tool to divide the pigs with adhesion. The identify number of each pig was tracked from the first frame to the end. The average recognition rate of analogous Hough clustering algorithm was 71.79% for the identification of pig''s heads/tails, while the roundness algorithm was 79.67%, which was less sensitive to the distortion of head outline curve. If not including the pigs outside the camera range, the recognition rates would be up to 75% and 85.7% respectively. The roundness algorithm shows an obvious advantage in comparison. The modified trajectory of each pig shows a high agreement with the manually labelled trajectory. More understanding for pigs'' behaviors can be acquired from the trajectory of head/tail locations. This trajectory tracking method provides a good reference for further research of behavior recognition.
Keywords:algorithms  image recognition  image segmentation  pig herd  individual pig  identification of head/tail  improved watershed segmentation  trajectory tracking
本文献已被 CNKI 万方数据 等数据库收录!
点击此处可从《农业工程学报》浏览原始摘要信息
点击此处可从《农业工程学报》下载免费的PDF全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号