Extraction Algorithms and Applications of Pig Body Size Measurement Points Based on Computer Vision

李卓,刘同海,付为森,滕光辉
DOI: https://doi.org/10.3969/j.issn.1002-6819.2013.02.023
2013-01-01
Abstract:It is an essential task to obtain the pig’s body size and its weight without stress in the animal welfare farming. In this paper, a new method is proposed which can be applied to calculate pig body width and body length with no stress, and further to estimate the pig body weight. First, an on-line camera as the image acquisition device was used to acquire the back image and the background image of the 120 days old Landrace sow in a local pig farm. The acquired image size is 704 pixels ×576 pixels in the pixel coordinate system. In light of the site conditions of pig house, the background information is removed via arithmetic operation based on gray process of the pig body image and the background image. And image noise is removed by the median filtering method, and detailed porcine somatic information is obtained. Then, the pig body image’s segmentation threshold is determined using dynamic threshold method, and the binary image is acquired; After calculating the number and the area of connected regions, the other pigs which may exist in the imaging area get removed via maximum ordinate-area method. Finally, the individual pig contour is extracted through the Canny edge detection algorithm. Because of the interference of the pig head and tail regions with the body size extraction, the identification algorithm aiming at removing head and tail regions in the image is designed, and the data envelopment analysis is used in the algorithm, based on the distance between the body contour and the envelope line, the pig body contour with the head and tail removed is finally obtained. After that, with account of the traditional measuring positions of individual body size, the extraction algorithm for extracting the individual body size with a certain complex curvature is further designed by obtaining the coordinate values of measuring points. The algorithm stability and the extraction accuracy of the verification were tested using 9 different pig images. The result shows that the identification accuracy of pig body size measuring points is 100%, the detection accuracy of the pig body length is high, and the average relative error of the detection values and measured values is 0.92%; The average relative error of abdominal body width is 1.39%, and the average relative errors of shoulder width and hip width are 2.75% and 3.03%, respectively. Overall, the algorithm has a better detection effect for pig body size, and it is stable with better robustness.
What problem does this paper attempt to address?