Skip to main content

Body weight estimation of yak based on cloud edge computing

Abstract

In stock farming, the body size parameters and weight of yaks can reasonably reflect the growth and development characteristics, production performance and genetic characteristics of yaks. However, it is difficult for herders to measure the body size and weight of yaks by traditional manual methods. Fortunately, with the development of edge computing, herders can use mobile devices to estimate the yak’s body size and weight. The purpose of this paper is to provide a machine vision-based yak weight estimation method for the edge equipment and establish a yak estimation comprehensive display system based on the user’s use of the edge equipment in order to maximize the convenience of herdsmen’s work. In our method, a set of yak image foreground extraction and measurement point recognition algorithm suitable for edge equipment were developed to obtain yak’s measurement point recognition image, and the ratio between body sizes was transmitted to the cloud server. Then, the body size and weight of yaks were estimated using the data mining method, and the body size estimation data were constantly displayed in the yak estimation comprehensive display system. Twenty-five yaks in different age groups were randomly selected from the herd to perform experiments. The experimental results show that the foreground extraction method can obtain segmentation image with good boundary, and the yak measurement point recognition algorithm has good accuracy and stability. The average error between the estimated values and the actual measured values of body height, oblique length, chest depth, cross height and body weight is 1.95%, 3.11%, 4.91%, 3.35% and 7.79%, respectively. Compared with the traditional manual measurement method, the use of mobile end to estimate the body size and weight of yaks can improve the measurement efficiency, facilitate the herdsmen to breed yaks, reduce the stimulation of manual measurement on yaks and lay a solid foundation for the fine breeding of yaks in Sanjiangyuan region.

Introduction

Body dimensions and weight of the livestock not only reflect their body outlines, structures and physical conditions, but also embody their physiological status, productivity, disease resistance and adaptation to external living environment [1]. Moreover, they have been also extensively applied in evaluation, reproduction and sales areas. In recent decades, the measurement technology of body size and body weight for livestock plays a key role in improving the production of animal husbandry [2]. In addition to directly revealing production traits of the livestock, the accurate estimation for their body dimensions and weight is even a key basis for making breeding plans for domestic animals.

Globally, animal size has been widely investigated and various analytical methods have been adopted to appraise animal morphology and traits. They provide guidance for animal breed selection and animal production [3,4,5]. However, traditional measuring methods require high workload and raise stricter requirements for standing postures of animal. Besides, according to the requirements of these methods, the direct contact will cause great harm to animals, which may further lead to the decline of animal productivity, increase in disease and even death. All these severely affect growth and development of individual animals and the herd on one hand; it is also much more likely to spread zoonotic diseases on the other hand.

In this regard, it is urgent to propose easy-to-handle, lightweight methods to precisely estimate the weight of the livestock. Thankfully, this is made to be true with the proliferation of mobile and edge computing [6,7,8]. With these infrastructures and techniques, it is feasible to collect and process a huge amount of data and accomplish complex tasks of various kinds (e.g., manufacturing production management [9], information/event prediction [10, 11], paper recordation [12] and social networking analysis [13]). Similar techniques can also be applied in livelihoods areas. For example, a method that was proposed based on optical and acoustic devices (ultrasonic waves) by John can identify skeletal structure characteristics of animals [14], and X-ray imaging was utilized by Cloete to determine bone sizes [15]. Nevertheless, ultrasonic imaging is still incapable of realizing non-contact measurement, and the X-ray imaging has defects of cytoclasis and raising more rigorous requirements for environment. For this reason, body measurement for animals is fulfilled by Doschlwilson et al. depending on principles of optics [16]; by virtue of a machine-vision-based method, Zwertvaeg-her et al. succeeded in measuring lengths of different body parts of a swine [17], and Wang et al. used a Xtion sensor to analyze and measure swine morphology [18]. For the past few years, computer-assisted image acquisition and processing have been extensively applied in animal husbandry to obtain body measurement parameters of animals. Subsequently, such parameters are utilized to estimate their weight. This has become one of the most popular methods in this field. A stereo binocular visual system is established by Paolo et al. to estimate sizes and weight of live goats [19]. On the basis of an image processing technique, Khojasteh-key evaluates body sizes of newborn lambs and figures out influence of body sizes on their genetic characters [20]. With the development of deep learning, it is possible to deal with various image problems by deep learning. Jin Liu [21] outlines the MRI image processing and analysis methods based on deep learning, but it is difficult to collect yak’s data, which leads to the inability to obtain a large number of yak pictures. Therefore, this paper uses the traditional algorithm to calculate yak’s weight. With the rapid development of economic progress in Western China, yak breeding industry is gradually developed from a situation where plot-based culture and a free-ranging pattern coexist to large-scale breeding. In this context, differences in breeds, ages, fetal times and lactation stages among the individuals should be taken into account for the latter. With the increase in the cost of artificial, feed and fecal treatment and the increasingly prominent problem of dairy safety, large-scale breeding has put forward more stringent requirements for the feeding and management mode. Hence, precision breeding supported by information technology is inevitable in the process of modern farming development [22]. Furthermore, information perception and analysis for individual animals is the key to precision breeding. By accurately obtaining information (e.g., respiratory conditions, postures and movement) of individual animals in a real-time manner, their growth, health status and gestation can be objectively evaluated. In this way, relevant prevention and treatment measures such as human intervention can be taken timely, so that potential losses may be minimized.

