Journal of Animal and Veterinary Advances

Year: 2011
Volume: 10
Issue: 12
Page No. 1504 - 1511

Predicting Fresh Beef Color Grade Using Machine Vision Imaging and Support Vector Machine (SVM) Analysis

Authors : X. Sun, K. Chen, E.P. Berg and J.D. Magolski

Abstract: This study investigates the usefulness of electronically derived and analyzed fresh beef lean color image features for predicting official Chinese beef color scores. About 160 beef longissimus thoracis (ribeye) cross-section images were collected. The twelve features of beef muscle color were extracted and one feature was calculated using stepwise multiple regression analysis. Multiple linear regression and SVM model with inputs of color features and outputs of 4-7 color scores, respectively were designed to automatically estimate the grade of beef muscle color. Multiple linear regression analysis of the coefficient of determination (R2 = 0.89) and the model accuracy which determine the beef color muscle scores is 86.8%. SVM classifier achieved the best performance percentage of 94.7% showing that the machine vision combined with SVM discrimination method can provide an effective tool for predicting color scores of beef muscle.

How to cite this article:

X. Sun, K. Chen, E.P. Berg and J.D. Magolski, 2011. Predicting Fresh Beef Color Grade Using Machine Vision Imaging and Support Vector Machine (SVM) Analysis. Journal of Animal and Veterinary Advances, 10: 1504-1511.

INTRODUCTION

Acceptable fresh meat color is the most important quality trait customers use when making decisions regarding intent to purchase (Mancini and Hunt, 2005). Scientific evaluation of color can be divided into three attributes: hue, chroma and value (Judge, 1989). World-wide, consumers associate freshness of red meat with a homogeneous bright, cherry-red color and consider dark red, purple or brown meat as unacceptable (less fresh). In china, the department of agriculture defined eight grades of beef muscle color and issued a set of standard color cards. These cards are utilized by graders to assign a color score to a beef steak based on visual inspection or qualitative analysis. This subjective method would ultimately lead to variation in beef quality at the retail counter due to variation in human observation and interpretation of color by graders. Thus it is necessary to develop an approach to qualitatively measure and analyze beef color.

Computer vision techniques have great potential for beef quality analysis. Image processing techniques can quantitatively and consistently characterize complex color, geometric and textural properties (Gerrard et al., 1996; Lu et al., 1998). Image analysis techniques have been used to evaluate characteristics of fresh pork or beef color (Larrain et al., 2008; O'Sullivan et al., 2003; Ringkob, 2001; Lu et al., 2000; Van Oeckel et al., 1999), marbling (Faucitano et al., 2005; Yoshikawa et al., 2000; Gerrard et al., 1996) and overall quality grading (Jackman et al., 2008; Tan, 2004; Shiranita et al., 1998). Ringkob (2001, 2003) found that image analysis was a useful tool to predict the color score of pork particularly for detecting differences associated with pale, soft and exudative lean.

Because the computer vision systems evaluate the entire surface of a sample, this means of analysis may be more representative of sensory descriptors than the use of a standard portable colorimeter which is based on point to point measurements. Furthermore with the use of digital image processing, images of whole, intact steaks can be segmented for analysis that will exclude the non-descriptive parameters. As a result, lean color can be evaluated via means of objective analysis possessing superior precision relative to use of colorimeter or subjective visual sensory means.

Support Vector Machinery (SVM) proposed by Vapnik (1995) is a new state-of-the-art classification technique based on statistical learning theory, designed to solve complex classification problems. The SVM technique has been effectively used to perform non-linear classification, multivariate function estimation or non-linear regression. Compared with other methods, SVM does not require a large number of training samples for model development and is not affected by the presence of outlier (Burges, 1998).

The objectives of this study are to: electronically segment subcutaneous lean (peripheral muscles) from the muscle of interest (Longissimus thoracis) using digital image analysis, digitally identify and extract useful color features from images of fresh beef ribeye steaks and develop a prediction model for the official color score of fresh beef lean.

MATERIALS AND METHODS

Meat sample preparation: About 160 beef wholesale ribs (Longissimus thoracis) representing main color scores (4-7) typically found in Chinese packing plants were secured from a local supplier. Ribs were aged for 72 h at 4°C then further processed into 2.5 cm thick steaks for subsequent sensory analysis and image acquisition. Two color models are used to define fresh beef color in this study: the RGB (red, green and blue) and HSI (hue, saturation and intensity) model.

Sensory analysis: For sensory analysis, a five member panel was trained to assess beef muscle color according to the official color cards for beef lean tissue published by China Department of Agricultural. The eight grades for beef lean color defined by CBGS (China Beef Grading Standard) are: 1A = bleached red, 1B = very light cherry red, 2 = moderately light cheery red, 3 = cherry red, 4 = slightly dark red, 5 = moderately dark red, 6 = dark red and 7 = very dark red. Color scores were assigned for each steak (sample) using the CBGS eight-point color score. Currently, grade 4 to grade 7 occupy themajorshare of the china beef market. Panelist training was terminated when the color score assigned by an individual panelist did not differ by more than one unit from the group average for each sample.

Computer vision system: The computer vision system (Fig. 1) included three parts) a dedicated lighting chamber) a color (RGB format) digital camera (Dimage Z1, Minolta Co. Ltd., Japan) with the maximum resolution 2048 by 1536 pixels) and an image processing software package developed by the researchers. The dedicated lighting chamber was designed to include the lighting system and a meat sample supporting plane. The supporting plane allowed for samples to be moved vertically for greater ease in securing sample placement and image acquisition. A total of 240 Light-Emitting Diode (LED) lamps (model LT564CWC; color temperature 5400 K, China) were mounted on two lamp boards fixed on either side of the supporting board (120 LED lamps per side). In order to obtain uniform illumination conditions, the image capturing box was engineered to include an arced ceiling to discursively reflect light from the LED lamps to the meat sample surface.

