Hostname: page-component-788cddb947-w95db Total loading time: 0 Render date: 2024-10-14T19:20:57.310Z Has data issue: false hasContentIssue false

Vertical back movement of cows during locomotion: detecting lameness with a simple image processing technique

Published online by Cambridge University Press:  14 October 2024

Ibrahim Akin*
Affiliation:
Department of Surgery, Faculty of Veterinary Medicine, Aydin Adnan Menderes University, Isikli, Aydin, Turkey
Yilmaz Kalkan
Affiliation:
Department of Electrical and Electronics Engineering, Faculty of Engineering, Aydin Adnan Menderes University, Aydin, Turkey
Yalcin Alper Ozturan
Affiliation:
Department of Surgery, Faculty of Veterinary Medicine, Aydin Adnan Menderes University, Isikli, Aydin, Turkey
*
Corresponding author: Ibrahim Akin; Email: [email protected]
Rights & Permissions [Opens in a new window]

Abstract

This research paper proposes a simple image processing technique for automatic lameness detection in dairy cows under farm conditions. Seventy-five cows were selected from a dairy farm and visually assessed for a reference/real lameness score (RLS) as they left the milking parlor, while simultaneously being video-captured. The method employed a designated walking path and video recordings processed through image analysis to derive a new computerized automatic lameness score (ALDS) based on calculated factors from back arch posture. The proposed automatic lameness detection system was calibrated using 12 cows, and the remaining 63 were used to evaluate the diagnostic characteristics of the ALDS. The agreement and correlation between ALDS and RLS were investigated. ALDS demonstrated high diagnostic accuracy with 100% sensitivity and specificity and was found to be 100% accurate with a perfect agreement (ρc = 1) and strong correlation (r = 1, P < 0.001) for lameness detection in binary scores (lame/non-lame). Moreover, the ALDS had a strong agreement (ρc = 0.885) and was highly correlated (r = 0.840; 0.796–1.000 95% confidence interval, P < 0.001) with RLS in ordinal scores (lameness severity; LS1 to LS5). Our findings suggest that the proposed method has the potential to compete with vision-based lameness detection methods in dairy cows in farm conditions.

Type
Research Article
Copyright
Copyright © The Author(s), 2024. Published by Cambridge University Press on behalf of Hannah Dairy Research Foundation

Lameness is a common problem in dairy cattle worldwide (Green et al., Reference Green, Borkert, Monti and Tadich2010; Sjöström et al., Reference Sjöström, Fall, Blanco-Penedo, Duval, Krieger and Emanuelson2018) and impacts animal welfare and production (Bruijnis et al., Reference Bruijnis, Meijboom and Stassen2013; Herrero and Thornton, Reference Herrero and Thornton2013; Koeck et al., Reference Koeck, Loker, Miglior, Kelton, Jamrozik and Schenkel2014), as well as resulting in expensive losses for dairy farms (Liang et al., Reference Liang, Arnold, Stowe, Harmon and Bewley2017). Numerous studies have focused on understanding and reducing the detrimental effects of lameness (Bicalho and Oikonomou, Reference Bicalho and Oikonomou2013; Van Nuffel et al., Reference Van Nuffel, Zwertvaegher, Van Weyenberg, Pastell, Thorup, Bahr, Sonck and Saeys2015; Endres, Reference Endres2017; Akin and Akin, Reference Akin and Akin2018). Early detection of lameness may help to reduce these problems on farms, but further investigations are needed. The movement patterns of different anatomical regions such as the head, back, legs, feet and hooves vary between lame and non-lame cows (Flower and Weary, Reference Flower and Weary2009). Identification of these differences between lame and non-lame cows typically requires observation, which depends on the observer's level of expertise and experience. This traditional diagnosis approach is commonly referred to as the visual/traditional method. The severity of the lameness may be assessed using an observational scoring system; this may be called the real lameness score (RLS), which has been developed and validated in several studies (Sprecher et al., Reference Sprecher, Hostetler and Kaneene1997; Whay et al., Reference Whay, Main, Green and Webster2003; Thomsen et al., Reference Thomsen, Munksgaard and Tøgersen2008; Sadiq et al., Reference Sadiq, Ramanoon, Mossadeq, Mansor and Syed-Hussain2017; Beggs et al., Reference Beggs, Jongman, Hemsworth and Fisher2019). The RLS system assigns scores based on the degree of lameness observed, with scores ranging from 0 (sound) to 5 (severely lame).

