Cattle body size measuring algorithms based on the complementary information of dual cameras
At present,computer vision based methods for measuring the body size of livestock and poultry mainly use image processing technique to analyze and process a single complete side image of livestock and poultry,calculate the required measurement point coordinates,and calculate the required body size data based on calibration parameters.However,such methods have strict requirements for the quality of side body images of livestock and poultry.When local side parts of livestock and poultry are missing in the images,it will make it difficult to apply such body size measurement methods.This paper proposes a visual triangle height measurement algorithm and a similar triangle length measurement algorithm based on dual camera information complementarity.Firstly,the proposed algorithm compensates for the lack of depth of field information in a single two-dimensional image by using the dual view image information of the overhead camera and the side camera to complement each other.At the same time,the YOLOV5 algorithm and convex hull corner detection algorithm are used for shoulder and tail measurement points extraction with the top view of the cow's back.The proposed algorithm obtains the relative horizontal distance between the shoulder blade of the cow and the side camera through the upper camera,and calculates the cow's height based on the principle of similar triangles,combined with the actual height of the lower coordinate of the auxiliary scale in the side camera.The proposed algorithm for measuring the straight length of similar triangles uses cow height data to calculate the depth of field corresponding to the cow's back in the directly above camera image.Then,it combines the depth of field information,the Euclidean distance between the shoulder and tail measurement points,and the spatial resolution of the above camera to the ground to calculate the straight length of the cow.It solves the measurement problem problem of body size in the case that the complete side image of cattle can not be obtained.The body size of 30 cattle is measured.Under normal circumstances,the average error of cattle height measurement is 2.25%,and the average error of body length measurement is 3.33%;the average error in height measurement of cows under relatively crowded conditions is 3.03%,and the average error in body length measurement is 3.68%.
body size measurementdual camerainformation complementaritymeasurement points extraction