| The growth and development status of cattle,as well as the selection and breeding of cattle are judged by the size data of cattle.However,in the traditional measurement methods,most of the measurements of the body size data of cattle are made by workers using the traditional tools to make contact measurements.This kind of measurement method,the workload is big,the task amount is extremely heavy.In recent years,with the development of machine vision technology,more and more researchers apply machine vision technology to the measurement of livestock.Background difference method and threshold segmentation method are used in most researches on contour extraction of livestock.However,in the actual environment,these methods are often affected by the color and light of the livestock,resulting in the inability to accurately extract the contour curve of the target livestock.Therefore,a single color image cannot accurately obtain the spatial contour curve of the bovine body in the real environment.In order to solve the problem of imprecision segmentation caused by the interference of color and light in the above mentioned livestock,this paper adopts the target segmentation method based on deep learning,and designs a non-contact measuring system of cattle’s body size.First,the experimental measurement platform was built,the measurement area was divided,and the calibration parameters of the measurement area were calculated for subsequent scale calculation.Then,the cattle’s original image was collected,and the trained Mask r-cnn target segmentation model was used to process the acquired original color image and generate the Mask image with Mask information,so as to accurately extract the closed contour curve of the cattle.In view of the obtained contour curve,the front and back foot points are determined by progressive scanning from left to right.Next,the contour curve is divided into A,B and C regions by the partition method,and the feature region and the measurement point of body size are respectively searched in the three regions.In addition,in the feature point extraction,since the contour edge is composed of countless discrete points,in order to overcome the discreteness of the digitalimage,the u-chord length curvature method is used to calculate the curvature in the feature area.Finally,the calibrated parameters and the calculated measurement points are used to calculate the scale.This paper proposes a measuring method based on Mask R-CNN.This method is based on the Ubuntu system,using Pytorch deep learning framework,and using PyQt5.The image acquisition module,Mask R-CNN segmentation module,contour extraction module,and calculation of body measurement points Combining the module with the body measurement data module,the software interface of the cattle body measurement system is designed,and the non-contact body measurement of the cattle body is realized.Through experimental verification,the relative error of body height measured by this system is less than 5.15%,the relative error of body length is 6.74%,and the relative error of body oblique length does not exceed 8.09%. |