Growth of the yak is basic biological characteristics of this breed and serves as an important embodiment to their economic values [23]. Considering that the yak production is completed in a highland ecosystem with poor stability, their growth is featured with distinct spatial and temporal heterogeneity. Relevant investigations assist us in minimizing errors of body measurement parameters that are obtained and enhancing sensitivity to weight parameter acquisition, so as to make it convenient for us to diagnose and prevent health problems during livestock breeding.

As mammals living at the highest elevation in the world, yaks are mainly distributed along the Himalayas and on the Qinghai-Tibet Plateau that is the alpine region at an altitude ranging from 3000 to 5000 m. Under the circumstance that yaks are rather wild and free-ranging in most cases, it is very difficult to obtain their body measurement parameters and weight by common methods. Due to the above reasons, it is too difficult to estimate the body weight of yak using traditional body weight measurement methods or three-dimensional modeling. Fortunately, with the rapid development of portable mobile devices in recent years, their capabilities of computing processing are getting higher and higher. We can use mobile devices to take photographs for yaks at a distance, combining with edge computing mode. It is extremely convenient for herders to breed yak, the above problems can be solved as well. In a word, such an algorithm can be effectively applied in an actual breeding environment to gain body dimensions and weight of yaks in conditions of reducing human interventions and less contact with them.

Materials and methods

Body dimension and weight measuring methods for yaks

Regarding animal husbandry research and production, certain characteristics of the research object are frequently described by an index [24]. The health and genetic characteristics are evaluated by measuring weight and body of yaks. Body dimension of a yak is commonly divided into six aspects, including standing height, body length, chest depth, chest circumference and hipcross height. For details, please see Table 1 and Fig. 1d Images with Measuring Points Labeled .

Table 1 Common morphological parameters of yaks
Fig. 1
figure1

Yak images

Before body measurement parameters are evaluated, feeding should be ceased 12 h earlier to ensure that the yaks are in a fasting state. For each yak, the parameters should be measured for three times and an average value was worked out and used as its parameter. In this way, errors in body dimensions and weight can be prevented [25]. Moreover, a Biltmore stick was selected to measure standing height, body length, chest depth and hipcross height of the yaks, and they were weighed by an electronic scale manufactured in Shanghai Yaohua. As for the scale with 1.5 m \(\times\) 2 m in its size, it has a weighing range of 0–3 t and a weighing error of \(\pm 500\) g (Table 2).

Table 2 Common morphological parameters of yaks

Data acquisition

Chindu County in Yushu Tibetan Autonomous Prefecture, Qinghai Province, is selected as the research area. Located in the hinterland of Qinghai-Tibet Plateau, Yushu is in southwestern Qinghai, nowadays, its grassland is as large as \(0.14 \times 10^{8}\,{\hbox {hm}}^{2}\), including \(0.11 \times 108\,{\hbox { hm}}^{2}\) of those available [26].

As highly sociable animals, individual yaks that are familiar with each other yearn for forming groups [27]. Among all 25 tested yaks randomly selected, 9 are 1.5 years old (3 males weighed to be \(92 \pm 7\) kg and 6 females \(95 \pm 6\) kg). Besides, there are also eight 2.5-year-old yaks that are all male and weighed to be \(160 \pm 50\) kg. As for another 8 adult yaks, they are all female with weight at \(195 \pm 30\) kg. A herdsman who was familiar with the corresponding yak was asked to stabilize it by holding its horns, so that another people had the chance to photograph it 2–3 m away from it. During photographing, the yak should be in a posture vertical to the center line of the camera to the greatest extent; moreover, the camera was placed in a position that is 2/3 of the yak’s standing height. (For each yak, at least 3 photographs containing the stances shown in Table 3 must be taken.) With regard to photographic pictures, they are presented in Fig. 1b Photographic Images. In the course of photographing, extreme cases were encountered among 3 yaks who behaved badly, including a 2.5-year-old male yak (body arching) and two 1.5-year-old female yaks who leaned backward and formed a rather large included angle with the plane where the camera was placed. In a word, 25 yaks at different age groups were randomly selected from a yak herd to acquire their images by above mentioned means. Then, their weight and body dimensions were measured manually and noted down as well. After the completion of the above experiment, data of weight and body dimensions were further collected for 300 yaks in various age groups by means of manual measurement.

Table 3 Definitions of yaks’ 3 stances

According to the existing public literature, important indexes that reflect growth characters, productivity and genetic characters of yaks consist of their standing height, body length, chest depth, hipcross height and weight. In this study, a person took the responsibility to hold yak horns and ensure correct postures of the yak, while another person measured and recorded relevant parameters. Each parameter was measured three times to give an average value. Subsequently, the yak was pulled onto an electronic scale for weighing. After that, it was pulled again in a photographing area where its image was obtained in a condition of normal stance. In the end, relevant images were processed by a foreground extraction algorithm, a contour extraction algorithm and a measuring point identification algorithm to acquire their body dimensions and weight data.

Data processing and testing on mobile

Foreground extraction for images

