Keywords

1 Introduction

Computer vision algorithms have been successfully applied in several industrial processes, such as robotics, industrial image processing, food processing, and other fields [1]. Quickness, possibilities for non-destructive evaluation, easy procedures for application, and quantum of output per unit time are some advantages that promote the application of computer vision algorithms to food engineering [2]. Several methods to extract features from images are based on statistical approach. The most powerful computer vision algorithms to evaluate features described the textures from the images by co-occurrence matrix, differences of neighbourhoods matrix and run-length matrix [3]. However, as our knowledge, there are not algorithm to evaluate the texture distribution of the images in a radial way.

Magnetic Resonance Imaging (MRI) is a non-destructive, non-invasive, non-intrusive, non-ionizing and innocuous technique to acquire images. This makes MRI an alternative for determining physico-chemical attributes of meat and meat products, since the traditional methods of analysis are laborious, time and organic solvent consuming and require the destruction of the piece. Several studies were carried out to determine quality parameters of dry-cured products by MRI, allow monitoring the ripening process of Iberian [4], Parma [5] and San Daniele hams [6].

The extraction of textural information is very common to explore parameters related to meat quality. Caballero et al. [7] applied texture features for monitoring the diffusion of salt in Iberian ham. Pérez-Palacios et al. [8] predicted some physico-chemical characteristics in Iberian loin. Texture features algorithms were applied to study the marbling of beef [9], to predict the tenderness of cooked beef from images of fresh beef [10]. The efficiency of the computational texture features algorithms to solve problems related to meat products, in fresh and dry-cured products, have been tested previously [11, 12].

In this paper, a new computer vision algorithm based on radial distribution of the image is proposed, in order to determine quality characteristics of the meat products in a non-destructive way.

This paper is organized as follows: Sect. 2 presents the materials used in this work. Section 3 shows the methods applied in this work. Section 4 describes the obtained results and their discussion. Section 5 draws the main conclusions and their implications.

2 Materials

MRI images from twenty Iberian loins (ten fresh loins and ten dry-cured loins) were acquired at the Animal Source Foodstuffs Innovation Services (SiPA, Cáceres, Spain). A low-field MRI scanner (ESAOTE VET-MR E-SCAN XQ 0.18 T) was used with a hand/wrist coil, with nine different configurations on echo time (TE) and repetition time (TR). Sequences of Spin Echo (SE) weighted on T1 were applied with a field of view (FOV) of \(150 \times 150\) mm\(^2\), slice thickness of 4 mm, a matrix size of \(256 \times 204\) and 29 slices per sample were obtained. Five thousand two hundred and twenty MRI images were obtained.

All images were acquired in DICOM format, with a \(512 \times 512\) resolution and 256 gray levels. The MRI acquisition was performed at 23 \(^\circ \)C.

In addition, the quality parameters of fresh and dry-cured loins were determined by means of traditional physico-chemical techniques in order to obtain values for moisture [13], salt [13] and lipids content [14].

3 Methods

3.1 Classical Texture Algorithms

Three classical texture algorithms were applied in this study. Gray level co-occurrence matrix (GLCM), gray level run length matrix (GLRLM) and neighbouring gray level dependence matrix (NGLDM). These algorithms require a previous step, the selection of largest area rectangle inscribed on the image closed contour [15]. These areas, Region of Interest (ROI), need to be rectangular for the algorithms applied in this study [3].

GLCM [16] was computed by counting the number of times that each pair of gray levels occurred at a given distance “d” in all directions. In this matrix, each item “p(i, j)” denotes the number of times that two neighbouring pixels separated by distance “d” (d = 1 in this case) occur on the image, one with gray level “i” and the other pixel with gray level “j”. Ten computational texture features were obtained from which all the textural features are extracted [16]: Energy (ENE), Entropy (ENT), Correlation (COR), Haralick’s correlation (HC), Inverse Difference Moment (IDM), Inertia (INE), Cluster shade (CS), Cluster Prominence (CP), Contrast (CON) and Dissimilarity (DIS).

GLRLM [17] includes runs into the image, i.e., a set of consecutive pixels in the image with the same gray level value. The runs with the same gray level were computed in four different directions: 0\(^\circ \), 45\(^\circ \), 90\(^\circ \) and 135\(^\circ \). Eleven computational texture features were obtained from this method [17]: Short run emphasis (SRE), long run emphasis (LRE), gray level non-uniformity (GLNU), run length non-uniformity (RLNU), run percentage (RPC), low gray-level run emphasis (LGRE), high gray-level run emphasis (HGRE), short run low gray-level emphasis (SRLGE), long run low gray-level emphasis (LRLGE), short run high gray-level emphasis (SRHGE) and long run high gray-level emphasis (LRHGE).

NGLDM uses angular independent features by considering the relationship between an element and all its neighbouring elements at one time rather than one direction at a time [18]. This process eliminates the angular dependency while simultaneously reducing the calculations required to process an image. It is based on the assumption that the gray level spatial dependence matrix of an image can adequately specify this texture information. Five computational texture features were obtained by using this method [18]: small number emphasis (SNE), large number emphasis (LNE), number non-uniformity (NNU), second moment (SM) and entropy (ENT).