The traditional method of lameness detection in cattle has two limitations. Firstly, detecting lame cows with minimum error in the earliest stage requires strict follow-up and continuity, which makes it a time-consuming and difficult process (Alsaaod et al., Reference Alsaaod, Fadul and Steiner2019). In intensive dairy cattle farming, characterized by limited labor and increasingly large herd size, this approach becomes impractical (Clay et al., Reference Clay, Garnett and Lorimer2020). Furthermore, its time-intensive nature (Borghart et al., Reference Borghart, O'Grady and Somers2021) might result in an underestimation of lame cows (Alawneh et al., Reference Alawneh, Laven and Stevenson2012; Dutton-Regester et al., Reference Dutton-Regester, Barnes, Wright and Rabiee2020). Secondly, the traditional method is subjective as lameness scores are highly dependent on the observers' competence (Telezhenko and Bergsten, Reference Telezhenko and Bergsten2005; Renn et al., Reference Renn, Onyango and Mccormick2014; Kang et al., Reference Kang, Zhang and Liu2021). This subjectivity creates a high potential for inaccuracy, especially in the early detection of lameness, which may result in delayed treatment (Leach et al., Reference Leach, Paul, Whay, Barker, Maggs and Sedgwick2013; Thomas et al., Reference Thomas, Remnant, Bollard, Burrows, Whay and Bell2016). Automatic lameness detection systems have been developed to overcome the limitations of traditional methods in dairy farms. The available automatic methods for lameness detection in dairy cattle have been classified into four main categories; kinematic gait analysis, kinetic gait analysis, indirect methods (Alsaaod et al., Reference Alsaaod, Fadul and Steiner2019) and machine learning algorithms (Dutton-Regester et al., Reference Dutton-Regester, Barnes, Wright and Rabiee2020). Kang et al. (Reference Kang, Zhang and Liu2021) proposed a different classification of automatic lameness detection methods, which includes 2D computer vision, new cameras (such as 3D and thermal infrared cameras) and other sensor technologies. The advantages and disadvantages of automatic lameness detection systems have been well described and discussed in the literature (Alsaaod et al., Reference Alsaaod, Fadul and Steiner2019; Dutton-Regester et al., Reference Dutton-Regester, Barnes, Wright and Rabiee2020; Kang et al., Reference Kang, Zhang and Liu2021). While these systems have a common goal, the methods and software used for their implementation may differ. Currently, available automatic lameness detection methods have the advantage of requiring less time and labor compared to traditional methods, and they also provide more reliable results. However, it has been indicated that these methods typically require the use of complex and expensive equipment, which may pose a barrier to adoption in certain contexts (Flower and Weary, Reference Flower and Weary2009; Alsaaod et al., Reference Alsaaod, Fadul and Steiner2019; Kang et al., Reference Kang, Zhang and Liu2021). Despite the advantages of automatic lameness detection systems, the high cost and complex operations of these systems have made them less popular among farmers compared to traditional methods. There is still a need for an automatic lameness system that is affordable, easy to use and reliable. This is an open area for further research and development (Dutton-Regester et al., Reference Dutton-Regester, Barnes, Wright and Rabiee2020).

The vertical movement observed in motion prompts us to examine the cow's back for vertical motion, given that cows generally maintain a level-back posture when walking Sprecher et al., Reference Sprecher, Hostetler and Kaneene1997). The posture of the cow's back is considered one of the most important anatomical regions for detecting lameness (Sprecher et al., Reference Sprecher, Hostetler and Kaneene1997; Blackie et al., Reference Blackie, Bleach, Amory and Scaife2013; Hoffman et al., Reference Hoffman, Moore, Vanegas and Wenz2014) and is utilized in automatic lameness detection systems (Poursaberi et al., Reference Poursaberi, Bahr, Pluk, Van Nuffel and Berckmans2010; Viazzi et al., Reference Viazzi, Bahr, Schlageter-Tello, Van Hertem, Romanini, Pluk, Halachmi, Lokhorst and Berckmans2013, Reference Viazzi, Bahr, Van Hertem, Schlageter-Tello, Romanini, Halachmi, Lokhorst and Berckmans2014; Van Hertem et al., Reference Van Hertem, Bahr, Schlageter-Tello, Viazzi, Steensels, Romanini, Lokhorst, Maltz, Halachmi and Berckmans2016). The primary objective of this study is to obtain an automatic lameness detection score (ALDS) under on-farm conditions by determining a cow's highest back point position using a simple 2D computerized automatic lameness detection system and basic image processing techniques. The second objective is to compare the ALDS obtained from the system with the RLS of the cows.

Materials and methods

Under Article 2(b) of the Regulation on Working Procedures and Principles of the Animal Experiments Ethics Committee (Official Gazette of Turkiye, 15.02.2014, no. 28914), ethical committee approval is not required for ‘Non-experimental Clinical Veterinary Medicine practices.’ The current study falls under ‘routine clinical applications for diagnosis and treatment’ and involved no direct contact with animals, so ethics committee approval was unnecessary.

Farm and animals

The study was conducted on a dairy farm in Aydin (Turkiye), with 224 lactating Holstein dairy cows. All lactating lame cows (n = 51) present in the farm were included based on the 5 point real (observational) lameness score (RLS) described by Sprecher et al. (Reference Sprecher, Hostetler and Kaneene1997) whereby lameness is scored from no lameness (LS1) to severely lame (LS5). To avoid any bias in the selection process, 24 healthy and non-lame cows (n = 24, 13.87%) out of 173 lactating healthy cows were randomly chosen using a software-generated set of random numbers (SPSS Inc.). The cows were milked twice daily in a double herringbone milking parlor and housed in concrete stalls covered with mattresses (Promat®, Ontario, Canada) on lying areas. The walking alleys in the pens were made of grooved concrete flooring, and the walkways connecting the milking barn and holding pen were covered with rubber mats. According to farm records, all cows underwent claw trimming during the dry-off period.

Visual (real) lameness score evaluation and video recordings

Cows in the study were assessed on an established 1.2 m × 4 m path with a red-painted wooden background at the milking parlor exit (online Supplementary Fig. S1). The background was placed two days before the day of lameness scoring for the adaptation of cows. Lameness scoring (RLS) and video recordings were obtained simultaneously on this path (concrete covered with rubber mats) after milking. During the lameness scoring and video recording process, cows involved in the study walked individually along the designated path. Handlers, as part of their routine on the farm, verbally encouraged cow movement after milking, without any physical contact. The first author, with more than 20 years of experience in dairy cattle lameness, scored all 75 cows according to Sprecher et al. (Reference Sprecher, Hostetler and Kaneene1997). The red background was used on the walking path to standardize the background and thereby extract the cow's back arch photographically. The Nikon D3200 camera was positioned 5 m away, 1.35 m above the ground, and recorded on-farm videos at 1080 × 1920 × 3 size and 30 fps (online Supplementary Fig. S2). The scorer was stationed beside the camera to ensure the simultaneous identification of each cow, with collar tags noted to prevent any misidentification. As cows entered the camera's field of view, the scorer assessed lameness simultaneously with the camera. Each cow was video recorded continuously until they exited the path.

Image analysis and new computerized automatic lameness score (ALDS)

The simultaneously obtained RLS and video recordings were examined and 12 cows were identified with clearly discernible RLS (three LS1, two LS2, three LS3, two LS4 and two LS5). These cows were selected based on the clarity and confidence of their lameness assessment in the recordings. These 12 cows were utilized to establish lameness score threshold values for calibrating the new ALDS, while the remaining 63 cows were used for test characteristic analysis (online Supplementary Fig. S3). Video streams were saved as AVI files and then converted into images for image processing. Thirty images were obtained per second, and the maximum height point of the cow's back in each image was found and analyzed for vertical stability (Efford, Reference Efford2000; Jimeno-Morenilla et al., Reference Jimeno-Morenilla, Pujol, Molina-Carmona, Sánchez-Romero and Pujol2014, online Supplementary Materials and methods).

Data analysis and processing were organized into three main components:

  1. i) Image pre-processing: This initial step, illustrated in Fig. 1, involves preparing the images for subsequent analysis and decision-making. The objective was to generate clear, concise black-and-white (B&W) images with minimal image errors, which would streamline subsequent calculations and decision-making processes. Images were converted to a single-channel black and white format (1080 × 1920 × 1) to facilitate easy extraction against a red background. A 5 × 5 median filter was applied to smooth the images. Further processing involved the removal of noise and pixel errors by identifying and correcting small white areas, ensuring clear black cow images.

  2. ii) Image processing: The second phase focused on extracting crucial information related to the cow's back posture. This encompassed tasks such as identifying the region of interest (back arch of cows), detecting the highest point, calculating height, determining maximum height, and recording data. These processes were pivotal for later lameness detection in the ALDS decision phase, as depicted in Figs 2 and 3. Each black cow image underwent processing to extract a clear back posture. The head and tail parts of the cow were deleted in each image to eliminate potential movement artifacts, enabling the identification of the highest point of the cow's back (Fig. 2). The black and white images were stored in 2D matrices consisting solely of 0 and 1 values, representing black and white pixels, respectively (Fig. 3). The height of the cow's back arch was determined by counting the number of black pixels in each column, with the maximum height recorded for each image. These recorded heights were stored for subsequent analysis in the decision-making step.

  3. iii) Decision: The final component encompassed various procedures, including data normalization, thresholding, data refinement, lameness score determination, scaling, threshold selection, and determining ALDS. Through these steps, an ALDS was computed for each cow, enabling the precise assessment of lameness levels. The processed images and recorded heights were used to generate a data matrix for all cows. Each cow's data was normalized to account for differences in size and recorded data length. Thresholding was applied using mean and standard deviation values to eliminate non-desired regions and create a new vector. This new vector represented the processed data after thresholding. Using the new vector, the locomotion score (LS) for each cow was determined based on a decision algorithm. The calculated lameness factor was scaled by 100 to ensure interpretability. Threshold values for the LS procedure were carefully chosen and used to assign the new computerized automatic lameness score (ALDS). This decision-making process is illustrated in Fig. 4. Further comprehensive insights are available in the online Supplementary Materials and methods.

