Abstract:In order to solve the problem that it is not easy to accurately and automatically locate the hoof position of dairy cows in the process of lameness detection by machine vision technology, a method of hoof location for dairy cows was proposed. Through extraction of cow hoof image by preprocessing cow image in visible video, study on spatialtemporal characteristics of dairy cows walking, analysis of temporal and spatial variations of cows hooves in images, a spatiotemporal difference algorithm was proposed, the lowest coordinates of connected domain was computed, and the cows’ hoofs were located accurately. Through analysis of the moving sequence of cows’ hoofs, extraction and classification of homologous hoof position data, the data requirement of the lameness track detection method was met to judge the lameness of dairy cows by using the hoof position of the same side of the cow before and after the lameness track detection method. The positioning test of cattle hoof and lameness test were carried out; this method can accurately locate the cows’ hoofs, when the threshold was 20 pixels the accuracy was 73.8%, the average error of calculating the landing position of cows’ hoofs reached 11.3 pixels, the accuracy of cow lameness track detection was 93.3%, the accuracy of lameness claudication was 77.8%, the results can accurately locate the hoofs of dairy cows under natural walking conditions, and realize automatic detection of lameness in dairy cows.