3.2 Radial Texture Algorithm (RTA)

Our proposal, Radial Texture Algorithm (RTA), was studied as the fourth algorithm. Figure 1 summarizes the flow chart of this algorithm.

Fig. 1.
figure 1

The flow chart of the proposed computational texture algorithm (RTA). (A) Input Image. (B) Largest area square inside of loin contour. (C) Selecting ratios. (D) Input grey level values in the matrix. (E) Computing features.

figure a

First, the image acquisition process obtained sets of MRI, in a high resolution (Fig. 1A). Once the images were acquired, the largest area square inscribed in the contour of the loin was selected as ROIs (Fig. 1B) [15]. Then, the center of the ROIs was calculated, and the grey levels for each pixels in each ratio (distance from the pixels to the center of the ROI) were gathered (Fig. 1C). After that, these grey level values were gathered in a matrix (Fig. 1D). Thus, the pixels with the same grey values and the same distance to the center of the ROI were assigned to the same cell, where the grey value is the column of the matrix and the distance to the center of ROI is the row of the matrix (Fig. 1E).

Finally, seven texture features were computed on each ROI (Fig. 1E), based on second order statistics [19]: Uniformity (UNI), Entropy (ENT), Correlation (COR), Homogeneity (HOM), Inertia (INE), Contrast (CON) and Efficiency (EFI). Table 1 shows the equations to calculate each feature from the values of the previous matrix. Algorithm 1 shows the pseudocode of the RTA algorithm.

Table 1. Texture features equations of RTA

The selection of the largest area square from the image ensure that our algorithm is invariant to translation. Thus, Fig. 2 shows the invariant rotation. Figure 2A shows an example image of the ROI and another one image with the selection of the center of the ROI with three pixels at a different distances from the center of the ROI. Figure 2B shows the image rotated 90\(^\circ \) to right. In this figure, the center of the ROI is the same that the example image, and also, the distance from the pixels to the center of the ROI. Therefore the matrix to compute the features is the same. This process avoid the rotation dependence. If the images were 90\(^\circ \) rotated to left, the result would be the same, as the matrix to compute the feature would be the same. Therefore, the RTA algorithm is invariant to rotation. This process also reduces the calculations required to process an image.

Fig. 2.
figure 2

Invariant rotation of the RTA algorithm. (A) Example image. (B) Rotate 90\(^\circ \) to right. (C) Rotate 90\(^\circ \) to left.

3.3 Prediction Analysis

The prediction of physico-chemical parameters was made as a function of computer vision features from GLCM, GLRLM, NGLDM and RTA algorithms. For achieving the prediction, data mining techniques were carried out, specifically, Multiple Linear Regression (MLR) [20]. MLR models the linear relationship between a target variable and more independent prediction variables, to produce a linear regression equation that can be used to predict future values. For this purpose, the free software WEKA was used (http://www.cs.waikato.ac.nz/ml/weka - last accessed June 2018). The M5 method was applied to select attributes and a ridge value of \(1.0 \times 10^{-4}\) was applied in the linear regression.

4 Results and Discussion

The predicted values based on the three classical texture algorithms and RTA were correlated to the real values obtained by physico-chemical analysis. Thus, the correlation coefficient (R) of equations were calculated (Table 2), and was used to evaluate the accuracy in the predictions. These results were analyzed taking into account the rules given by Colton [21], who considered the correlation values between 0 and 0.25 as little degree of relationship, from 0.25 to 0.50 as a fair degree of relationship, from 0.50 to 0.75 as moderate to good relationship and between 0.75 and 1 as very good to excellent relationship.

As can be seen in Table 2, according Colton [21], for physico-chemical parameters, all texture algorithms achieved very good to excellent correlations. RTA obtained slightly higher R values, for all physico-chemical attributes, than the remaining texture algorithms (0.988 for moisture, 0.883 for lipid content and 0.992 for salt content). In addition, the texture algorithms were previously validated in order to predict some physico-chemical parameters of loin [8]. Therefore, this fact could validate the use of RTA in order to predict quality traits from the loins.

Table 2. Correlation coefficients between some physico-chemical traits and texture algorithms
Table 3. Prediction equations obtained applying OPFTA algorithm

Table 3 shows the prediction equations of quality parameters of loin as a function of features obtained from RTA. As can be seen, there are six independent variables of the prediction equations for the RTA. In addition, only seven features were computed by RTA algorithm, while GLCM with slightly lower values of R, need to compute ten features. All these facts point out the suitability of RTA for MRI analysis in order to predict some quality traits of loin.

5 Conclusions

In this study, a new texture algorithm based on radial distribution and second order statistics has been proposed, developed and validated. The prediction of moisture, lipid and salt content of loins by applying the proposed algorithm on MRI have also been tested. Therefore, the use of this approach could be suitable for the meat industries in order to characterize meat products in a non-destructive, effective, efficient and accurate way.