Figure 1. Image pre-processing steps of each obtained image. (a) original image; (b) Images were trimmed to focus on the region of interest (ROI); (c) images were converted to grayscale; (d) Median filters were applied to obtain a smoother image; (e) Images were converted to black and white image; (f) Small white areas were detected and corrected in the image.

Figure 2. (a): Deletion of the head (L h) and tail parts (L t) of cows from obtained images (L c); (b): The extracted image of the cows' back (L b).

Figure 3. Data matrix for a typical black and white image including zeros and ones.

Figure 4. Variations in vertical movement of the highest point on the cow's back during walking across different lameness scores (LS1–LS5); (a) rough data, (b) after normalization, LS, Lameness score, each color represents a cow with a different lameness score.

Statistical analysis

Data were analyzed as binary (lame/non-lame) and ordinal variables (lameness scores). A 5-point confusion matrix displayed the matches between the RLS and ALDS. The MedCalc statistical software (MedCalc Software bvba, Version 20.015) was used to determine true positive, false negative, false positive, true negative, sensitivity, specificity, positive likelihood ratio, negative likelihood ratio, lameness prevalence, positive predicted value, negative predicted value and accuracy. Cohen's Kappa coefficients assessed the agreement between ALDS and RLS. Correlation analyses were conducted using SPSS 22 statistical software (SPSS Inc.) using the polychoric correlation function (Lorenzo-Seva and Ferrando, Reference Lorenzo-Seva and Ferrando2015) and significance was set at α ≤ 0.05.

