Abstract:Lameness, as the second major disease affecting cows, has exerted great influence on the economic benefits and welfare rearing of the pasture. The accurate extraction of gait features is the key to recognizing lameness, while the precise segmentation of gait is the prerequisite. In view of the shortcomings in the current artificial segmentation of cow gait, an automatic method of cow gait segmentation was proposed based on the improved dynamic time warping algorithm. In the pasture, 21 sound cows and 9 lame cows were selected. The acceleration signals of their hind legs were collected by three-dimensional accelerometers through a measuring channel with a length of 23m. The gold standard data were obtained by shooting walking videos with a high-speed camera. The algorithm segmented a single stride from a continuous gait sequence, extracted the gait feature values, and established a model of recognizing cow lameness using the method of logical regression. The experimental results showed that the segmentation of gait precision, sensitivity and accuracy were 89.53%, 95.51% and 87.49%, respectively. Compared with the values obtained by the conventional dynamic time warping algorithm, the average precision, sensitivity and accuracy of gait segmentation obtained by this algorithm were improved by 5.31, 4.48 and 8.43 percentage points, respectively. Besides, there were 1.75 and 3.13 percentage points of increase compared with the autocorrelation function method and peak detection method, and the total accuracy reached 90.57%. The total recognition rate of the lameness recognition model arrived at 83.44%, 81.72%, 86.15%, 86.81%, 89.45% and 85.71%, respectively, taking the stance time, stride length, average intensity, signal amplitude area, average acceleration in the forward direction and movement variation as independent variables. Hopefully, the results can provide technical support for gait segmentation and lameness recognition.