A vast majority of yaks have black hairs. However, the movement areas of a farm are usually covered with soil. Consequently, it is much likely to see their hair color similar to that of the background. In this consideration, yaks should be herded to a place where its ground color is greatly different from their hair color. Hairs of a yak are coarse, look like petals and are divided into strands [28], which result in irregular and fuzzy boundaries found during gray analysis on images. To preserve image boundaries better and minimize the complexity of further processing, this article obtains the foreground images of yak by combining simple linear iterative clustering (SLIC, as shown in Fig. 2) with a Sobel edge detection.

Before using the Sobel operator and SLIC algorithm to obtain the foreground image of yak, the image preprocessing should be performed at first. We changed the Yak’s head orientation to the unified left, so as to identify the measurement points of the body and size. In order to improve the speed of image processing, the image can be compressed, and then histogram homogenization [29] and average filtering [30] make the contrast of the image more balanced, which is more conducive to the extraction of yak’s preprocessing image. The image initialization algorithm of yak is shown in Algorithm 1.

Fig. 2
figure2

SLIC flowchart

figurea
$$\begin{aligned} D= & {} \sqrt{\left( \frac{d_{c}}{N_{c}} \right) ^2+\left( \frac{d_{s}}{N_{s}} \right) ^2} \end{aligned}$$
(1)
$$\begin{aligned} d_{c}= & {} \sqrt{\left( L_{j}-L_{i}\right) ^2+\left( A_{j}-A_{i} \right) ^2+\left( B_{j}-B_{i} \right) ^2} \end{aligned}$$
(2)
$$\begin{aligned} d_{s}= & {} \sqrt{\left( x_{j}-x_{i}\right) ^2+\left( y_{j}-y_{i} \right) ^2} \end{aligned}$$
(3)

In Eq. (1), dc stands for color distance, ds for space distance and Ns for maximum intra-class space distance. As for Nc that denotes the maximum color distance, it may be substituted by a constant m ranging between 1 and 40 (equal to 10 generally).

As a typical region segmentation algorithm, superpixel segmentation makes use of clustering methods to fulfill image segmentation based on brightness, colors and texture correlation among pixels. In line with the SLIC algorithm, images are converted from RGB space into LAB color space, and local clustering of pixels is executed in 5-D space which is defined by L, A and B values in the LAB color space together with x and y pixel coordinates [31]. In this way, it can effectively produce dense and almost uniform super mixture. Thanks to its advantages such as high processing speed, high memory efficiency and uniformity with the original image boundary, it has attracted more and more attention from researchers [32]. As one of the most important operators in pixelated image edge detection [33], the Sobel edge detection operator consists of two groups of \(3 \times 3\) matrices, one horizontal and the other vertical. By planar convolution dependent on such matrices, approximate values of brightness differences in horizontal and vertical directions are obtained, respectively. In addition, steps of image foreground acquisition based on SLIC and the Sobel edge detection operator are as follows.

  1. (1)

    The Sobel operator was used to carry out plane convolution for the original image in Fig. 1, and the average brightness of the image obtained was calculated as the threshold value. Pixels larger than the threshold value can be considered as edge pixels, while those smaller than the threshold value can be considered as non-edge pixels.

  2. (2)

    The boundary point in the Sobel image was obtained by traversing; moreover, the number of total pixels corresponding to all points that were connected to each boundary point was acquired; for connected pixels less than \(1\%\) of the total boundary point pixel value, they were eliminated.

  3. (3)

    SLIC-based segmentation was carried out for images that have undergone preliminary processing; in this process, distance of seed points was set at five pixels (\(N_{c} = 10\)) to solve the SLIC segmentation boundary.

  4. (4)

    Specific to images obtained in Steps 3 and 2, the Sobel edge detection images were generated eventually.

  5. (5)

    The SLIC-based image segmentation algorithm was utilized again and distance of clustering centers was defined as 30 pixels (\(N_{c} = 40\)); in this way, the SLIC segmentation boundary was acquired.

  6. (6)

    Regarding images detected in Step 4, if it intersects with the SLIC segmentation boundary obtained in Step 5, then the SLIC boundary of the corresponding clustering center should be supplemented; in addition, a pixel point, which is closest to an image center, of the supplemented boundary should be figured out. Subsequently, extension was conducted based on this point and did not stop until the Sobel image obtained in Step 4 was acquired. As for the final image thus generated, please refer to Fig. 1c Supplemented Sobel Edge Images.

  7. (7)

    In this case, the generated yak boundary image was closed and its central point was set as the starting point to allow filling by feat of a flooding algorithm [34]. Since the yak standing area can be removed from the image obtained in step 6, the color space distance between the image edge point obtained based on the flooding algorithm and the surrounding pixels is detected. The extension should be iteratively conducted if the space distance is less than the threshold before the acquired foreground pixels remain unchanged.

  8. (8)

    The obtained image was subjected to expansion and corrosion so that it may become smooth. Eventually, the yak image images turn out to be those presented in Fig. 1d Images with Measuring Points Labeled. Regarding operational processes of extracting the yaks’ foreground images, it is given in Fig. 3.

Fig. 3
figure3

Operational processes of extracting the yaks’ foreground images

Fig. 4
figure4

Comprehensive display system for yak’s estimation

Measuring point recognition algorithms

Recognition algorithm for standing height measuring points of yaks

