1. Introduction
During the ongoing automation of dairy farming, objective and reliable tools for diagnosing the condition of animals are in great demand. It is necessary to evaluate milk yield, the parameters of milk produced and the general condition of the animal [
1,
2,
3,
4,
5]. Animal productivity is influenced by many factors, such as the interaction between animals and humans [
6]. The temperature of the udder surface skin temperature is indicative for determining the condition of the animal, due to the potential influence of various diseases on it. Mastitis is one of the most common diseases that can affect the health of the udder and the quantity and quality of milk yield. The bacterial species
S. aureus is the most common causative agent of mastitis in cows in most countries with a dairy industry [
7]. Early detection of mastitis, carried out by rapid automatic monitoring, can be a way to increase the efficiency of milk production [
8]. The lack of timely treatment of mastitis due to a long detection can lead to large losses of milk, as well as a chronic decrease in cow milk yield. Timely and modern treatment of mastitis will help to avoid large losses of milk [
9,
10]. Mastitis is the most detrimental disease for the farm.
In most cases, mastitis leads to an increase of the udder surface skin temperature [
11,
12]. Measuring the temperature of local areas of the udder surface skin using spectral equipment is a fast, automated and effective way to diagnose the physiological state of the animal [
13]. The analysis is carried out within a few minutes and the results can be obtained immediately. This method is accurate in detecting abnormal animal health and reduces the amount of labor on the farm. It is also important to distinguish inflammation from diurnal fluctuations in udder surface skin temperature and changes in room temperature [
14,
15,
16]. Also, the temperature of the udder surface skin can be affected by milking [
17]. For cows with udder disease, the infrared temperature image of the udder differs significantly from that of cows with healthy udders [
18,
19]. In addition to an increase in temperature, mastitis is also characterized by an increased content of somatic cells in milk [
20]. Somatic cell count is another way to identify mastitis [
21,
22].
The usage of infrared thermography to determine the temperature thresholds of the udder surface skin is a fast and non-invasive way to immediately obtain information about the condition of the animal in the cowhold and to assume a change in milk yield [
23,
24]. The study of the temperature of the skin of the udder of cows of the Yaroslavl breed to determine the threshold values for inflammation, presumed mastitis and even its type, will make significant progress in the implementation of a rapid system for assessing the condition of animals.
The main purpose of this work was to explore the udder surface skin temperatures and changes in milk yields of cows with different health conditions, to search for a dependence between temperatures and milk yields, and to determine the threshold values of udder surface skin temperatures that indicate inflammation of the udder. The result of the study should be the development of an algorithm that allows for drawing conclusions about the state of the animal’s udder based on the thermogram and suggesting a change in milk yield.
2. Materials and Methods
2.1. Farm, Microclimate and Animals Health Status
The research was carried out in October-November 2021 in 2 stages:
Stage 1 included measuring milk yield and udder surface skin temperature in a large group of healthy animals and classifying them according to the main features (lactation stage, average single milk yield, udder surface temperature). The selection of animals for research was carried out from one room, where the total number of kept cows is 250 heads of Yaroslavl breed. In total, the farm has a total livestock of 560 forage cows. The farm is located in the Yaroslavl region (Central Russia). The climate of Yaroslavl farm (location 57.701, 40.019) is temperate continental with short, relatively warm summers, long, moderately cold winters, and distinct spring and autumn seasons. The average monthly temperature of the coldest month of the year–January—varies from −10.5 °C to −12 °C, and the warmest–July—from +17.5 °C to +18.5 °C. The total amount of precipitation is 500–600 mm per year, with 70% of it during the growing season and about 30% in winter. When selecting the studied animals, only animals of the same breed were chosen. The breed of dairy cows was “Purebred” with the presence of animals of the “4th” generation. The breed purity is 85% or more. The udder is cup-shaped, without abundant hair formation. The nipples are predominantly directly weighing, even and approximately cylindrical in shape. The shape of the teats provides the most efficient way to secure the teat cups to the cow’s teats and eliminate the falsification of research data. All of the selected animals had strong sustainable lactation activity. In order to correctly compare two animals from different groups, it is necessary to take into account that the productivity of the two compared animals in a healthy state did not differ from each other by more than 5%. The body condition of the animals (body score condition) was in the range of 3–3.5 points and their weight were 500–550 kg. They were in their 3–4th lactation and they had been on 5–6th months of lactation, and the average service period on the farm was 137 days. The diet of cows on the farm (their weight is 500–550 kg) is as follows: 34 kg of feed per day, crude protein 1.45 kg, crude fiber 4.2 kg. One-time average milk yields of 9.5 kg, milk fat content 4–4.2%, protein 3.5–3.7%, the number of somatic cells up to 160,000 for healthy animals. The way of keeping was tethered. Feeding was done from the feed table. The water temperature for drinking was 15 °C. Animals were walked once a day from 12:00 to 16:00 in the walking yard. At this time, the premises were completely ventilated and cleaned, the bedding changed, and the water in the drinking bowls replaced. Morning milking was carried out from 5:00 to 8:00 a.m. Evening milking from 17:00 to 19:00. In the morning from 3:00 to 5:00 the cowhold was ventilated and cleaned. We used Testo 400 device and the corresponding probes in a 50 cm radius around the cows for the air velocity estimation. It was established that the concentration of the gaseous medium was normal and complied with the Russian veterinary requirements. The speed of air movement near the cow did not exceed 1 m/s. During the research, the temperature inside the cowhold ranged from 2 to 6 °C. During the research, the concentration of gases did not exceed the norms. Illumination was 50–75 lux. We made tests for mastitis for 250 selected animals to confirm the status of “healthy”, then all animals underwent 4 control milkings within 2 days to determine the average single milk yield, and thermograms were made to determine udder health.
At the second stage, 30 days later, knowing that on average 4–7% of animals get mastitis of varying severity within a month, we checked the herd again. At the end of the month, 12 animals were identified by veterinarians as sick and they were retested to confirm the presence of mastitis. Confirmation of the status of subclinical mastitis was carried out by the Kenotest—manufacturer CID Lines N.V, Belgium. Confirmation of the status of clinical mastitis was carried out using Belomastin M, manufacturer of RUE “Institute of Experimental Veterinary Medicine named after A.I. S.N. Vyshelesskogo”, 220003 Republic of Belarus, Minsk, st. Briketa, 28. For all cases, the analysis and interpretation of the result of the mastitis test was performed by the local veterinarian. In the second part of the study, we created 3 categories of results of the mastitis test — “healthy”, “subclinical mastitis”, “clinical mastitis”. Twelve healthy animals with a similar milk yield (no more than 5% difference in the average single milk yield in a healthy pair condition) and in a similar stage of lactation (5–6th month) were paired to 12 animals with a confirmed disease in order to allow for a change in milk yield along the lactation curve; they also got an additional test for mastitis to confirm their health condition and control milkings were carried out.
The milking of the studied cows was carried out in milking buckets DAS-2V. A separate bucket was used for each group of cows. All milking rules were followed, such as cleaning the udder, massage, milking the first streams, etc. of the vacuum line, which consistently outputs 47 ± 1 kPa as the level of the nominal vacuum pressure in the milk line. The difference in vacuum pressure between the vacuum unit and the working vacuum did not exceed ±2.5 kPa (in accordance with GOST 28545-90). During milking, the bucket was weighed on automatic scales. The milk produced in the milking buckets was weighed on an Acom PC-100W-20H electronic scale. Milking was carried out 2 times a day.
2.2. Thermographic Images Collection
Thermographic images were obtained using a commercial infrared camera (Guide C400M) operating in the infrared range. The measurement range of the thermal imager is 20…60 °C, the measurement error in the temperature range [32…38 °C] is ± 0.4 °C. Before obtaining the image, the thermal imager was calibrated and the resulting image was compared with the standard. The area on the researcher’s neck served as a reference, with a temperature of 36.7 ± 0.2 °C. The emissivity was 0.98, which is universally accepted with early published studies. Thermographic images were obtained in accordance with
Figure 1.
The udder was photographed from three angles in order to identify all quarters of the udder. Each quarter of the udder was photographed at least 3 times in order to exclude a low-quality image. Each angle has a range (
Figure 1) of distance and a range of tilt angle. Depending on the structure of the udder and the position of the cow in the stall, the specialist places the thermal imager at a distance of 30–100 cm from the udder and teats of the animal at an angle of −15° to +15°. The choice of distance and angle of inclination of the thermal imager is based on the viewing angle of the thermal imager, the physiological dimensions of the udder, and the availability of all udder teats in the image. Thermographic images were obtained before the start of milking and after the end of milking.
The received images were processed manually using the internal software of the thermographic camera. The hottest point of the udder was automatically determined on the picture; the temperature of 5 points was additionally determined manually.
2.3. Statistical Analysis of Results
We used standard tools for processing the results of the study—Excel for primary data processing and formatting, and the Python programming language in Jupiter Notebook to build linear regression models. Statistical analysis of the results of the study included primary data processing in the form of determining the variance and standard deviation to confirm the adequacy of the results, as shown in the figures. To find the dependence between udder surface temperature and milk yield, we used linear regression and Pearson’s correlation coefficient, which allow us to identify dependence between the two data sets with high accuracy.
3. Results
After collecting thermograms of the udder surface skin temperatures of diseased animals, we did a plot of udder surface skin temperatures relative to average single milk yields to understand if there is a dependence between udder surface skin temperature and milk yield.
Figure 2 shows a graph showing the change in average single milk yields with increasing temperature, as well as the type of mastitis. Each pair of columns is a change in the milk yields of one animal in a healthy and diseased state.
Figure 3 shows the change in milk yield of healthy animals during the month in order to assess the movement along the lactation curve. Each pair of columns is a change in the performance of one animal. The results presented in the graphs (
Figure 2 and
Figure 3) were compiled on the basis of average single milk yields and average temperatures of animals in the amount of 24 animals in two groups based on the results of 4 control milkings.
We build a Linear Regression model for the entire dataset, including healthy and sick animals, to assess whether there was a dependence between udder surface skin temperature and milk yield (
Figure 4).
The resulting model showed us the presence of a dependence, but with low accuracy (Coefficient of determination = 0.591), so we decided to take a closer look at the data and differences between the studied groups of animals. We built separate models for healthy animals and animals with mastitis to assess whether there is a dependence within the groups (
Figure 5).
The result showed almost complete absence of dependence for healthy animals (R2 = 0.029) and very high dependence for diseased animals (R2 = 0.886), which became clear evidence for the hypothesis of a linear dependence between udder surface skin temperature and milk yield for animals with subclinical and clinical mastitis. We used these results as a separation criterion for the algorithm for assessing the state of the herd. On this basis, we decided to develop an algorithm that predicts the presence of a disease and changes in milk yield in diseased animals. We considered the possibility of building separate linear models for subclinical and clinical mastitis, but faced the problem of a small number of animals with clinical form of mastitis, and the high accuracy of the general model for mastitis animals excludes a strong deviation for the group with clinical mastitis.
To additionally determine the dependence between udder surface temperature and milk yield, a linear Pearson correlation coefficient was calculated. For healthy animals, Pearson’s linear correlation coefficient showed a value of 0.16, which confirms the weak dependence of milk yield and milk flow rate on udder temperature in the range [32–35.9 °C]; however, for sick animals in the range [36–39 °C], the coefficient showed a value of −0.96, confirming the extremely high correlation between the critical rise in udder surface temperature and milk yield. Therefore, we can state that changes in milk yield at temperatures from 32 to 35.9 °C are a particular feature of animals, and not a regularity. At the same time, when udder skin surface temperature reaches 36 °C, milk yields begin to decrease as temperature increases. It should be noted that an assumption is applied here, since it is impossible to determine the temperature without contact with the device used with ideal accuracy, and the error of the device is 0.4 °C; therefore, it is the temperatures obtained by the device that are indicated as the reduced range.
Based on the data obtained, we formed
Table 1 with three groups of animals, combined according to their values of average single milk yields, average udder surface skin temperatures and the veterinarian’s opinion on the severity of mastitis.
During the research we made thermograms of the udder of healthy animals and animals that were diagnosed with mastitis of various stages (subclinical, clinical). We formed three reference images allowing for quick comparison of the temperature values to aid in making a fairly accurate assumption about the state of health of the animal. Since physical impact is not a frequent occurrence in the cowhold, and temperature stress is determined and recorded immediately, their impact can be considered as not affecting the result. Several points on the udder thermogram were studied, after which the estimated area was determined. The maximum temperature of determined area is taken as the maximum temperature of the entire udder surface and can be considered an indicator of the presence of inflammation.
Figure 6 shows the generated reference image of a healthy udder, which we can use as a guide to determine the condition of the animal.
To form a reference image of the udder of an animal with a diagnosis of “subclinical mastitis”, close to average values of the “subclinical mastitis” parameters from
Table 1 were chosen. The generated image is shown in
Figure 7a, and by comparing it with the healthy image it is possible to determine with a high degree of probability the inflammation of the udder. An animal with one of the most severe cases of mastitis was selected for imaging the udder of an animal diagnosed with clinical mastitis, which led to a strong decrease in milk yield and a large number of somatic cells. If an animal is found with an udder condition as in the reference image in
Figure 7b, it is recommended to immediately call a veterinarian and send the animal to a separate room for treatment.
After processing the results, we created an algorithm that allows a quick and contactless determination for the condition of the cow’s udder. The algorithm presented in
Figure 8 will make it possible to conduct an initial analysis of the state of the animal without special veterinary knowledge. To obtain the result, it is enough to have an infrared thermograph, as well as knowledge about the basic condition of the barn; namely, whether the internal temperature in it has been exceeded and whether there has been a physical impact on the cow’s udder.
4. Discussion
We examined healthy and diseased animals to see if there is a dependence between udder surface skin temperature and milk yields for cows in general. However, the results showed that there is a dependence only for elevated temperatures (36 °C and above) and reduced milk yield of diseased animals. In a similar study, Zaninelli et al. have confirmed a significant relationship between udder surface skin temperature (USST) and classes of somatic cell count in collected milk samples using similar equipment [
25]. They confirmed the lesser accuracy of the method compared to the mastitis test, but at the same time they appreciated the huge potential of the method. The most interesting result for us was the sharp difference between the results in healthy and diseased animals. The absence of a significant dependence in healthy animals, in our opinion, indicates a large scatter of individual indicators of animal productivity. Polat et al., in a study carried out on 62 dairy cows, found a positive correlation between udder surface skin temperature values and somatic cell count [
26]. When somatic cell count is increased, the values of udder surface skin temperature showed to increase logarithmically and the best linear model that fitted this relationship reached an R
2 value of 0.73.
We concluded that for healthy animals it makes no sense to focus on the dependence between the values of the udder surface skin temperature and milk yield, and it is necessary to consider the temperature [32–35.9 °C] and milk yield [7.9–13 kg] ranges as normal values; 48 unique measurements should be enough to determine if there is a dependency. The regression model (R2 = 0.029) and Pearson’s correlation coefficient (0.16) showed the strongest scatter of values, confirming our conclusions.
A completely different situation exists for elevated temperatures in diseased animals—after exceeding a certain threshold, the udder surface skin temperature and milk yield begin to correlate strongly. Temperature ranges [36–38.3 °C] defined as subclinical mastitis and [38.4–39 °C] defined as clinical mastitis follow the general trend. It is possible to distinguish them with high accuracy either by assessing the temperature characteristic of specific animals, or by tests for mastitis. The weak point of our study is the relatively small number of animals studied with clinical mastitis, but this is offset by the fact that clinical mastitis can be detected without special tests, simply by the very different behavior of the animal. Statistical processing of data, coefficient of determination (R2 = 0.886) and Pearson’s correlation coefficient (−0.96) confirm the hypothesis about the dependence between udder surface temperature and milk yield.
In previous studies authors have investigated which area of the cow udder should be more promising for the measurement of a correct and significant udder surface skin temperature. Porcionato et al. used three areas, selected considering the udder’ height in the dorsal-ventral direction, for the measurement of the udder surface skin temperature [
27]. We formed reference images, helpful to use for making thermograms.
Comparison of these values using thermography will allow you to quickly identify cows with onset of inflammation, as well as to determine the form of mastitis with a high degree of probability. Martins et al. [
28], in a study performed on 37 ewes, found that higher udder surface skin temperature were related to high somatic cell count, in addition to lower yield. Therefore, statistical results seem to confirm that USST could be a possible index for the detection of a not healthy state of cow udder.
Figure 9 shows the result of using the algorithm for non-contact determination of the state of the animal.
5. Conclusions
In our study, we studied the udder surface skin temperature of healthy and diseased animals, created a reasonable algorithm for assessing the condition of the herd, and assessed the change in milk yield of animals with mastitis. The study made it possible to identify the range of normal cow udder surface skin temperature in [32–36 °C] and the critical range in [35.5–36.5 °C], indicating a high probability of mastitis. The basis of the algorithm is the assessment of the dependence between udder surface skin temperature and milk yield.
It has been proven that there is a strong negative relationship between the udder surface skin temperature in the range [36–39 °C] and the milk yield of diseased animals. No correlation was found between udder surface temperature in the range [32–36 °C] and milk yield of healthy animals. These values help the farmer determine how much milk to express from a sick cow.
The application of the algorithm will significantly speed up the initial inspection of the herd and will allow for collecting data on the condition of the animals in real time.