Beef quality parameters estimation using ultrasound and color images
BMC Bioinformatics volume 16, Article number: S6 (2015)
Beef quality measurement is a complex task with high economic impact. There is high interest in obtaining an automatic quality parameters estimation in live cattle or post mortem. In this paper we set out to obtain beef quality estimates from the analysis of ultrasound (in vivo) and color images (post mortem), with the measurement of various parameters related to tenderness and amount of meat: rib eye area, percentage of intramuscular fat and backfat thickness or subcutaneous fat.
An algorithm based on curve evolution is implemented to calculate the rib eye area. The backfat thickness is estimated from the profile of distances between two curves that limit the steak and the rib eye, previously detected. A model base in Support Vector Regression (SVR) is trained to estimate the intramuscular fat percentage. A series of features extracted on a region of interest, previously detected in both ultrasound and color images, were proposed. In all cases, a complete evaluation was performed with different databases including: color and ultrasound images acquired by a beef industry expert, intramuscular fat estimation obtained by an expert using a commercial software, and chemical analysis.
The proposed algorithms show good results to calculate the rib eye area and the backfat thickness measure and profile. They are also promising in predicting the percentage of intramuscular fat.
In meat industry it is critical to have objective indicators that measure beef quantity and quality. It is also desirable that these indicators are non-destructive and fast to compute. Uruguay produces about 550,000 tons of beef a year, 30% for domestic consumption and the rest for export. One reason for the high production levels and acceptance in the world is the implementation of a good traceability and information systems. In this context, it is very important to have efficient methods to estimate parameters related with meat quality and amount of beef: rib eye area, percentage of intramuscular fat (IMF%) in the rib eye and subcutaneous backfat and rumb fat thickness. Obtaining predictors from ultrasound or color images (Figure 1) fulfill all these goals.
The rib eye area (Figure 2) is an important parameter since it allows to estimate the degree of carcass yield, as it is linked to the amount of meat or muscle with high impact in its price . Also, having a well distributed, and in a narrow ratio, fat coverage is considered a desirable attribute. Traditionally, these indicators are obtained through manual procedures performed by experts at the meat processing plants . For example, an usual way to measure subcutaneous fat thickness (Figure 3) is performed manually, using a ruler.
Such procedures are done in inhospitable environments and consist of repetitive tasks that are tedious for the expert, with high error rates linked to fatigue and inspector's mood. In [3, 4], methods for automatic segmentation of the rib eye in color images are proposed. These methods separate meat from "non-meat" (fat and bones). However, this method treats equally all the meat in the image, since the rib eye is not always surrounded by "non-meat" and includes other adjacent muscles in detection. Some works , avoid this problem removing other regions of the steak leaving only the rib eye beef; clearly this method is not suited for evaluating carcass at the slaughterhouse. In this work we propose a method based on curve evolution both for rib eye area and subcutaneous fat thickness measurements.
The intramuscular fat percentage (IMF%) is the proportion of intramuscular fat in the rib eye (Figure 4). IMF% is highly correlated with organoleptic characteristics such as juiciness and flavour , and above all it is a determining factor in perception of tenderness, this being the indicator with the highest impact on meat quality. It is for this reason that its estimation is essential in order to contribute to the carcass categorization. This quality indicator is usually performed in slaughtered animals, however, the indicator would also be of value if it could be measured in living animals for purposes of selective feeding, breeding and rearing . For that reason it is becoming important to develop automatic measurements and analysis algorithms both on color images (post mortem) and ultrasound images (ante morten) in livestock.
There are several previous work in this kind of applications, such as [7, 8] addressing the estimation of the IMF% in ultrasound images for livestock. In  the rib area was used as a determinant factor in the estimation of beef quality.
The production method used in Latin America usually includes a high component of extensive farming (although feedlot is used too) impacting in the amount of IMF%, while in other regions the feedlot production is preferred [10, 6, 11]. Therefore, IMF% in animals analysed in previous works such as [12, 6, 7, 13] might be different from the animals analysed in the present work and predictors should be adjusted in this case.
In this work we present new methods to automatically measure three beef quality parameters, IMF% in ultrasound images, rib eye area and backfat thickness in color images in slaughtered steers.
Automatic measurement methods
This section describes the proposed methods for ribeye detection and area estimation, then we present the method for subcutaneous fat detection which allows to estimate the thickness and to extract the fat profile. Finally the proposed strategy for IMF% is presented.
Rib eye detection and area estimation
The rib eye area estimation is used as a quality indicator and is also used for carcass categorizing the animal. Database images show a cross-sectional area of the longissimus dorsi muscle (dorsal length) at the level of the 12th intercostal space. The objective is to estimate the area of the muscle, commonly measured manually by an expert [5, 2].
This works proposes a curve evolution algorithm, more precisely an adaptation of the algorithm Distance Regularized Level Set Evolution (DRLSE). This method is a recent improvement of the level set techniques [15, 16]. The DRLSE method adds an intrinsic capability to the level set framework for maintaining regularity of the level set function, particularly maintaining the property of signed distance function around the zero level set. This method is used in an edge-based active contour segmentation that modifies the geodesic active contour proposed by Caselles . Therefore, edge information computed from the image is used to create the energy functional that govern the level set evolution.
In our framework, this information is provided using two different energy terms computing information from the image's edges, one uses "high contrasted" edge information and the other uses "emphasized" edge information. "High contrasted" edges are computed using the Caselles equation (1) on the binary image result of the "non-meat" detection. "Emphasized" edges are computed using Caselles equation but now in the u color channel, after an anisotropic diffusion on the image.
where G σ is the Gaussian kernel with the standard deviation σ.
A preprocessing stage which includes background elimination and detection of the "meat" and "non-meat" regions is done before the curve evolution stage. The background elimination is performed starting with an Otsu's binarization  on the red channel of color (Figure 5 shows the red channel). This procedure assumes there are two classes of pixels' intensities and looks for the optimal threshold that minimizes the intra-class variance. Regions in the steak (meat, bones and fat) contains enough information in the red channel to separate it from the background, which is majority black (Figure 6). Small gaps in the background are filled and the background is removed as shown in Figure 7 and 8.
For the detection of the "meat" and "non-meat" regions the information on the u (uniformity) (Figure 9) and L (luminance) channels in the Luv color space, and the G (green) channels inthe RGB color space are binarized, unsing Otsu's method, and their results combined. These color channels exhibit a good discrimination between "meat" and "non-meat" regions. Figures 10 and 11 show the result of this step.
Curve evolution is performed in three stages, starting from an initial curve determination. Image erosion is applied on the image result of the meat segmentation and with the consequent elimination of small regions of meat. This results in an internal region into the muscle of interest, Figure 12. Since the rib eye is the biggest meat region present in the steak, the erosion is performed iteratively until only one connected component is present in the image that should belong to the interior of the rib eye. The edges of this region defines the initial curve, that in the first stage of the curve evolution algorithm is evolved by considering only the role of the "high-contrasted" edges (Figure 13,14,15). This evolution seeks to achieve an initial approach to the contour of the rib eye. This evolution is fast, looking for reducing the segmentation time, specially in cases in which the initial contour is far from the rib eye contour. In the second stage, the algorithm continues from the previous evolution adding the "emphasized" edges energy term. This evolution is slower and stops when the growth area between successive evolutions does not exceed certain learned threshold.
In general, the adjustment of the curve to the rib eye edges achieved in these two steps is quite accurate. However, a third stage of evolution adjustment is applied, performing ten more iterations in order to achieve finer adjustment.
Measurement of the backfat thickness in color images is made on the cross section at the level of twelfth intercostal space, perpendicular to the outer edge of the fat and up to a quarter of the end of the muscle longissimus dorsi respect to the backbone. Fat provides desirable attributes, a well distributed coverage associated with a creamy-white color, are considered ideal; however excessive amounts of fat must be removed (industrial process called "conditioning"), which significantly decreases meat yield.
Nowadays most of the measures are performed manually by an expert using a ruler. Backfat measures are taken in two points, corresponding to the projection of 1/2 and 3/4 lenghts of the axis of the rib eye's first moment (See Figure 16) .
The proposed method automatically determines the axis of the rib eye's first moment and measures the thickness in the corresponding points. Moreover, the method computes a full profile of thickness for all the backfat, allowing to measure the thickness along it. The algorithm is based in a curve evolution from an initial curve to a target curve, assigning a thickness proportional to the iterations needed in each point to reach the target curve.
It needs two closed curves whose intersection is empty and the backfat is between. These curves will be the input of the curve evolution algorithm. To provide good detection, the initial curve should match the inner boundary of the backfat and a section of the target curve must match the outer limit of the backfat.
Backfat is characterized by not containing meat and to be part of the edge of the steak. Therefore, the initial curve is the convex hull of the beef meat. The target curve will be the edge of the union of the region defined after the background elimination and the region defined by the initial curve (see Figure 17). On the contact points a dilatation is performed over the target curve to avoid contact between both curves.
As said before, backfat should be measured in two points given by the perpendicular projection of half and 3/4 lengths of rib eyes's main axis. This point are geometrically located from the rib eye segmentation, computing its main axis.
The evolution is based on the normal evolution of the interior curve (the initial curve) and considers the other curve as target. The evolution includes some mechanisms for creating and combining points to ensure a correct sampling at all steps . The thickness is measured as the length of the path in the evolution. This algorithm finds an intuitive correspondence between points of the different curves and leads to an appropriate thickness definition. Since in this case there is no need of lot of points, the initial curves are resampled every 50 points. This has a big impact on the execution time generating a fast evolution. Figure 18 shows the evolution in an intermediate step.
Finally the region of interest between the measures 1/2 and 3/4 is taken as shown in Figure 19.
Intramuscular fat percentage estimation
Intramuscular fat percentage (IMF%) is the proportion of fat between the muscle fibers of the rib eye. This quality measure can be performed in color images in slaughtered animals, and in ultrasound images in live animals. It has been shown that intramuscular fat percentage is highly correlated with tenderness [20, 2], which is highlighted for consumers as one of the most determinant factors in beef quality. Therefore an automatic system for its measurement results fundamental.
In this work we propose its measure through two types of images, color images and ultrasound images.
The algorithm proposed includes three stages: region of interest detection, features extraction and selection and modelling for the estimation.
Region of interest detection
Only the muscle between the 12th and 13th rib under the subcutaneous backfat is taken to determine the IMF% value. Therefore, the region of interest (ROI) is defined given these structural components present in the ultrasound images, see Figure 20. The ultrasound image acquisition guarantees that all these three components are present.
For the subcutaneous fat location a thresholding using Otsu's method is applied for binarizing the image (see Figure 21) and a labelling algorithm was run on the image in order to determine the different regions. Thus, the subcutaneous backfat region is defined as the labelled region with a shape like the subcutaneous fat, i.e., a thin, long horizontal region in the upper third part of the image. Therefore, the labeled object with the highest ratio between the horizontal and vertical length was set as the subcutaneous fat.
For defining the location of the ribs, first, an anisotropic diffusion is applied to the image in order to smooth it without losing the edge information and restricting small variations of intensity in a same region. Then, a correlation between the image and a synthetic template emulating a generic rib (see Figure 22) was performed. The two local maxima in magnitude found in the correlation result represent the location of the ribs.
Finally, the ROI is defined as a 80 × 80 pixels square set on the center zone delimited by the subcutaneous fat and the ribs. Figure 23 shows an example of the output from the ROI detection procedure.
Features extraction and selection
A set of forty two features were extracted from each ROI. These features are based on several statistics and transformation on the ROI, for example, texture descriptors, local binary pattern, co-occurrence matrix, histograms, Fourier Transform, etc. Table 1 summarizes the computed features.
As a result of the feature acquisition stage we obtain a 42-dimension feature space. To reduce the space dimension in order to improve computational performance a feature selection stage based on Principal Components Analysis (PCA) was done, finding that 99% of the variance is accumulated in the first ten components. As a result of the PCA a new space of ten new features, linear combinations of the original ones, was used to do the IMF% estimation model.
Modeling for the estimation
Support Vector Regression (SVR) is a variant of the classic Support Vector Machine algorithm. The basic idea of SVR consist in mapping the training data, , into a larger dimensional space via a nonlinear mapping Φ: , where a linear regression can be performed. For more details on SVR see [21, 22].
In this work, a radial basis function ) was used as kernel. Parameters γ and tolerance of termination criterion were optimized based on the data train set.
The same strategy was applied for the post mortem color images, using the rib eye area as the ROI. Similar performance was obtained using specific descriptors for color data (intensity mean in different color channels, Fourier coefficients, number of pixels in each channel).
Experiments and results
We worked with a database of 153 steers acquired at the slaughter using a special hardware controlling distance and lighting. Only for 71 of them having ultrasound images. Ultrasound images were collected at a cattle ranch in Uruguay.
A measure of the rib eye area performed by an expert for all the database was used for the validation process, as well as a measure of backfat 1/2 and 3/4 for 51 steers.
IMF% was measured by chemical gas chromatography analysis and used as ground truth to validate the regression results. The lipid extraction protocols used are described in ; its margin of error in the measurement is less than 0.3%. An estimation of the IMF% from ultrasound images was performed by an expert from the meat industry using a commercial software. 283 ultrasound images were acquired, four images were taken per animal. The ultrasound hardware used was the Aquila Pro Vet, an industry standard equipment.
Rib eye area
The database was divided into two sets randomly drawn, one to train the algorithm and the parameters optimization (103 images, 2/3 of the dataset) and the other to test it (50 images, 1/3 of the dataset).
Two performance indicators were used,
Relative area error:(2)
where A union = R auto ∪ R manual y A inter = R auto ∩ R manual . With R auto rib eye area automatically detected by the implement algorithm and R manual rib eye area measured by an expert manually.
For the Backfat measure an estimation of the 1/2 and 3/4 is automatic done using a database of 51 steer and then contrasted with the expert measure. Table 4 compares the result of the algorithm developed and the expert measure.
The results were RMSE = 8.7 and 7.6 (in pixels) respectively for 1/2 and 3/4 and R2 = 0.87 and 0.88, where RMSE is the root mean square and R2 is the Pearson coefficient of correlation. Figure 24 shows the 51 animals in a scatter plot of the Backfat measure vs. the expert measure.
Intramuscular fat percentage
The database of ultrasoud images was divided into two sets randomly drawn, one to train the algorithm and compute the linear regression coefficients (184 images, 2/3 of the dataset) and the other to test it (92 images, 1/3 of the dataset).
This procedure was repeated 100 times, varying the test and training set. The results were: RMSE = 1.31 and R2 = 0.37. Figure 25 shows the 71 animals in a scatter plot of the IMF% estimation vs. the ground truth. To contrast, the estimation of the IMF% made by the expert, which has an RMSE of 1.58 and a correlation coefficient of 0.23. Table 5 compares the result of the algorithm developed and the expert estimation.
Conclusions and future work
New automatic methods to measure different beef quality parameters from the analysis of ultrasound (in vivo) and color images (post mortem) are presented. The parameters estimated are related to meat quality, meat yield and consumer's health: eye area steak, percentage of intramuscular fat and backfat thickness or subcutaneous fat.
First of all, we propose to measure the rib eye area, using an algorithm based on curve evolution. The results are satisfactory in over 77% of the processed images (seven different data sets with different acquisition conditions). The method is very robust and general, making it suitable for the segmentation of other muscle regions. In controlled conditions results are even better (more than 89%). Second, we propose to measure backfat thickness from the profile of distances between a curve that limits the steak and one that limits the rib eye previously detected. The automatic distance measurement achieves a very precise estimate using a novel evolution strategy. Beside this results, the algorithm gives the backfat thickness profiles, which provides information on the uniformity of the subcutaneous fat which is an important carcass quality information.
Last, we propose a procedure for estimating the intramuscular fat percentage based in Support Vector Regression in a region of interest automatically determined for ultrasound images (rectangle) and for the color images (rib eye). The performance of the automatic selection of the ROI for ultrasound was highly satisfactory, more than 96% of the database were well detected, in the remaining 4% where the ROI was wrongly detected, the software gives an alert and allows for a manual definition. The prediction of intramuscular fat showed a better adjustment only in the middle range of fat percentages (3%-5%). However this error in our approach is lower than the error in the expert's estimation. The overall performance is promising, clearly a deeper analysis of the features considered is needed. In the color images the main difference is in ROI determination and the set of features used, but we obtain similar performance results.
In future work we propose to analyse new strategies in the feature extraction and selection stages, both for ultrasound and color images, for intramuscular fat percentage estimation. We also want to explore the impact of different parameters in the estimation, such as the ROI's area and location.
J K, D L: Trends in Meat Consumption and the Need for Fresh Meat and Meat Products of Improved Quality. Improving the Sensory and Nutritional Quality of Fresh Meat. 2009, Woodhead Publishing Ltd, Sawston, Cambridge, UK
USDA L: Agricultural Marketing Service, Division, S.: United States Standards for Grades of Carcass Beef. 1997
Jackman P, Sun D-W, Du C-J, Allen P: Prediction of beef eating qualities from colour, marbling and wavelet surface texture features using homogenous carcass treatment. Pattern Recognition. 2009, 42 (5): 751-763. 10.1016/j.patcog.2008.09.009.
Jackman P, Sun D-W, Allen P: Automatic segmentation of beef longissimus dorsi muscle and marbling by an adaptable algorithm. Meat Science. 2009, 83 (2): 187-194. 10.1016/j.meatsci.2009.03.010.
Hale DS, Goodson K, Savell JW: USDA Beef Quality and Yield Grades. Department of Animal Science Texas A&M AgriLife Extension Service College Station TX 77843-2471. 2013, Accessed: 2014-05-23, [http://meat.tamu.edu/beefgrading/]
Harron W, Dony R: Predicting quality measures in beef cattle using ultrasound imaging. Computational Intelligence for Image Processing, 2009. CIIP '09. IEEE Symposium. 2009, 96-103.
Li C, Zheng Y, Kwabena A: Prediction of imf percentage of live cattle by using ultrasound technologies with high accuracies. Information Engineering, International Conference. 2009, 2: 474-478.
Greiner SP, Rouse GH, Wilson DE, Cundiff LV, Wheeler TL: Prediction of retail product weight and percentage using ultrasound and carcass measurements in beef cattle. Journal of Animal Science. 2003, 81 (7): 1736-1742.
Pinheiro TR, Mercadante MEZ, Albuquerque LG, Cyrillo JNSG, Branco RH: Phenotypic and genetic parameters compared during repeated measures of longissimus muscle area and subcutaneous fat thickness in nelore cattle. Genet Mol Res. 2011, 10 (4): 2944-52. 10.4238/2011.November.29.5.
Gresham JD: International study guide real time ultrasound beef cattle applications. University Scholars Designation at the Universtiy of Tennesse at Martin. 2006
Aass L, Fristedt C-G, Gresham JD: Ultrasound prediction of intramuscular fat content in lean cattle. Livestock Science. 2009, 125 (2-3): 177-186. 10.1016/j.livsci.2009.04.005.
Brethour JR: Using receiver operating characteristic analysis to evaluate the accuracy in predicting future quality grade from ultrasound marbling estimates on beef calves. J Anim Sci. 2000, 78 (9): 2263-8.
Li J, Tan J, Martz FA, Heymann H: Image texture features as indicators of beef tenderness. Meat Science. 1999, 53 (1): 17-22. 10.1016/S0309-1740(99)00031-5.
Li C, Xu C, Gui C, Fox MD: Distance regularized level set evolution and its application to image segmentation. IEEE Trans Image Process. 2010, 19 (12): 3243-3254.
Osher S, Sethian JA: Fronts propagating with curvature-dependent speed: Algorithms based on Hamilton-Jacobi formulations. Journal of Computational Physics. 1988, 79: 12-49. 10.1016/0021-9991(88)90002-2.
Sapiro G: Geometric Partial Differential Equations and Image Analysis. 2001, Cambridge University Press, New York, NY, USA
Caselles V, Kimmel R, Sapiro G: Geodesic active contours. Int J Comput Vision. 1997, 22 (1): 61-79. 10.1023/A:1007979827043.
Otsu N: A Threshold Selection Method from Gray-level Histograms. IEEE Transactions on Systems, Man and Cybernetics. 1979, 9 (1): 62-66.
Tailanian M, Lecumberry F, Gnemmi G: Measuring thickness profile between closed curves applied to endometritis detection on in dairy cattle. Technical report, Facultad de Ingeniería, IIE - Projecto ANII FMV 2 2011. 2014, 1: 73-76. [http://iie.fing.edu.uy/publicaciones/2014/TLG14]
Association, NCB: An evolving industry. 2013
Drucker H, Burges CJC, Kaufman L, Smola A, Vapnik V: Support vector regression machines. Advances in Neural Information Processing Systems 9. Edited by: Mozer M, Jordan M, Petsche T. 1997, MIT Press, Cambridge, MA
Smola A, Schölkopf B: A tutorial on support vector regression. Statistics and Computing. Invited paper. 1998
Folch J, Lees M, Stanley GHS: A simple method for the isolation and purification of total lipides from animal tissues. Journal of Biological Chemistry. 1957, 226 (1): 497-509.
This work was partially supported by ANII grant FMV 2_2011_1_7376 and Project ANII PR_FSA_2009_1_1383. The authors would like to thanks, Gessy Druillet, Marcela Eugster for their contribution on the database acquisition and analysis, Alvaro Gómez, Giovanni Gnemmi, Gregory Randall for their expertise support and Matías Tailanián for poviding the code of the curve evolution algorithm used in the backfat measurement.
Publication costs for this article were funded by the Department of Signal Processing, Facultad de Ingeniería, Universidad de la República, Montevideo, Uruguay.
This article has been published as part of BMC Bioinformatics Volume 16 Supplement 4, 2015: Selected articles from the 9th IAPR conference on Pattern Recognition in Bioinformatics. The full contents of the supplement are available online at http://www.biomedcentral.com/bmcbioinformatics/supplements/16/S4.
The authors declare that they have no competing interests.
J.L.N., M.P. and L.P. carried out the implementation of the algorithms, performed the experiments, developed the analytical tools and wrote the first version of the manuscript. J.L.N. also participated in all the stages of the preparation and edition of the manuscript. E.A. created the database and participated in the review of the manuscript. A.F. and F.L. proposed algorithm, designed experiments, analysed data and wrote the paper. All authors discussed the results on the manuscript.
Jose Luis Nunes, Martín Piquerez, Leonardo Pujadas contributed equally to this work.
About this article
Cite this article
Nunes, J.L., Piquerez, M., Pujadas, L. et al. Beef quality parameters estimation using ultrasound and color images. BMC Bioinformatics 16 (Suppl 4), S6 (2015). https://doi.org/10.1186/1471-2105-16-S4-S6