Standing height of a yak refers to distance from its point of withers to the ground. In the case of identifying such a point, its head should be neglected in the first place for the purpose of preventing horns on the head from affecting acquisition of this point. In Fig. 1d Images with Measuring Points Labeled, heads that have been ignored are indicated in yellow. Afterward, their profile curves of the left upper part to the center were encoded by \(24-neighborhood\) chain codes, and curvature of each point was calculated [35]. In this case, a point with the maximum curvature represents the point of withers of the corresponding yak. During curvature calculations, a triangle may be determined by a contour point in a region where the point of withers is identified and another two points adjacent to it. After lengths of three sides as well as its perimeter P have been acquired for the triangle, the Heron’s formula was selected to work out its area denoted as S and the curvature K. When a normal line of measurement is identified, traversing of the lowest points in the left lower part to the center and other lowest points in the right lower part to the center can be performed provided that the yak is standing ordinarily. On this basis, the normal line can be identified. Moreover, such a normal line of measurement may be deemed as the ground, as Line S in black shown in

figureb

Figure 1d Images with Measuring Points Labeled. Furthermore, the perpendicular distance from the point of withers to the normal line is the yak’s standing height. Regarding lines of standing height, they have been shown by red segments A in Fig. 1d Images with Measuring Points Labeled. The recognition algorithm of the measurement points of body height is shown in Algorithm 2.

figurec

Recognition algorithm for hipcross height measuring points of yaks

Hipcross height of a yak refers to vertical height from its hipcross to the ground. Here, the hipcross point can be identified by recognizing a lower boundary point of its hipcross. The center of the yak was recalculated after its head and feet were eliminated, so that a lower boundary point of its hipcross was determined to be on the right of the above described center. Likewise, a search algorithm was utilized to locate the highest point within a range from the lower boundary of the center to the lowest point of its rear hoof. Again, the highest point is identified as its lower boundary point. Similarly, a perpendicular between this point and the normal line is drawn, so that an intersection of this perpendicular and the upper half of the yak is the upper boundary point of its hipcross. As shown in purple segments D in Fig. 1d Images with Measuring Points Labeled, the recognition algorithm of cross height measurement point is similar to that of chest depth measurement point. It can refer to the recognition algorithm of chest depth measurement point, which is not described too much here.

Recognition algorithm for body length measuring points of yaks

Body length of a yak refers to the distance from its punctum ischiacum to its shoulder point. During punctum ischiacum acquisition, contour lines of the yak in the upper right part to the center may be encoded by 8-neighborhood chain codes and curvature of each point should be calculated. In this case, the point with the least curvature is the punctum ischiacum of the corresponding yak. As for shoulder point acquisition, head and feet of the yak should be first ignored to avoid their influence on shoulder point recognition. Regarding contour lines of yaks with heads and feet removed, they are shown in white in Fig. 1d Images with Measuring Points Labeled. By traversing images of the left lower part to the center, a curve point at the most upper left end was found within the range. Then, such a curve point was used as the starting point to fulfill searching. Furthermore, traversing of all retrieved points was conducted to locate a point that is the closest to its center, the punctum ischiacum. With regard to the body lengths of yaks, they are denoted by orange segments B in Fig. 1d Images with Measuring Points Labeled, the recognition algorithm of the measuring point for the length of body oblique is shown in Algorithm 3.

figured
Table 4 Univariate regression model-based prediction
Table 5 Multivariate regression model-based prediction
Fig. 5
figure5

Data transfer between nodes and cloud

Recognition algorithm for chest depth measuring points of yaks

Chest depth of a yak refers to the height, around its chest, starting from the rear of its scapula. In this paper, chest circumference measuring points of a yak may be gained by identifying lower boundary points of its chest. After the center of the remaining body part with heads and feet eliminated, their lower boundary points were determined to be on the left of its center. Subsequently, a search algorithm was adopted to search the highest point within a range from the lower boundary of this center to the lowest point of its forehoof. Thus, the highest point can be recognized as a lower boundary point of its chest. Furthermore, an intersection between a perpendicular formed by this point and the normal line is the upper boundary point of its chest. As for chest depth recognized by this algorithm, it is represented by pink segments C in Fig. 1d Images with Measuring Points Labeled. The recognition algorithm of measuring points of chest depth is shown in Algorithm 4.

Hipcross height of a yak refers to vertical height from its hipcross to the ground. Here, the hipcross point can be identified by recognizing a lower boundary point of its hipcross. The center of the yak was recalculated after its head and feet were eliminated, so that a lower boundary point of its hipcross was determined to be on the right of the above-described center. Likewise, a search algorithm was utilized to locate the highest point within a range from the lower boundary of the center to the lowest point of its rear hoof. Again, the highest point is identified as its lower boundary point. Similarly, a perpendicular between this point and the normal line is drawn, so that an intersection of this perpendicular and the upper half of the yak is the upper boundary point of its hipcross. As shown in purple segments D in Fig. 1d Images with Measuring Points Labeled, the recognition algorithm of cross height measurement point is similar to that of chest depth measurement point. It can refer to the recognition algorithm of chest depth measurement point, which is not described too much here.

Calculations of yak weight