Results

Lameness prevalence was 22.77% among lactating cows (51 out of 224 cows). The numbers of matched and mismatched cows between RLS and ALDS are presented in the 5-point confusion matrix as shown in Table 1. Eleven cows out of 63 observations (17.46%) were identified as mismatches in ordinal scale (distinguishing lameness degree) between RLS and ALDS (Table 1). The ALDS identified three cows as LS3, despite their RLS being LS2. Additionally, two cows were identified as LS2, and six cows were identified as LS4 by the ALDS, while their RLS was LS3.

Table 1. The confusion matrix by five-point lameness score of reference lameness score (RLS) and new computerized automatic lameness score (ALDS) of 63 cows

a The mismatched cow numbers between RLS and ALDS; LS: Lameness score.

Table 2 presents the characteristics of the ALDS in both ordinal (lameness scores) and binary (lame/non-lame) formats. In binary scale (lame/non-lame), the sensitivity and specificity of the ALDS were found to be 100%. In ordinal scale, the ALDS system demonstrated 100% accuracy in identifying non-lame (LS1) and severely lame (LS5) cows, in agreement with RLS. Lameness score 3 demonstrated the lowest sensitivity (52.94%) and accuracy (82.54%). The positive predictive value and negative predictive value were lowest in LS4 (66.67%) and LS3 (84.31%), respectively. There was a perfect agreement (ρc = 1) and strong correlation (r = 1, P < 0.001) found between the binary scale (lame/non-lame) of the ALDS and the RLS. For each lameness score, in ordinal scale, the ALDS exhibited strong agreement (ρc = 0.885) and a high correlation (r = 0.840; 95% CI 0.796–1.000; P < 0.001) with the RLS.

Table 2. Test characteristics for lameness scores and binary lameness observations (lame/not lame)

LS, lameness score; TP, true positive; FN, false negative; FP, false positive; TN, true negative; PLR, positive likelihood ratio; NLR, negative likelihood ratio; PPV, positive predicted value; NPV, negative predicted value; CI, confidence interval.

Discussion

Lameness in dairy cows is a significant issue that affects both animal welfare and the financial outcomes of the dairy industry. However, the prevalence of lameness on dairy farms is often underestimated (Fabian et al., Reference Fabian, Laven and Whay2014; Cutler et al., Reference Cutler, Rushen, de Passillé, Gibbons, Orsel, Pajor, Barkema, Solano, Pellerin, Haley and Vasseur2017), with farmers only recognizing around a quarter to a third of lame cows (Espejo et al., Reference Espejo, Endres and Salfer2006). To deal with this issue, there is a need for automatic lameness detection methods that may detect gait disruptions not visible to the human eye (Dutton-Regester et al., Reference Dutton-Regester, Barnes, Wright and Rabiee2020). Farmers expect these systems to be high-performing and low-cost (Van De Gucht et al., Reference Van De Gucht, Saeys, Van Meensel, Van Nuffel, Vangeyte and Lauwers2018), but older farmers may resist change (Dutton-Regester et al., Reference Dutton-Regester, Wright, Rabiee and Barnes2019). To be more persuasive, new automatic detection methods should be sensible, easy to understand, and respectful of old habits (Dutton-Regester et al., Reference Dutton-Regester, Wright, Rabiee and Barnes2019).