Fig. 1: Computer vision system

Image processing: Initial image processing included background segmentation. Photometric differences between background and ribeye cross-sections were used to develop discriminant functions that removed imaging detail associated with the background leaving the area of interest (lean tissue) available for further image analysis. In this experiment, a boundary tracking algorithm is developed to remove background that was adapted from Wang (2006).

Once the background was removed, the subsequent image contained the Longissimus thoracis (ribeye) muscle and associated intramuscular (marbling) fat, the subcutaneous muscles (spinalis dorsi, multifidus dorsi and complexus) and the muscles associated with the intercostal space. Because muscle color scores are determined based on the longissimus thoracis muscle, separating the subcutaneous and intercostal muscles from the ribeye was necessary. To achieve this objective, morphological and logical operations were utilized. Color features were then digitally extracted from the remaining image of the longissimus thoracis. The procedures are summarized as follows:

For each longissimus thoracis image, the optimum threshold value was computed
Longissimus thoracis images were binarized according to the obtained optimum threshold value
The component labeling algorithm, erosion and dilation operations were used to remove the extraneous tissues while the binarized longissimus thoracis image was identified and remained
A logical operation AND of the binary longissimus thoracis image with the original image resulted in a colored longissimus thoracis image
The shareholding algorithm was used again and the intramuscular fat flecks within longissimus thoracis was removed
A resultant longissimus thoracis muscle image was obtained for estimating and analysis of color features

Beef color score SVM classifier design
Support vector machine: Developing classification methodologies through the use of SVM are gaining favor for their ability to utilize polynomial, radial based functions as a means to reach multilayer perception classifications. The SVM system fixes the classification decision function on the basis of the structural risk minimum mistake instead of the minimum mistake of misclassification based on the confines of the data presented through the training set. This analytical distinction is important because it allows the SVM to avoid over fitting the problem. In the experiment, the Guassian kernel was used for the SVM to obtain appropriate classification of a two-class model through the use of a separating hyperplane (Fig. 2). The hyperplane is developed by estimating the maximum distance to the closest data points (termed support vectors; SV) within the training set presented to the SVM. If these data points are not linearly separable in the input space, they can be transformed to a High Dimensional Space (HDS) through nonlinear transformation. This HDS is called feature space. Once data has been projected in the feature space, an algorithm that constructs the optimal separating hyperplane is developed by the SVM.