Data fitting was carried out for the collected data based on weka to produce a computational formula (see Eq. 4) for yak weight. In this equation, w stands for weight, h for standing height, s for body length, d for chest depth and t for hipcross height. According to the data acquired, ratios of standing height to body length, standing height to chest depth, standing height to hipcross height, body length to chest depth, body length to hipcross height and chest depth to hipcross height were worked out and used as the essential data. By comparing the advantages and disadvantages of K-means, KNN, Bayes, a priori and other data mining algorithms [36] , this paper decided to adopt KNN algorithm to proportions of standing height to body length, standing height to chest depth, standing height to hipcross height, body length to chest depth, body length to hipcross height and chest depth to hipcross height were calculated. Respectively, these ratios are compared with the perceptual data one by one to find out the related errors and define k data with the minimum error. In this paper, K was equal to 5. (If the value of the k too small, the final measurement result will easily affected by noise points, and the error may increase; if too large, it may contain too many other yak-type points, and the error may also increase.) Thus, body measurement data of five yaks were generated and averaged. After that, data obtained through calculations were substituted into Eq. (4) to work out their weight.

Fig. 6
figure6

Recognition images of measuring points of yak in different standing positions

Fig. 7
figure7

Body measurement data analysis for yaks in different age groups

$$\begin{aligned} w= 1.0621\times h+0.7202\times s+4.6187\times d+1.0350\times t-398.6303 \end{aligned}$$
(4)

The establishment for a comprehensive display system for yak estimation

Through the development and application of the yak body size and weight estimation algorithm in 3 on the mobile terminal, the herdsmen can obtain the yak body size and weight data easily and quickly when using mobile phones, which will bring positive benefits to yak’s healthy breeding, welfare breeding and precision breeding.

The amount of data collected determines the accuracy of the method of estimating the body size and weight of yak in this paper. (The more information about body size and weight of different yaks in the database, the higher the accuracy of body size and weight estimation in practical application.) However, it is very difficult to collect information on the body size and weight of yaks in reality. It usually requires several strong labors, and the body size and weight data of dozens of yaks can be obtained by weighing in one day. If the majority of herdsmen use the yak body size and weight estimation software based on mobile, timely feedback the specific body size and weight data of the estimated yak, which will have a positive impact on the accurate estimation of yak body size and weight information. Therefore, a comprehensive display system for yak estimation is developed [37] (as shown in Fig. 4).

The estimation and display system of yak includes estimate average error module, history record module, best and worst estimate result module [38, 39] and the use record of mobile module. When herdsmen estimate the body size and weight of yaks by the mobile terminal, they can choose the measure accuracy of the body size and weight of the yaks. They can also use the mobile terminal to estimate the body size and weight of yaks and then measure body size and weight in actual. Subsequently, the data are transmitted to the cloud server through the network for storage [40, 41] (as shown in Fig.  5). By updating and fitting the body size and weight data of yaks regularly  [42] , the error between the body size and weight of the estimated yaks can be minimized. More than 100 yak body size and weight data were collected in one month after the system was put into operation. Through updating and fitting the body size and weight data, the results showed that the average error of yak body weight estimation is reduced by \(0.8\%\) compared with the previous one, and the body height, oblique length, chest depth and cross height are reduced compared with the previous one.

Table 6 Data of randomly selected ten yaks
Table 7 Data validation results of 25 yaks in different age groups

Results and discussions

Algorithm stability analysis

Three stances have been defined for yaks, as given in Table 3

In order to detect the adaptability of the algorithm, the measurement points of the same yak at different positions are extracted. These extracted measuring points on body sizes of yaks in diverse stances are revealed in Fig. 6. To be specific, measuring points of the yak in Stance 1 are presented in Fig. 6 Stance 1, while Fig. 6 Stance 2 and Fig. 6 Stance 3, respectively, indicate measuring points obtained in Stances 2 and 3. It has been proven by the relevant results that this algorithm has the potential to accurately recognize measuring points on bodies of yaks. As signified by testing totally 103 yak pictures collected, foregrounds can be extracted from 98 yak pictures by virtue of such an algorithm, generating a recognition accuracy of \(95.15\%\). Regarding 95 images with foregrounds identified, measuring points can be accurately labeled; in this case, the recognition accuracy turns out to be \(92.23\%\). It has been found from the experimental results that such an algorithm is preferably adaptable and performs accurately and robustly in extracting measuring points in various stances.

Table 8 Mean error detection results based on data of 25 yaks

Analysis on body measurement detection accuracy and results

Body measurement data of ten male or female yaks in diverse age groups (see Table 6) were selected to generate the measurement results by virtue of the above algorithm. These results are given in Fig. 7.

