Font Size: a A A

Research On Segmentation And Counting Algorithm Of Cohesion Sheep In Grazing Flock Based On Machine Vision

Posted on:2022-03-22Degree:MasterType:Thesis
Country:ChinaCandidate:S YangFull Text:PDF
GTID:2493306527490994Subject:Agricultural Engineering
Abstract/Summary:PDF Full Text Request
Overgrazing is one of the main causes of grassland desertification,and it is difficult for the grassland management department to calculate the actual livestock carrying capacity of the grassland.Aiming at the problems of high operating cost,difficulty and low efficiency in the traditional manual method of verifying the number of grazing sheep,this research proposes an automatic counting method of prairie sheep based on machine vision.The image of the flock is acquired by the drone equipped with an image acquisition device.After image preprocessing,the color component threshold and the maximum inter-class variance are combined to segment the sheep from the pasture background.First,the number of single sheep is counted.Adhesive sheep images after a single sheep are segmented and counted by three methods: watershed segmentation algorithm,concave point segmentation method,and template matching method,and experimental comparisons are made.The main tasks include:1.The DJI UAV Wizard 4 equipped with a camera was used to collect images of the grazing sheep on the Gegentala grassland.The collection height was 25 m,the collected image pixels were 4000*2250,and the image was calibrated.2.Perform grayscale processing on the image of the grazing sheep on the grassland with the weighted average method,use the guided filtering method to eliminate the noise in the image,and compare the R,G,B color component threshold range of the sheep’s hair color in the image with the grassland background,The threshold k obtained by the maximum between-class variance method is increased by 1.12 times and combined with the range of R,G,and B color components,the sheep image is segmented from the grassland background.3.Calculate the pixel area of a single sheep to obtain a single sheep area and body size library.According to the body size library data,count the single sheep that meet the pixel range of a single sheep in the preprocessed image and set the gray value of the image to 0,leaving only the glued sheep in the binary image.4.Aiming at the image of glued sheep,three methods: watershed segmentation algorithm,concave point segmentation method,and template matching method are used to segment and count the images,and make experimental comparisons.(1)The traditional watershed segmentation and the improved mark-based watershed segmentation algorithm were used to segment and compare the image of the glued sheep.It was found that although the improved watershed segmentation algorithm is effective,there are still errors in the segmentation of the target with more serious adhesion.The counting error is large,and the counting accuracy rate is 45.92%.(2)Using the concave point segmentation method based on vector angles to traverse the glued sheep in the foreground image,find the concave spots that exist in pairs,and then connect the two concave points to perform a good segmentation of the double glued sheep,But for sheep with too many glued sheep and crowded together,false pit detection will occur,leading to wrong segmentation and counting errors of the target,and the counting accuracy rate is 62.24%.(3)Propose a template matching algorithm.By comparing the body shape features of the sheep,an elliptical template with an axis-length ratio of 35:17 is created.Considering the characteristics of the sheep’s body size range and the walking direction of the grazing flock,the template is set to a certain Within the range,pan,rotate and zoom to traverse the whole image to match and count the number of sheep.The test results show that the recognition method based on template matching has an average accuracy of 90.17% in matching sheep in the grassland flock image.Repeated experiments on the images of the same batch of grazing sheep in the grassland can also match and count sheep more stably.To sum up,the automatic counting algorithm of prairie sheep based on template matching proposed in this thesis can realize the matching and automatic counting of sheep in the pasture within a certain error range,for the statistics and management of the number of sheep grazing in the prairie,and restore the ecological environment of the prairie.,The healthy,stable and sustainable development of animal husbandry is of practical significance.
Keywords/Search Tags:Machine vision, Sheep segmentation, Herd counting, Template matching
PDF Full Text Request
Related items