Assume that the training data with k number of samples is represented by {xi, yi} with i = 1, 2, 3, …, k, where x ε Rn is n-dimension vector and yi ε{-1,+1} is the class label. Each pattern x belongs to either of two classes. The aim is to construct the equation w •x+b (w, xεRn, bεR) of the optimal hyperplane that can separate the data leaving all points of the same class on the same side of hyperplane while maximizing the distance between the two classes. This can be expressed by following constraints:

(1)

Where w is a vector and b is a scalar constant. As the distance is represented in 1/||w||, the optimal hyperplane can be found by mimimizing 1/||w||, 2 under constraint (1).

Fig. 2: Optimal separating hyperplane under the linear separability condition

The minimization problem is solved by introducing Lagrange Multipliers and maximizing:

(2)

under constraints: αi≥0, i = 0, 1, 2, 3, …, k. If αm = (α1m,...,αkm) is an optimal solution of the above maximization problem, then the optimal separating hyperplane can be written as:

(3)

The points for which am>0 are the support vector. In most practical problems such a separating hyperplane may not exist. In this situation, the solution to find an optimal hypweplane can be obtained by introducing a slack variable ξ≥0:

(4)

Where parameter C is regularization constant used to determine the trade-off between the two terms. It is named as penalty constant and is chosen by the user.

In the case that a hyperplane could not be defined by linear equations, we can map input data into a high dimensional feature space by substituting each xi with its responsible mapping in the feature space φ(x). Thus Eq. 4 is expanded as follows:

(5)

It is difficult to compute an optimal hyperplane in feature space when the mapping is unknown. Usually, a kernel function K (xi, yi) = φ (xj) is introduced to make the computation easier. The optimization problem becomes:

(6)

Maximize:

(7)

Then the optimal hyperplane function can be written as:

(8)

The b can be computed by solving following equation:

(9)

Construction of multiclass SVM classifier: Before constructing a SVM classifier, an appropriate kernel function needs be carefully chosen. Several kernel functions including polynomial, Radial Basis Function (RBF) and sigmoid kernel have been suggested. Of them, the RBF kernel function performs best and is widely used in SVM. In this study, the RBF kernel function will be used:

(10)

The optimal hyperplane function becomes:

(11)

where, γ is a parameter which should be specified by the user. As we know, the SVM is attempting to identify the optimal separating hyperplane to maximize the margin between positive and negative samples. When using SVM to solve a realistic problem, selection of the penalty parameter C is necessary as is the case with the selection of the kernel parameter γ in the case of RBF functions. The kernel parameter γ implicitly defines the non-linear mapping from input space to high dimensional feature spaces; the penalty constant C determines the trade-off between minimizing the training error and minimizing model complexity. In the current study, the training set was used to train the multiclass SVM classifiers to look for the optimal combination of both γ and C.

RESULTS AND DISCUSSION

Segmentation of longissimus thoracis muscle: A representative example of beef steaks (Fig. 3) was selected in random from 160 samples to demonstrate the performance of the proposed image processing algorithms.

Fig. 3: A representative color image example of beef steak

Fig. 4: Segmentation procedures of subcutaneous and intercostal muscles from a ribeye

The adaptive segmentation procedure is shown in Fig. 4. After the boundary tracking algorithm was conducted on the original image, a mask image precision covering the ribeye was obtained as showed in Fig. 4a. Then a logical operation and of the mask image with the original image in Fig. 3 resulted in a background-removed beef ribeye image showed in Fig. 4b. This background-removed beef ribeye image was binarized based on the optimum threshold value by automatically calculated using Otus thresholding method (Otsu, 1979). The resulting b inarized image of the beef steak is shown in Fig. 4c. There were many small and disconnected objects in the binary image, including intramuscular fat flecks and other extraneous tissues and needed be eliminated. A labeling operation was developed to label the largest object as the primary object and remove smaller ones. The resulting image is shown in Fig. 4d. Fig. 4e shows the result after the operation Subtract of the mask image in Fig. 4d. After applying dilation, a labeling algorithm for deleting smaller objects again and erosion to the resulting image, a binary mask image of longissimus thoracis was created as shown in Fig. 4f. Performing the logical operation and on the binary mask image of longissimus thoracis with the background-removed ribeye image resulted in a color longissimus thoracis image (Fig. 4g). Finally, the intramuscular fat flecks were separated from the Longissimus thoracis using the Otus thresholding operation and a Longissimus thoracis muscle image was shown in Fig. 4h.