In conformity with data analysis, mean errors between the calculated values and the measured values of standing height, body length, chest depth and hipcross height are, respectively, \(0.37\%\), \(1.428\%\), \(2.009\%\) and \(2.774\%\) as far as Stance 1 is concerned. The reason why such errors for chest depth and hipcross height are rather large is that both chest depth and hairs in the lower part of the hipcross are exclusive during calculations of them by a Biltmore stick, and although preliminary image processing has been performed by the proposed method, it fails to utterly remove hairs below the chest and on the lower part of the hipcross. In terms of Stance 2, mean errors between the calculated value and the measured value of standing height, body length, chest depth and hipcross height are \(0.534\%\), \(2.264\%\), \(2.68\%\) and \(3.255\%\), respectively. In addition, all relevant data are reduced. The reason for large errors found in body length, chest depth and hipcross height is that center line of the yak’s back forms a rather great included angle with the center line of the camera. Due to this included angle, impressions of the body length, the chest depth and the hipcross height are cut down in their images. As regards Stance 3, a mean error of \(0.742\%\), is generated by the calculated value and the measured value of standing height; however, all calculated and measured values are comparatively small, because heads of the yaks tilt during photographing, which leads to a slight decline of their points of withers. For mean errors between the calculated values and the measured values of body length, chest depth and hipcross height, they turn out to be \(3.32\%\), \(3.531\%\) and \(3.957\%\), respectively. Again, all such data decrease. The reason why mean errors of body length, chest depth and hipcross height are rather high is similar to that for Stance 2. As demonstrated by the measurement results of the same yak in three different stances, the calculated value of standing height is slightly deviated from its measured value in an extreme stance, while data of its body length, chest depth and hipcross height decline to an extent greater than that of their measured values. By averaging data obtained by repeated measurements, better results can be generated.

Weight detection accuracy and result analysis

Specific to 300 items of yak-related data that are manually acquired, univariate and multivariate regressions are performed to predict the weight by means of linear regression, Gaussian process, neural network and support vector machine. Relevant model prediction details are given in Tables 4 and 5. According to the corresponding results, high correlation coefficients are generated if their weight is obtained by image processing. This signifies that parameters gained through image processing can be used for modeling. During univariate analysis, chest depth exerts a more significant influence on weight; in the course of multivariate analysis, the linear regression method with comparatively high correlation coefficients and low errors produced features, as for model validation, the least standard deviation (9.2779 kg) and the least mean error (\(6.24\%\)). In the end, data validation results for 25 yaks that are divided into different age groups are acquired and presented in Tables 7 and 8.

Discussions

In this section, performance and applications of body measurement algorithms for yaks are assessed. In terms of such algorithms, a method proposed by Lina Zhang [5] specific to small-tailed han sheep is featured with being simple, convenient and independent of any particularly established construction. In comparison with another method raised by Tillett [3], that is to acquire morphological data of swine from 3-D images, the former can be much simpler. However, errors are incurred in this paper because of the failure in recognizing sufficiently accurate measuring points. If compared with the method developed by Larios [43], the proposed approach here does not require sensors and can be also embedded in portable devices such as a mobile phone. Yaks which are huge and wild cannot be treated like ordinary domestic animals. In this context, 3-D measurement or sensor-based measurement may be applied. The results of research show that it is feasible to use the edge calculation method to estimate the weight of yak. First, the estimated data and the actual body weight of the yak are transferred to the cloud server, and then the data is regularly updated and fitted to reduce the data deviation. Compared with other methods, this method can conveniently obtain the yak body size and weight data, reduce the manual labor of the herdsmen and improve the management efficiency of the herd.

Conclusions

In this paper, the edge calculation method is used to take photographs of the yak through the mobile and portable device, and the SLIC+Sobel operator is used to obtain the foreground image of the yak, and then, the image of the measurement point of the yak is identified. Then, the proportion of each yak’s body size data is transmitted to the cloud server, and the actual body size data of the yak is estimated through a data mining algorithm, and then, the actual weight of the yak is calculated using a linear regression formula and the result is fed back to the user. Compared with other methods, the method proposed in this paper is convenient, fast, low-risk and practical. This is very beneficial for the herdsmen in the Sanjiangyuan region to raise yak. At the same time, the weight information of the animal reflects the animal’s physical health, and the method in this paper also prevents and diagnoses health problems caused by yak eating, which can improve the production efficiency of large yak farms and save labor costs.

Specific tests through experiments show that:

  1. (1)

    Regarding images collected in a scene, the proposed algorithm is capable of generating split images with preferable edge information and effectively extracting contour information of yaks. In experiments of extracting measuring points on images of yaks that are in diverse stance, the proposed algorithm is demonstrated to be preferably adaptable.

  2. (2)

    The testing results indicate that averaging the values that are obtained through repeated measurements may enhance accuracy of the measurement system.

  3. (3)

    Errors may be reduced to the greatest extent by holding the camera horizontally and making the plane where the camera is placed parallel to that where the yak is standing.

  4. (4)

    In accordance with the yak weight prediction results, parameters generated by image processing can be used to monitor growth situations of yaks.

  5. (5)

    Yak estimation integrated display system, which can obtain the yak body size data in time and effectively, and evaluate the method proposed in this article.

  6. (6)

    The more actual yak body size and weight data is obtained, the more accurate the yak body size and weight estimation will be.

The experimental results show that the edge calculation method proposed in this paper can effectively measure the body size and weight parameters of yaks and avoid direct contact with yaks. Therefore, under the management mode of welfare agriculture, it provides guidance for yak evaluation and breeding based on body size.

Availability of data and materials

The authors declare that all the data and materials in this manuscript are available from the author.

Abbreviations

SLIC:

Simple linear iterative clustering