Automatic lameness detection methods (ALDM) may help improve the welfare and economic aspects of dairy farming by accurately identifying lame cows with minimal effort (Kang et al., Reference Kang, Zhang and Liu2021). These techniques rely on evaluating the cow's gait for signs of lameness, including asymmetric movement, reluctance to weight-bearing, back arch, and head bob. This is because lameness may cause an up-and-down movement that disrupts the normal gait flow. The present method analyzes the highest point of the cow's back arch during walking to detect lameness and excludes the head and tail from the analysis as their movement may not be related to lameness. ALDM with varying sensitivity and specificity has been described in the literature (Leach et al., Reference Leach, Paul, Whay, Barker, Maggs and Sedgwick2013; Thomas et al., Reference Thomas, Remnant, Bollard, Burrows, Whay and Bell2016; Dutton-Regester et al., Reference Dutton-Regester, Wright, Rabiee and Barnes2019; Alsaaod et al., Reference Alsaaod, Fadul and Steiner2019; Kang et al., Reference Kang, Zhang and Liu2021). However, there is still a need for improvements in these methods (Kang et al., Reference Kang, Zhang and Liu2021). Studies have reported a relationship between lameness and back arch curvature in both traditional and ALDM (Sprecher et al., Reference Sprecher, Hostetler and Kaneene1997; Flower et al., Reference Flower, Sanderson and Weary2005; Poursaberi et al., Reference Poursaberi, Bahr, Pluk, Van Nuffel and Berckmans2010; Poursaberi et al., Reference Poursaberi, Bahr, Pluk, Berckmans, Veermäe, Kokin and Pokalainen2011; Blackie et al., Reference Blackie, Bleach, Amory and Scaife2013; Viazzi et al., Reference Viazzi, Bahr, Schlageter-Tello, Van Hertem, Romanini, Pluk, Halachmi, Lokhorst and Berckmans2013; Hoffman et al., Reference Hoffman, Moore, Vanegas and Wenz2014; Schlageter-Tello et al., Reference Schlageter-Tello, Van Hertem, Bokkers, Viazzi, Bahr and Lokhorst2018; Jiang et al., Reference Jiang, Song, Wang and Li2022), with the highest point of the back arch being particularly relevant in methods that involve complex calculations to obtain a lameness score (Poursaberi et al., Reference Poursaberi, Bahr, Pluk, Berckmans, Veermäe, Kokin and Pokalainen2011; Viazzi et al., Reference Viazzi, Bahr, Schlageter-Tello, Van Hertem, Romanini, Pluk, Halachmi, Lokhorst and Berckmans2013). It is widely acknowledged that cows suffering from lameness exhibit a curved back. However, to the best of our knowledge, the movement of the highest point of the cow's back has not been observed during locomotion. While a cow walks, we assumed that there might be up-and-down movements of the cow's back, as it would avoid putting weight on the lame leg. In this study, our aim was to monitor the up-and-down movements of the back's highest region and evaluate these using an automated system. In other words, our emphasis lies in the following changes in back height across sequential images from video recordings. The size of the cow or the speed of the cow's walk was disregarded because the core idea of the study was not related to them. The core idea is that a higher degree of lameness leads to more back height change; not necessarily indicating lower, higher, or curved back levels than non-lame cows. This variance (flow motion of the maximum point of the cow's back) is attributed to the varying phases of the gait cycle. By identifying the maximum back height point in each gait cycle image, the presented method quantifies change and determines the ALDS. Comprehensive elucidations, including the algorithm, are presented in the Supplementary Materials and Methods. In brief, the proposed method involves identifying the highest pixel point on the cow's back arch in each image, analyzing its vertical motion across all images, and generating an automatic lameness detection score (ALDS). The method presented here may provide a straightforward and cost-effective solution for numerous farms.

Reflective body markers have been used in some studies (Flower et al., Reference Flower, Sanderson and Weary2005; Blackie et al., Reference Blackie, Bleach and Amory2011; Reference Blackie, Bleach, Amory and Scaife2013) but not in others (Poursaberi et al., Reference Poursaberi, Bahr, Pluk, Berckmans, Veermäe, Kokin and Pokalainen2011; Viazzi et al., Reference Viazzi, Bahr, Schlageter-Tello, Van Hertem, Romanini, Pluk, Halachmi, Lokhorst and Berckmans2013). However, marker attachment is not practical and continuous under on-farm conditions as they may fall off. In this study, a colored background was used instead, ensuring easy extraction of the cow image and finding the highest point of the cow's back. The camera's distance from the background, along with the background's length and the camera's height, were known, so calibration requirements were also solved. The farmer-provided, cost-effective background was a practical solution for the study's on-farm condition. Developing practical, low-cost solutions is preferred for farmers, but cost remains a main obstacle to adopting improved ALDM (Dutton-Regester et al., Reference Dutton-Regester, Wright, Rabiee and Barnes2019). All the equipment used in the study, including the background, camera, and computer, was relatively simple to obtain and inexpensive. The proposed method in this study straightforwardly utilizes image processing techniques, enabling it to be applied even to mobile phones or tablets.

Validation of ALDM may be evaluated based on several criteria, including reference standards, the number of evaluated cows, observers and the ability to detect mild variations in gait (Flower and Weary, Reference Flower and Weary2009; Alsaaod et al., Reference Alsaaod, Fadul and Steiner2019). However, many studies do not report accuracy measures (Dutton-Regester et al., Reference Dutton-Regester, Barnes, Wright and Rabiee2020). Previous studies reported different levels of accuracy for lameness detection (Viazzi et al., Reference Viazzi, Bahr, Schlageter-Tello, Van Hertem, Romanini, Pluk, Halachmi, Lokhorst and Berckmans2013; Jabbar et al., Reference Jabbar, Hansen, Smith and Smith2017; Schlageter-Tello et al., Reference Schlageter-Tello, Van Hertem, Bokkers, Viazzi, Bahr and Lokhorst2018; Jiang et al., Reference Jiang, Song, Wang and Li2022). Compared to these studies, the proposed ALDS has shown similar levels of accuracy in distinguishing between lameness score differentiation and in deciding between lame and non-lame animals. ALDM relies on a 1 to 5-level lameness score determined by an observer, but different observers may assign varying scores, highlighting the need for standardized training and guidelines to minimize observer bias (Van Nuffel et al., Reference Van Nuffel, Zwertvaegher, Van Weyenberg, Pastell, Thorup, Bahr, Sonck and Saeys2015; Dutton-Regester et al., Reference Dutton-Regester, Wright, Rabiee and Barnes2019). Transforming the score into two levels has enhanced interobserver agreement (Schlageter-Tello et al., Reference Schlageter-Tello, Bokkers, Groot Koerkamp, Van Hertem, Viazzi, Romanini, Halachmi, Bahr, Berckmans and Lokhorst2014). Thus, it is essential to establish standardized training and guidelines for observers to ensure the validity of reference scoring in evaluating lameness detection methods (Dutton-Regester et al., Reference Dutton-Regester, Wright, Rabiee and Barnes2019). In our study, the reference score was based on the Sprecher et al. (Reference Sprecher, Hostetler and Kaneene1997) 1-to-5 scale and determined by an experienced observer to ensure consistency and reliability. Early diagnosis of bovine lameness is important for animal welfare, treatment and economic considerations, making it crucial to differentiate between lame and non-lame cows correctly. While 5-level reference scoring helps evaluate lameness, an automated lameness detection system should not be limited to this approach. The system's primary objective should be to differentiate between lame and non-lame cows consistently. This would allow for prompt diagnosis and treatment of lame animals, saving time and preventing complications.

While the presented ALDS completely distinguished binary scores (between all levels of lame cows and non-lame, LS1) cows, there was a mismatch in ordinal scores (between lameness severity; LS2, LS3, LS4 and LS5) between ALDS and RLS scores for 11 cows (17.46%). The sample size of the study may be regarded as relatively small, and it may be advisable to approach the study's results with caution. Nevertheless, conducting the study in an actual on-farm setting provides valuable insights into real-world implementation. Focusing on a single farm is advantageous for eliminating walking path variations, such as ground structure and width differences. However, it's crucial to evaluate the effectiveness of this method under different farm conditions, as with all automatic lameness detection systems. Additionally, careful calibration of the system is necessary for each farm after setting up the red background and camera location.

The best lameness detection system for a dairy farm depends on various factors such as herd size, resources, and cost-benefit analysis. Traditional methods like visual observation are cost-effective but subjective, while automatic systems such as gait analysis and machine learning are objective but require expensive equipment and technical expertise. The introduced method is simple to set up and use, relying on image processing to analyze the motion flow of the cow's back in recorded videos. This approach successfully distinguished all lame cows from non-lame cows (binary scale), with acceptable accuracy in distinguishing lameness severity, offering an inexpensive and easy-to-understand alternative to more complex methods.

In conclusion, the proposed approach is highly accurate and reliable for detecting lameness, with a strong correlation with visually-based lameness detection. The study suggests that more accessible and affordable option, such as mobile applications, could improve automatic lameness detection in veterinary medicine. Further research is needed to optimize and refine the performance of this method.

Supplementary material

The supplementary material for this article can be found at https://doi.org/10.1017/S0022029924000505

Acknowledgments

The authors wish to thank for the valuable contributions of Kamil Öcal, Oğuzhan Kalyoncu, Emre Gürdal, Burak Antakyalıoğlu, and Arif Gürdal Dairy Farm. Part of this study was presented at the 19th International Symposium and 11th International Conference on Lameness in Ruminants. The datasets generated during and/or analyzed during the current study are available from the corresponding author upon reasonable request.

References

Akin, I and Akin, T (2018) Economic impact of digital dermatitis treatment on a dairy farm: an application of the break-even analysis. Ciencia Rural 48, e20170791.CrossRefGoogle Scholar
Alawneh, JI, Laven, RA and Stevenson, MA (2012) Interval between detection of lameness by locomotion scoring and treatment for lameness: a survival analysis. The Veterinary Journal 193, 622625.CrossRefGoogle ScholarPubMed
Alsaaod, M, Fadul, M and Steiner, A (2019) Automatic lameness detection in cattle. The Veterinary Journal 246, 3544.CrossRefGoogle Scholar
Beggs, DS, Jongman, EC, Hemsworth, PH and Fisher, AD (2019) Lame cows on Australian dairy farms: a comparison of farmer identified lameness and formal lameness scoring, and the position of lame cows within the milking order. Journal of Dairy Science 102, 15221529.CrossRefGoogle ScholarPubMed
Bicalho, RC and Oikonomou, G (2013) Control and prevention of lameness associated with claw lesions in dairy cows. Livestock Science 156, 96105.CrossRefGoogle Scholar
Blackie, N, Bleach, E and Amory, J (2011) Impact of lameness on gait characteristics and lying behaviour of zero grazed dairy cattle in early lactation. Applied Animal Behaviour Science 129, 6773.CrossRefGoogle Scholar
Blackie, N, Bleach, ECL, Amory, JR and Scaife, JR (2013) Associations between locomotion score and kinematic measures in dairy cows with varying hoof lesion types. Journal of Dairy Science 96, 35643572.CrossRefGoogle ScholarPubMed
Borghart, GM, O'Grady, LE and Somers, JR (2021) Prediction of lameness using automatically recorded activity, behavior and production data in post-parturient Irish dairy cows. Irish Veterinary Journal 74, 4.CrossRefGoogle ScholarPubMed
Bruijnis, MRN, Meijboom, FLB and Stassen, EN (2013) Longevity as an animal welfare issue applied to the case of foot disorders in dairy cattle. Journal of Agricultural and Environmental Ethics 26, 191205.CrossRefGoogle Scholar
Clay, N, Garnett, T and Lorimer, J (2020) Dairy intensification: drivers, impacts and alternatives. Ambio 49, 3548.CrossRefGoogle ScholarPubMed
Cutler, J, Rushen, J, de Passillé, AM, Gibbons, J, Orsel, K, Pajor, E, Barkema, HW, Solano, L, Pellerin, D, Haley, D and Vasseur, E (2017) Producer estimates of prevalence and perceived importance of lameness in dairy herds with tiestalls, freestalls, and automated milking systems. Journal of Dairy Science 100, 98719880.CrossRefGoogle ScholarPubMed
Dutton-Regester, KJ, Wright, JD, Rabiee, AR and Barnes, TS (2019) Understanding dairy farmer intentions to make improvements to their management practices of foot lesions causing lameness in dairy cows. Preventive Veterinary Medicine 171, e104767.CrossRefGoogle ScholarPubMed
Dutton-Regester, KJ, Barnes, TS, Wright, JD and Rabiee, AR (2020) Lameness in dairy cows: farmer perceptions and automated detection technology. Journal of Dairy Research 87, 6771.CrossRefGoogle ScholarPubMed
Efford, N (2000) Digital Image Processing: A Practical Introduction Using Java, Pearson Education. Massachusetts, United States: Addison Wesley.Google Scholar
Endres, MI (2017) The relationship of cow comfort and flooring to lameness disorders in dairy cattle. Veterinary Clinics of North America: Food Animal Practice 33, 227233.Google Scholar
Espejo, LA, Endres, MI and Salfer, JA (2006) Prevalence of lameness in high-producing Holstein cows housed in freestall barns in Minnesota. Journal of Dairy Science 89, 30523058.CrossRefGoogle Scholar
Fabian, J, Laven, RA and Whay, HR (2014) The prevalence of lameness on New Zealand dairy farms: a comparison of farmer estimate and locomotion scoring. The Veterinary Journal 201, 3138.CrossRefGoogle Scholar
Flower, FC and Weary, DM (2009) Gait assessment in dairy cattle. Animal: An International Journal of Animal Bioscience 3, 8795.CrossRefGoogle ScholarPubMed
Flower, FC, Sanderson, DJ and Weary, DM (2005) Hoof pathologies influence kinematic measures of dairy cow gait. Journal of Dairy Science 88, 31663173.CrossRefGoogle Scholar
Green, L, Borkert, J, Monti, G and Tadich, N (2010) Associations between lesion-specific lameness and the milk yield of 1,635 dairy cows from seven herds in the Xth region of Chile and implications for management of lame dairy cows worldwide. Animal Welfare 19, 419427.CrossRefGoogle Scholar
Herrero, M and Thornton, PK (2013) Livestock and global change: emerging issues for sustainable food systems. Proceedings of the National Academy of Sciences of the United States of America 110, 2087820881.CrossRefGoogle ScholarPubMed
Hoffman, AC, Moore, DA, Vanegas, J and Wenz, JR (2014) Association of abnormal hind-limb postures and back arch with gait abnormality in dairy cattle. Journal of Dairy Science 97, 21782185.CrossRefGoogle ScholarPubMed
Jabbar, KA, Hansen, MF, Smith, ML and Smith, LN (2017) Early and non-intrusive lameness detection in dairy cows using 3-dimensional video. Biosystems Engineering 153, 6369.CrossRefGoogle Scholar
Jiang, B, Song, H, Wang, H and Li, C (2022) Dairy cow lameness detection using a back curvature feature. Computers and Electronics in Agriculture 194, 106729.CrossRefGoogle Scholar
Jimeno-Morenilla, A, Pujol, FA, Molina-Carmona, R, Sánchez-Romero, JL and Pujol, M (2014) Trajectory-based morphological operators: a model for efficient image processing. The Scientific World Journal 2014, 801587.CrossRefGoogle Scholar
Kang, X, Zhang, XD and Liu, GA (2021) Development of computer vision-based lameness detection for dairy cows and discussion of the practical applications. Sensors 21, 753.CrossRefGoogle Scholar
Koeck, A, Loker, S, Miglior, F, Kelton, DF, Jamrozik, J and Schenkel, FS (2014) Genetic relationships of clinical mastitis, cystic ovaries, and lameness with milk yield and somatic cell score in first-lactation Canadian Holsteins. Journal of Dairy Science 97, 58065813.CrossRefGoogle ScholarPubMed
Leach, KA, Paul, ES, Whay, HR, Barker, ZE, Maggs, CM and Sedgwick, AK (2013) Reducing lameness in dairy herds – overcoming some barriers. Research in Veterinary Science 94, 820825.CrossRefGoogle Scholar
Liang, D, Arnold, LM, Stowe, CJ, Harmon, RJ and Bewley, JM (2017) Estimating US dairy clinical disease costs with a stochastic simulation model. Journal of Dairy Science 100, 14721486.CrossRefGoogle ScholarPubMed
Lorenzo-Seva, U and Ferrando, PJ (2015) POLYMAT-C: a comprehensive SPSS program for computing the polychoric correlation matrix. Behavior Research Methods 47, 884889.CrossRefGoogle ScholarPubMed
Poursaberi, A, Bahr, C, Pluk, A, Van Nuffel, A and Berckmans, D (2010) Real-time automatic lameness detection based on back posture extraction in dairy cattle: shape analysis of cow with image processing techniques. Computers and Electronics in Agriculture 74, 110119.CrossRefGoogle Scholar
Poursaberi, A, Bahr, C, Pluk, A, Berckmans, D, Veermäe, I, Kokin, E and Pokalainen, V (2011) Online lameness detection in dairy cattle using body movement pattern (BMP). In Proceeding of the 11th International Conference on Intelligent Systems Design and Applications Cordoba, Spain, pp. 732736.CrossRefGoogle Scholar
Renn, N, Onyango, J and Mccormick, W (2014) Digital infrared thermal imaging and manual lameness scoring as a means of lameness detection in cattle. Veterinary Clinical Science 2, 1623.Google Scholar
Sadiq, MB, Ramanoon, SZ, Mossadeq, WMS, Mansor, R and Syed-Hussain, SS (2017) Association between lameness and indicators of dairy cow welfare based on locomotion scoring, body and hock condition, leg hygiene and lying behavior. Animals (Basel) 7, 79.CrossRefGoogle Scholar
Schlageter-Tello, A, Bokkers, EA, Groot Koerkamp, PW, Van Hertem, T, Viazzi, S, Romanini, CE, Halachmi, I, Bahr, C, Berckmans, D and Lokhorst, K (2014) Effect of merging levels of locomotion scores for dairy cows on intra- and inter-rater reliability and agreement. Journal of Dairy Science 97, 55335542.CrossRefGoogle Scholar
Schlageter-Tello, A, Van Hertem, T, Bokkers, EAM, Viazzi, S, Bahr, C and Lokhorst, K (2018) Performance of human observers and an automatic 3-dimensional computer-vision-based locomotion scoring method to detect lameness and hoof lesions in dairy cows. Journal of Dairy Science 101, 63226335.CrossRefGoogle Scholar
Sjöström, K, Fall, N, Blanco-Penedo, I, Duval, JE, Krieger, M and Emanuelson, U (2018) Lameness prevalence and risk factors in organic dairy herds in four European countries. Livestock Science 208, 4450.CrossRefGoogle Scholar
Sprecher, DJ, Hostetler, DE and Kaneene, JB (1997) A lameness scoring system that uses posture and gait to predict dairy cattle reproductive performance. Theriogenology 47, 11791187.CrossRefGoogle Scholar
Telezhenko, E and Bergsten, C (2005) Influence of floor type on the locomotion of dairy cows. Applied Animal Behaviour Science 93, 183197.CrossRefGoogle Scholar
Thomas, HJ, Remnant, JG, Bollard, NJ, Burrows, A, Whay, HR and Bell, NJ (2016) Recovery of chronically lame dairy cows following treatment for claw horn lesions: a randomised controlled trial. Veterinary Record 178, 116.CrossRefGoogle ScholarPubMed
Thomsen, PT, Munksgaard, L and Tøgersen, FA (2008) Evaluation of a lameness scoring system for dairy cows. Journal of Dairy Science 91, 119126.CrossRefGoogle Scholar
Van De Gucht, T, Saeys, W, Van Meensel, J, Van Nuffel, A, Vangeyte, J and Lauwers, L (2018) Farm-specific economic value of automatic lameness detection systems in dairy cattle: from concepts to operational simulations. Journal of Dairy Science 101, 637648.CrossRefGoogle Scholar
Van Hertem, T, Bahr, C, Schlageter-Tello, A, Viazzi, S, Steensels, M, Romanini, CEB, Lokhorst, C, Maltz, E, Halachmi, I and Berckmans, D (2016) Lameness detection in dairy cattle: single predictor versus multivariate analysis of image-based posture processing and behaviour and performance sensing. Animal: An International Journal of Animal Bioscience 10, 15251532.CrossRefGoogle Scholar
Van Nuffel, A, Zwertvaegher, I, Van Weyenberg, S, Pastell, M, Thorup, VM, Bahr, C, Sonck, B and Saeys, W (2015) Lameness detection in dairy cows: part 2. Use of sensors to automatically register changes in locomotion or behavior. Animals 5, 861885.CrossRefGoogle Scholar
Viazzi, S, Bahr, C, Schlageter-Tello, A, Van Hertem, T, Romanini, CE, Pluk, A, Halachmi, I, Lokhorst, C and Berckmans, D (2013) Analysis of individual classification of lameness using automatic measurement of back posture in dairy cattle. Journal of Dairy Science 96, 257266.CrossRefGoogle Scholar
Viazzi, S, Bahr, C, Van Hertem, T, Schlageter-Tello, A, Romanini, CEB, Halachmi, I, Lokhorst, C and Berckmans, D (2014) Comparison of a three-dimensional and two-dimensional camera system for automated measurement of back posture in dairy cows. Computers and Electronics in Agriculture 100, 139147.CrossRefGoogle Scholar
Whay, HR, Main, DC, Green, LE and Webster, AJ (2003) Assessment of the welfare of dairy cattle using animal-based measurements: direct observations and investigation of farm records. Veterinary Record 153, 197202.CrossRefGoogle Scholar
Figure 0

Figure 1. Image pre-processing steps of each obtained image. (a) original image; (b) Images were trimmed to focus on the region of interest (ROI); (c) images were converted to grayscale; (d) Median filters were applied to obtain a smoother image; (e) Images were converted to black and white image; (f) Small white areas were detected and corrected in the image.

Figure 1

Figure 2. (a): Deletion of the head (Lh) and tail parts (Lt) of cows from obtained images (Lc); (b): The extracted image of the cows' back (Lb).

Figure 2

Figure 3. Data matrix for a typical black and white image including zeros and ones.

Figure 3

Figure 4. Variations in vertical movement of the highest point on the cow's back during walking across different lameness scores (LS1–LS5); (a) rough data, (b) after normalization, LS, Lameness score, each color represents a cow with a different lameness score.

Figure 4

Table 1. The confusion matrix by five-point lameness score of reference lameness score (RLS) and new computerized automatic lameness score (ALDS) of 63 cows

Figure 5

Table 2. Test characteristics for lameness scores and binary lameness observations (lame/not lame)

Supplementary material: File

Akin et al. supplementary material

Akin et al. supplementary material
Download Akin et al. supplementary material(File)
File 367.6 KB