Feature extraction and descriptive statistics analysis: Red, Green, Blue (RGB) and Hue, Saturation, Intensity (HSI) models (Gonzalez and Woods, 1992) are the most commonly used color coordinate systems; therefore, color features of each meat sample were extracted in RGB and HSI color spaces. Images of each meat sample were first acquired and stored in RGB color space then transformed to HSI. Hue (H) is defined on the color hexagon as the distance of the current color position from the red axis represented in degrees within the color space coordinate. Likewise, S (Saturation) and I (Itensity) were calculated by the equations listed below:

(12)

(13)

Population mean and standard deviations were calculated for each of the 6 color components resulting in twelve color features including 6 means (μR, μG, μB, μH, μS, μI) and 6 standards deviations (σR, σB, σG, σH, σS, σI). All algorithms used in this study for image preprocessing and analysis were developed in C++ by the researchers.

After extracting the features from the image, the data analysis was used to find the best features as predictors for the model. Table 1 shows the descriptive statistics (means, ranges, standard deviations, variances) of all 12 beef muscle color features which were extracted from beef longissimus thoracis muscle image. The muscle images provided a detailed description of color distribution of fresh beef cuts available in most Chinese markets. Narrow ranges in color coordinate values for beef samples can be shown in Table 1. Uniformity in color component values among samples was consistent with sensory color scores with assigned color scores ranging from 4-7 by the panelists according to the official color cards. Color grade 4 samples representing an ideal slight dark red color made up <25% of the total samples. A majority of the beef samples displayed an undesirable dark red, potentially due to an extended bloom time prior to obtaining the image

Table 2 shows the simple correlation coefficients computed among the 12 variables. A high positive correlation (r = 0.941) was observed between μB and μG value color features (p<0.01) with the μL and μR values possessing the highest correlation (r = 0.987).

Table 1: Descriptive statistics for color features extracted from machine vision images of fresh beef muscle
a (μR, μG, μB, μH, μS, μI) = mean of R, G, B, H, S, I value. (σR, σG, σB, σH, σS, σI) = standards deviations of R, G, B, H, S, I value

Table 2: Correlation coefficients between the beef muscle color features
** = p<0.01; * = p<0.05, levels of significance; a (μR, μG, μB, μH, μS, μI) = mean of R, G, B, H, S, I value. (σR, σG, σB, σH, σS ,σI) = standards deviations of R, G, B, H, S, I value

A method is necessary to reduce the dimensionality of input variables in an effort to predict the beef color score. The dimensionality reduction is justified because variables that are highly correlated may carry no additional information than what is offered by the singular observation; making the measurements redundant. Furthermore, reducing the number of inputs to the model allows us to collect less data while maintaining an appropriate level of work complexity. All image features were screened to identify those that most effectively influence the electronic system’s ability to assess official beef color classification. If a feature was highly correlated with other features, it may not be useful for beef color classification in accordance with the China Department of Agriculture official standards. This form of feature selection can be expected to reduce the prediction error when only small datasets are available. Furthermore, a reduction in measurement requirements will generate a simpler model which is easier to interpret by the final user. Therefore, stepwise discrimination analyses were used in this study to reduce high dimensionality of the muscle color data. Stepwise discrimination was a standard procedure for variable selection which is based on the procedure of sequentially introducing the predictors into the model one at a time. The result showed out of twelve features only one (μR) was chosen as input values to predict official fresh beef color scores. All statistical analysis was performed with SPSS (release 15.0, SPSS Inc.).