References

  1. 1.

    J.H.C. Costa et al., A survey of management practices that influence production and welfare of dairy cattle on family farms in southern Brazil. J. Dairy Sci. 96(1), 307–317 (2013)

    Article  Google Scholar 

  2. 2.

    E.L. Wagner, P.J. Tyler, A comparison of weight estimation methods in adult horses. J. Equine Vet. Sci. 31.12, 706–710 (2011)

    Article  Google Scholar 

  3. 3.

    N. Oron, 3D Computer-vision system for automatically estimating heifer height and body mass. Biosyst. Eng. 173, 4–10 (2018)

    Google Scholar 

  4. 4.

    A. Pezzuolo et al., On-barn pig weight estimation based on body measurements by a Kinect v1 depth camera. Comput. Electron. Agricul. 148, 29–36 (2018)

    Article  Google Scholar 

  5. 5.

    Z. Lina et al., Algorithm of sheep body dimension measurement and its applications based on image analysis. Comput. Electron. Agric. 153, 33–45 (2018)

    Article  Google Scholar 

  6. 6.

    X. Wang et al., A cloud-edge computing framework for cyber-physical-social services. IEEE Commun. Mag. 55(11), 80–85 (2017)

    Article  Google Scholar 

  7. 7.

    Y. Wang et al., Secure computation protocols under asymmetric scenarios in enterprise information system. Enterp. Inf. Syst. 1, 1–21 (2019)

    Google Scholar 

  8. 8.

    L. Qi et al., Dynamic mobile crowdsourcing selection for electricity load forecasting. IEEE Access 6, 46926–46937 (2018)

    Article  Google Scholar 

  9. 9.

    H. Zhang et al., A generic data analytics system for manufacturing production. Big Data Min. Anal. 1(2), 160–171 (2018)

    Article  Google Scholar 

  10. 10.

    J. Zhang et al., Efficient signal separation method based on antenna arrays for GNSS meaconing. Tsinghua Sci. Technol. 24(2), 216–225 (2018)

    Article  Google Scholar 

  11. 11.

    H. Liu et al., Link prediction in paper citation network to construct paper correlation graph. EURASIP J. Wirel. Communi. Netw. 2019(1), 1–12 (2019)

    Article  Google Scholar 

  12. 12.

    Liu H. et al., Keywords-driven and popularity-aware paper recommendation based on undirected paper citation graph. Complexity (2020)

  13. 13.

    J. Li et al., Community-diversified influence maximization in social networks. Inf. Syst., 101522 (2020)

  14. 14.

    C. John, System and Method for Measuring Animals. USA Patents, 8036429, 2011-10-11 (2011)

  15. 15.

    S.W.P. Cloete et al., Ease of birth relation to pelvic dimensions, litter weight and conformation of sheep. Small Rumin. Res. 31(1), 51–60 (1998)

    Article  Google Scholar 

  16. 16.

    A.B. Doeschl-Wilson et al., Using visual image analysis to describe pig growth in terms of size and shape. Anim. Sci. 79(03), 415–427 (2004)

    Article  Google Scholar 

  17. 17.

    I. Zwertvaegher et al., Objective measuring technique for teat dimensions of dairy cows. Biosyst. Eng. 110(2), 206–212 (2011)

    Article  Google Scholar 

  18. 18.

    K. Wang et al., A portable and automatic Xtion-based measurement system for pig body size. Comput. Electron. Agric. 148, 291–298 (2018)

    Article  Google Scholar 

  19. 19.

    P. Menesatti et al., A low-cost stereovision system to estimate size and weight of live sheep. Comput. Electron. Agric. 103, 33–38 (2014)

    Article  Google Scholar 

  20. 20.

    M. Khojastehkey et al., Body size estimation of new born lambs using image processing and its effect on the genetic gain of a simulated population. J. Appl. Anim. Res. 44(1), 1–5 (2015)

    Google Scholar 

  21. 21.

    J. Liu, Y. Pan, M. Li, Z. Chen, L. Tang, C. Lu, J. Wang, Applications of deep learning to mri images: a survey. Big Data Min. Anal. 1(1), 1–18 (2018)

    Article  Google Scholar 

  22. 22.

    A.H.A. Dugdale et al., Effects of season and body condition on appetite, body mass and body composition in ad libitum fed pony mares. Vet. J. 190(3), 329–337 (2011)

    Article  Google Scholar 

  23. 23.

    O.S. Sowande, O.S. Sobola, Body measurements of west African dwarf sheep as parameters for estimation of live weight. Trop. Anim. Health Prod. 40(6), 433–439 (2008)

    Article  Google Scholar 

  24. 24.

    S. Jafari et al., Genetic parameters of live body weight, body measurements, greasy fleece weight, and reproduction traits in Makuie sheep breed. Span J. Agric. Res. 12(3), 653 (2014)

    Article  Google Scholar 

  25. 25.

    Mahmud et al., Live body weight estimation using cannon bone length and other body linear measurements in Nigerian breeds of sheep. J. Adv. Vet. Anim. Res. 1(4), 169–176 (2014)

    Article  Google Scholar 

  26. 26.

    Y. Qinghai, Tibetan Autonomous Prefecture People’s Government. Overview of Yushu. http://www.yushuzhou.gov.cn/html/2/7.html

  27. 27.

    Q. Shi et al., Endangered wild yak (Bos grunniens) in the Tibetan plateau and adjacent regions: Population size, distribution, conservation perspectives and its relation to the domestic subspecies. J. Nat. Conserv. 32, 35–43 (2016)

    Article  Google Scholar 

  28. 28.

    X. Yang et al., The histological characteristics, age-related thickness change of skin, and expression of the HSPs in the skin during hair cycle in yak (Bos grunniens). PLoS ONE 12(5), e0176451 (2017)

    Article  Google Scholar 

  29. 29.

    Z. Al-Ameen et al., An innovative technique for contrast enhancement of computed tomography images using normalized gamma-corrected contrast-limited adaptive histogram equalization. EURASIP J. Adv. Signal Process. 2015(1), 32 (2015)

    Article  Google Scholar 

  30. 30.

    Q. Jiahui, Y. Li, W. Dong, Fusion of hyperspectral and panchromatic images using an average filter and a guided filter. J. Vis. Commun. Image Represent. 52, 151–158 (2018)

    Article  Google Scholar 

  31. 31.

    Z. Huanxin et al., A likelihood-based SLIC superpixel algorithm for SAR images using generalized gamma distribution. Sensors 16(7), 1107 (2016)

    Article  Google Scholar 

  32. 32.

    F. Boemer, E. Ratner, A. Lendasse, Parameter-free image segmentation with SLIC. Neurocomputing 277, 228–236 (2018)

    Article  Google Scholar 

  33. 33.

    S. Jing, Image edge detection based on relative degree of grey incidence and Sobel operator, in International Conference on Artificial Intelligence and Computational Intelligence (Springer, Berlin, 2012)

  34. 34.

    A. Rueda, J.M. Noguera, C. Martinez-Cruz, A flooding algorithm for extracting drainage networks from unprocessed digital elevation models. Comput. Geosci. 59(3), 116–123 (2013)

    Article  Google Scholar 

  35. 35.

    A.N. Azmi, D. Nasien, F.S. Omar, Biometric signature verification system based on freeman chain code and k-nearest neighbor. Multim. Tools Appl. 76(14), 15341–15355 (2017)

    Article  Google Scholar 

  36. 36.

    Y. Yang, H. Wang, Multi-view clustering: a survey. Big Data Min. Anal. 1(2), 83–107 (2018)

    Article  Google Scholar 

  37. 37.

    W. Jiang, L. Zhang, Geospatial data to images: a deep-learning framework for traffic forecasting. Tsinghua Sci. Technol. 24(1), 52–64 (2019)

    MathSciNet  Article  Google Scholar 

  38. 38.

    C. Xiaoxiao, Y. Chao, W. Hao, R. Wajid, Q. Lianyong, Amplified LSH-based recommender systems with privacy protection. Concurr. Comput. Pract. Exp. (2020)

  39. 39.

    Z. Weiyi, Y. Xiaochun, Z. Xiaochun, L. Shancang, D. Wanchun, W. Ruili, Q. Lianyong, Multi-dimensional quality-driven service recommendation with privacy-preservation in mobile edge environment. Comput. Commun. (2020)

  40. 40.

    G. Li, S. Peng, C. Wang, J. Niu, Y. Yuan, An energy-efficient data collection scheme using denoising autoencoder in wireless sensor networks. Tsinghua Sci. Technol. 24(1), 86–96 (2019)

    Article  Google Scholar 

  41. 41.

    Wang Xiaokang, Laurence T. Yang et al., A distributed tensor-train decomposition method for cyber-physical-social services. ACM Trans. Cyber Phys. Syst. 3(4), 1 (2020). https://doi.org/10.1145/3323926

    Article  Google Scholar 

  42. 42.

    C. Ying, Z. Ning, Z. Yongchao, C. Xin, W. Wen, S. Xuemin, Energy efficient dynamic offloading in mobile edge computing for internet of things. IEEE Trans. Cloud Comput. (2019)

  43. 43.

    D. Larios et al., An automatic weighting system for wild animals based in an artificial neural network: how to weigh wild animals without causing stress. Sensors 13(3), 2862–2883 (2013)

    Article  Google Scholar 

