Automatic detection of lameness in dairy cattle by vision analysis of cow's gait.

The objective of this research is to develop and analyze image parameters from different camera orientations which are correlated to expert gait scores and beneficial for lameness detection. Therefore experiments were done on ILVO farm in Ghent Belgium in August/ September 2007. Cameras from different orientations recorded the postures and movements of lactating cow. A main focus is on image parameters representing hoof movements. On that score the parameter hoof step time was investigated in 10 Holstein cows. In 2 walking strides of each cow the time period between the moment that the hoof (centre point) was lifted from the ground till the moment the hoof touched the ground, was calculated. The corresponding time between hoof combinations was evaluated to obtain information about disparities in hoof movements which could be related to lameness. Preliminary results show that the differences in corresponding time are higher in cows with a high gait score compared to cows with a low gait score. The correlation coefficient was calculated between the sum of corresponding times in both strides and visual gait score given by experts. Within the 10 tested cows the calculated image parameter has a high correlation coefficient (0,84) to given gait scores. It indicates that the hoof step time is useful for automatic on-line lameness detection. A further goal is to develop an automatic lameness detection tool analyzing more lame cows and more image parameters. Introduction Lameness, an increasing animal welfare problem, has a negative impact on milk production, body condition and reproductive performance in dairy cows (Booth et al., 2004; Holzhauer et al., 2004; Vermunt, 2004). Early detection of lameness as a physical problem is important for effective treatment and ailment prevention. It may prevent the lameness from developing into a chronic situation (Clarkson et al., 1996; Zimmerman, 2001). To quantify lameness in dairy cows manual locomotion scoring systems are used widely. One of the main scoring methodologies is a five-point scale system, which may assess the quality of cow’s locomotion and posture. Scoring varies from 1 (normal walking) to 5 (extremely lame) (Sprecher et al., 1997). However, scoring lameness in dairy cows continuously in large scale farms is time-consuming and expensive (Whay and Main, 1999; Telezhenko, 2005). When assessing the quality of locomotion, many features are considered by veterinaries and ethologists as well, for instance: back posture, head bob, leg swing and track way. The correlation between the individual features and the overall locomotion score has been already evaluated by Rajkondawar et al. (2002) and O’Callaghan et al. (2003). Interesting for early lameness detection purposes seem features focusing especially on the hoof region because lameness often occurs in the hoof first. As an example, the track way overlap defined as ‘hind hoof on fore hoof position’ has a high correlation coefficient (0.75) with locomotion score and lameness (O’ Callaghan et al., 2003). When a cow put its hind hoof further forward, it gives the opportunity to move its body further and reduces the extension of the fore limbs. This can increase the efficiency of walking. Sound cows normally locate their hind hooves on the same place that the front ones have just been lifted from. Zero or positive track way overlap characterizes the good, progressive locomotion activity. And lameness causes a negative track way overlap (O’ Callaghan et al., 2003; Telezhenko et al. 2002; Whay and Main, 1999). Further information about lameness can be found in the hoof step time as well. When pain occurs in the claw the cow tries to reduce contact with the floor, which could affect the hoof step time while walking. However, there is not any available machine vision method of evaluating the locomotion score in dairy cattle by using hoof movement analysis. The objective of our study was to develop a system for continuous early detection and prediction of lameness in farms by using vision techniques. As the starting part of the project, we focused on exploring the possibility of capturing cow locomotion activity by vision and developing useful image parameter with high correlation to visual locomotion scores and beneficial for early lameness detection. Material and Methods Image Acquisition Video data were acquired on ILVO farm in Belgium in September 2007. The videos of 10 lactating Holstein cows were selected, 5 cows with a low gait score from 1,0-1,4 and 5 cows with a high gait score from 2,4-3,0. The recording was done when the cows passed a corridor walking from the barn to the pasture ground. A Canon Powershot A620 zoom camera was located 8m away and 1.5 m high above the ground. It was placed horizontally to the centre of the corridor. The video was taken when the cow passed the corridor individually and freely. The resolution of the video was 680*480 in pixels and the speed of the camera was 30 frames per second. The whole body of the cow and its movement in the system were completely filmed in the video. Figure 1. Video recording on ILVO Farm Visual Locomotion Scoring The locomotion of all 10 lactating Holstein cows was scored visually from experienced scorers. The scored method was based on the way suggested by Winckler and Willen (2001) but instead of a scoring scale from 1 to 5 a simplified scale from 1 (sound) to 3 (lame) was applied. Each expert scored the cows twice individually by checking recorded videos. The average of these 6 visual scorings per cow was used as the reference in the following analysis. Calculation of hoof step time The video streams were converted into AVI files. Afterwards 2 strides (2 steps of each leg) of each were evaluated frame by frame cow starting with the right front hoof. The hoofs were labelled manually in the image. The hoof step time (∆) is defined as the time period between the moment the hoof (centre point) was lifted from the ground till the moment the hoof touched the ground again completely while walking. The step time for one hoof (example=hoof front left) can be expressed by the following equation: ∆ Step front left = X front left touch – X front left lift (1) X front left touch: X time stamp in sec. the left f ront hoof touches the ground X front left lift: X time stamp in sec. the left fr ont hoof was lifted form the ground ∆ Step front left: hoof step time of left front hoof The equation can be applied on each of the four hoofs. The data outcome of these calculations is shown in table 1. Table 1: Calculation of hoof step time for each hoof Example Cow 12-first stride Front Left (FL) Front Right (FR) Hind Left (HL) Hind Right (HR) time stamp lift (sec.) 4,800 4,100 4,467 5,167 time stamp touch(sec.) 5,333 4,667 5,033 5,667 Hoof step time (sec.) 0,533 0,567 0,566 0,500 Cow 12 -second stride Front Left (FL) Front Right (FR) Hind Left (HL) Hind Right (HR) time stamp lift (sec.) 6,167 5,500 5,833 6,500 time stamp touch (sec.) 6,700 6,033 6,367 7,033 Hoof step time (sec.) 0,533 0,533 0,534 0,533 After calculation of the hoof step time the differences between the four hoofs in 6 different combinations were evaluated for both strides and expressed as variables a, b, c, d, e and f. The difference between the hoof combinations is named as corresponding time. ∆ a = X FL – X HR (2) X FL: X hoof step time in sec. of Front Left X HR: X hoof step time in sec. of Hind Right ∆ a: Corresponding time FLHR ∆ b = X FR – X HL (3) X FR: X hoof step time in sec. of Front Right X HL: X hoof step time in sec. of Hind Left ∆ b: Corresponding time FRHL ∆ c = X FL – X HL (4) X FL: X hoof step time in sec. of Front Left X HL: X hoof step time in sec. of Hind Left ∆ c: Corresponding time FLHL ∆ d = X FR – X HR (5) X FR: X hoof step time in sec. of Front Right X HR: X hoof step time in sec. of Hind Right ∆ d: Corresponding time FRHR ∆ e = X FL – X FR (6) X FL: X hoof step time in sec. of Front Left X FR: X hoof step time in sec. of Hind Right ∆ e: Corresponding time FLFR ∆ f = X HL – X HR (7) X HL: X hoof step time in sec. of Hind Left X HR: X hoof step time in sec. of Hind Right ∆ f: Corresponding time HLHR The differences of corresponding times of all variables were summarized first for each stride separately (see variables ∆ a ∆ f). Finally the sum of both strides per cow was generated. ∑ ∆ corr. times both strides = X first stride (∆a+ ∆b+ ∆c+ ∆d+ ∆e+ ∆f) + X second stride (∆a+ ∆b+ ∆c+ ∆d+ ∆e+ ∆f) (8) X first stride: Corresponding times in first stride X second stride: Corresponding time in second strid e ∑ ∆ corr. times both strides: Corresponding times of b oth strides The results were also tested in their relation to gait score. Therefore the Spearman's rank correlation coefficient between gait score sum of corresponding times was calculated in SPSS. These are first results showing a way to calculate disparities in gait which can be used to investigate lameness problems at different levels. Results and Discussion The hoof step time of one hoof was between 0,4 and 0,7 seconds. This can be seen in figure 1. Cow 29 hadn’t any lameness problems and was scored with 1,0 by the experts. The diagram also reveals that there is almost no difference in the hoof step time in between the four hoofs in both evaluated strides. The hoofs correspond almost perfectly in relation to time causing even locomotion in walking direction. Figure 1: Hoof step time of cow 29 with gait score 1,0 Cow 39 (Figure 2) shows diverse hoof step times among hoofs and strides. The gait of this cow was scored with 3,0. Differences between strides can be part of normal walking behaviour, depending for instance, on walking speed. The main focus on this image parameter should be on the relation of hoof step time in between the four hoofs. Considering the locomotion of animals moving on four legs (except running or gallop), at least the diagonal legs should correspond even with the same rhythm or time. In this research, it means for exa