We followed the general principles for establishment of an objective classification vector by separating the observed data into training and testing subsets (n = 122 and 38, respectively). The test subset was used to validate the model developed from image analysis of the training subset of steaks.

Prediction of muscle color scores by multiple linear regression analysis: Multiple linear regression analysis was used to predict official color scores for grading of fresh beef. Before applying regression analysis, the selected image variable (μR) was input into a standard scatter plot revealing a linear relationship between the electronic image features and the subjective color score provided by the trained color evaluation panel. This feature was then applied to standard regression analysis to identify the significant prediction variables. The resulting prediction equation reveals a strong linear relationship and a high degree of statistical efficiency as evidenced by a coefficient of determination (R2) of 0.89 and Root Mean Square Error (RMSE) value of 0.36.

Table 3: Result of beef muscle color grading by linear regression

Table 4: Result of beef muscle color grading by SVM

The official color score of multiple liner regression model as follows:

(14)

The remaining 38 ribeye samples were used to test the accuracy of the developed multi-linear regression model. The detail of each grade predict accuracy results of this test are shown in Table 3. We can see from the table that only grade four samples have a classification rate of 100%. The other three grades reach an accuracy level <90%. The prediction model correctly identified the official fresh beef color score for 33 of the 38 test samples resulting in 86.8% accuracy. Further research is necessary to establish a more appropriate and consistent model that operates at a higher level of accuracy.

Prediction of beef muscle color scores by SVM-based classifier: Cross validation technology on the training set was used to train the multiclass SVM classifiers to look for the optimal combination γ of and C. After comparing various combinations of γ and C. The combination of γ = 0.08 and C = 180 in the prediction model resulted in the highest rate of correct classification at 94.7%. Out of the 38 samples, 36 samples were correctively classified by the proposed classifier. Computed color feature extracted by the SVM contained useful information to discriminate between the darker color scores of fresh beef muscle. Therefore, pooling these features through comprehensive SVM analysis resulted in a robust classifier capable of predicting the muscle color scores of fresh beef with satisfactory accuracy.

Further analyzing the data (Table 4), researchers could find that all samples with scores of 4, 5, 6 and 7 could be correctly classified by the optimum SVM classifier. Whereas out of the 9 samples with color scores 5, three samples were incorrectly assigned to score 6. The proposed classifier gave a correct classification rate of 100% for the samples with the other three color scores. To improve classification accuracy of the SVM classifier, more representative samples are necessary.

Comparison between SVM model and linear-regression model: A comparison between the multiple linear regression and SVM classification systems shown that out of the 38 test samples, 33 samples were correctly classified using multiple linear-regression with an overall correct classification rate of 86.8%. About 36 test samples were correctly classified by the SVM prediction classifier, giving an overall correct classification rate of 94.7%. These results indicate that nonlinear classifiers may have a greater advantage over linear classifiers for objective evaluation of fresh beef color.

CONCLUSION

In this study, researchers have investigated the capability of machine vision imaging systems to efficiently collect digital information to be presented to standard regression and (or) SVM analyses to objectively determine China Beef Grading Standards for fresh beef color. Correlation analysis was conducted to reduce the number of features presented for development of the prediction model. About nine features selected from the original image features were used in each model for prediction (classification) of meat color.

Segmentation of spinalis dorsi (and other peripheral, subcutaneous muscles) from ribeye (Longissimus thoracis) could be achieved by boundary tracking, thresholding and morphological operations of image processing. The optimum SVM classifier was obtained by searching for the best combinations of parameters presented during training. The resulting SVM classifier possessed a nearly 95% accurate classification of Chinese Beef Grading Standards for color which was superior to the 87% classification rate obtained by the simple multiple linear regression model. Therefore, color score of beef muscle can be predicted with a satisfactory accuracy by using machine vision and support vector machine techniques.

ACKNOWLEDGEMENTS

The researchers wish to thank NNSF of China (Grant No. 31071565) for the grant awarded to carry out this research and for the foal samples supplied for this research.

Design and power by Medwell Web Development Team. © Medwell Publishing 2024 All Rights Reserved