Download references

Acknowledgements

This work is supported by Science and Technology Project in Qinghai Province (2020-QY-218, No.2017-ZJ-717); Modern agriculture (cow calf) industrial technology system project (CRA-37); And received the support of the “High-end Innovative Talents Thousand Talents Program” in Qinghai Province.

Funding

Funding was provided by Science and Technology Project in Qinghai Province (No.2017-ZJ-717, 2020-QY-218).

Author information

Affiliations

Authors

Contributions

YZ guided in the research of this article and constructed the framework of the research method of this article. ZS is specifically responsible for the research of this paper, developed and implemented the yak body size and weight estimation algorithm involved in this paper and built a comprehensive display system platform for yak estimation. CZ assist in the development of yak body size and weight estimation algorithm. SY completed the translation of the thesis and verified it and assist to complete the experiment of this study. WW assisted in the development of yak estimation integrated display system platform. RS assist to complete the experimental part and the detection and application part of the system. All authors read and approved the final manuscript.

Corresponding author

Correspondence to Yu-an Zhang.

Ethics declarations

Competing interests

The authors declare that they have no competing interests.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Zhang, Ya., Sun, Z., Zhang, C. et al. Body weight estimation of yak based on cloud edge computing. J Wireless Com Network 2021, 6 (2021). https://doi.org/10.1186/s13638-020-01879-y

Download citation

Keywords

  • Yak
  • Three-river-source
  • Edge computing