Keywords

1 Introduction

Computer vision techniques have been widely applied in many industrial processes and several engineering fields such as robotics, industrial image processing, food processing and other fields. Some advantages that promote computer vision techniques in food engineering are the possibilities for non-destructive evaluations, easy procedures for applications, quickness when performing the analysis process [1,2,3]. Computer vision algorithms extract information from the images by using different methods. Among all of them, texture algorithms can obtain information from the images that can be used to evaluate features described by the textures, by using co-occurrence matrix (GLCM), differences of neighbourhoods matrix (NGLDM) and run-length matrix (GLRLM) [4].

Magnetic Resonance Imaging (MRI) and computer vision techniques have been proposed as an alternative to the traditional analytical methods for determining physico-chemical traits related to dry-cured hams. These traditional procedures are laborious, time and solvent consuming and require the destruction of the meat sample, in contrast to MRI, which is non-destructive, non-invasive, non-ionizing and innocuous. Several studies have been carried out to evaluate the quality characteristics of dry-cured products by MRI, most of them on hams, allowing to monitor the ripening process of Iberian [5], Parma [6], and San Daniele [7] hams.

The extraction of textural information is very common to explore parameters related to meat quality. Ávila [8] analyzed marbling and fat level in Iberian loin based on texture features of MRI. Recently, Pérez-Palacios applied texture analysis to predict moisture and lipids content of hams [9] and classified different Iberian hams as a function of the feeding background of the iberian pigs [10, 11]. Jackman et al. [12, 13] proved the efficiency of the computer vision techniques to solve problems related to food technology.

In several of these studies on hams, high-field MRI scanners were used to acquire the images from the ham [9,10,11]. This type of scanners provide a high quality image but they also have a very high cost. Low field systems are cheaper but give lower signal to noise ratio. In order to maximize the quality of the images, an adequate configuration of the image acquisition must be done previously [14].

The objective of this paper is the prediction of quality traits of Iberian ham, based on studying the texture features obtained from MRI by using a low field scanner. The results of this computational prediction will be compared to the quality results obtained by traditional techniques, expecting that correlations between both sets of results were reasonably high. Noting that this is the first study carried out on Iberian hams by using a low-field MRI scanner.

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 one hundred and twenty dry-cured Iberian hams were acquired, which were divided in ten different batches as shown in Table 1, as a function of the feeding background of the Iberian pigs. The images 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 back coil. Sequences of Spin Echo (SE) weighted on T1 were applied with a echo time (TE) of 26 ms, repetition time (TR) of 910 ms, field of view (FOV) of \(150 \times 150\) mm\(^2\), slice thickness of 4 mm, a matrix size of \(240 \times 240\) and 17 slices per sample were obtained. Two thousand and forty 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 \mathrm{C}\).

Physico-chemical analysis on hams were determined by traditional techniques in order to obtain values of the following quality traits: moisture, water activity, instrumental color coordinates (L, a*, b*) and salt content. Those values indicate the quality of the hams and were obtained to test the ability of the low-field MRI systems in order to non-destructively evaluate the quality of the dry-cured hams.

Table 1. Distribution of Iberian dry-cured hams and the feeding background of the pigs for each batch.

3 Methods

Figure 1 illustrates the experimental design of this study. MRI were acquired from the Iberian hams, and then were preprocessed to recognize different muscles of the hams. Particularly, the biceps femoris muscle was selected for the experiments in this study [15, 16]. When all the MRI were acquired from the hams, physico-chemical analysis were performed on the hams as described in Sect. 3.1, obtaining a database of traditional results.

On the other hand, texture features of hams were estimated by using the GLCM, NGLDM, and GLRLM algorithms [4] on the pre-processed MRI as explained in Sect. 3.2. These results were stored on a database of computational results.

Finally, predictive techniques were applied on the traditional and computational data, to obtain prediction equations that allow computing the quality parameters from the computational features. Section 3.3 explains this procedure.

Fig. 1.
figure 1

Experimental design

3.1 Physico-Chemical Analyses

The physico-chemical attributes of dry-cured Iberian hams were determined by means of traditional physico-chemical analysis methods in order to obtain values for moisture [17] and salt content [17]. The water activity was determined by applying the system Lab Master-aw (NOVASINA AG, Switzerland) and the instrumental color coordinates (L, a* and b*) were measured by using a Minolta CR-300 colorimeter (Minolta Camera Corp., U.S.A.).

3.2 Computer Vision Techniques

As mentioned before, this is the first study on dry-cured Iberian hams using MRI images from a low-field scanner. The quality difference between the images from high-field and low-field scanners implies that the preprocessing stage must be mandatory before the application of the texture algorithms. Those differences can be seen in Fig. 2.

For the preprocessing stage, the images for each batch were separated. After applying several segmentation techniques, a set of contours was obtained. The selection of all countours was carried out by using the most generic template in the next step.

Fig. 2.
figure 2

High-field Image on the left, low-field on the right

An application was developed for extracting for each image the biceps femoris and its contour. This application load a generic contour from a set of contours obtained in a preliminary study and allows the user to manipulate it. The user can modify the size or rotate the contour template to fit better the image. In Fig. 3 it can be see how this application looks like.

Fig. 3.
figure 3

Screenshot from the application

After this process, the image of the biceps femoris and its contour are used to obtain the largest rectangle inside the biceps, that will be the region of interest (ROI) for the application of the texture algorithms [15].

GLCM [18] 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 with gray level j, in all 2D directions: \(0^{\circ }\), \(45^{\circ }\), \(90^{\circ }\) and \(135^{\circ }\). These co-occurrences are accumulated into a single matrix, from which all the textural features are extracted. The features were: energy, entropy, Correlation, Haralick’s Correlation, IDM (inverse difference moment), inertia, CS (cluster shade), CP (cluster prominence), Contrast and Dissimilarity.

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 [21]. In this method, the neighbouring are square and the dimension of these square are \(3 \times 3\) and the distance d (d = 1) between neighbouring pixels. 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. The measures were: SNE (small number emphasis), LNE (large number emphasis), NNU (number non-uniformity), SM (second moment) and ENT (entropy).

GLRLM [19] includes runs into the image, i.e., a set of consecutive pixels in the image with the same gray level value. A large number of neighbouring pixels of the same gray level represents a coarse texture, a small number of these pixels represents a fine texture, and the lengths of the texture primitives in different directions can serve as texture description [20]. The runs with the same gray level were computed in four different directions: \(0^{\circ }\), \(45^{\circ }\), \(90^{\circ }\) and \(135^{\circ }\). The features applied were: SRE (short run emphasis), LRE (long run emphasis), GLNU (gray level non-uniformity), RLNU (run length non-uniformity), RPC (run percentage), LGRE (low grey-level run emphasis), HGRE (high grey-level run emphasis), SRLGE (short run low grey-level emphasis), SRHGE (short run high greylevel emphasis), LRLGE (long run low grey-level emphasis), and LRHGE (long run high grey-level emphasis).

Table 2 shows the texture features that will be extracted and used for the prediction stage.

Table 2. Texture features for each algorithm.

3.3 Predictive Techniques

Predictive techniques of data mining were applied on a database constructed with results from physico-chemical analyses and computational texture features. The free software WEKA was used (Waikato Environment for Knowledge Analysis - Available for downloading from: https://www.cs.waikato.ac.nz/~ml/weka/downloading.html - last access: April 2019).

Multiple linear regression (MLR) was applied, which models the linear relationship between a target variable and more independent prediction variables [22]. The M5 method of attribute selection and a ridge value of \(1 \times 10^{-4}\) were applied [23]. It is based on stepping throughout the attributes, being the one with the smallest standardized coefficient removed until no improvement is observed in the estimation of the error.

To validate the prediction of the quality traits, the 10-fold cross-validation was used, and the correlation coefficient R was calculated to evaluate the goodness of the obtained equations.

4 Results and Discussion

Table 3 shows the correlation coefficients (R) of the prediction equations obtained by applying MLR for moisture, water activity, NaCl and instrumental color coordinates (L, a*, b*). These results were analyzed taking into account the rules given by Colton [24], who considered 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.

Table 3. Correlation coefficients for each quality trait studied.

As can be seen in Table 3, according to Colton [24], the moisture and the water activity reached values close to 0.75 would indicate that are very good correlated with the features of the images, the salt content, L and a* achieved a good relationship and a fairly correlationship on the b* instrumental color values.

Table 4 shows the prediction equations of the quality traits of hams as a function of the texture features obtained from GLCM, NGLDM, and GLRLM. As can be seen, each equation use around fifteen independent variables except for the moisture one that uses twenty and the salt content that uses twelve. In addition, twenty five different texture features from the total of twenty six texture features are used.

Table 4. Prediction equations for each quality trait studied.

5 Conclusion

This work firstly demonstrates the capability of using low-field MRI for the image acquisition of dry-cured Iberian hams as it is the first time this type of scanner is used to this purpose. The analysis of these MRI images by computational texture features and the application of data mining techniques allow the prediction of moisture, salt and water activity with good results. 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.

In further researches, different computer vision algorithms will be tested to improve the results of the predictions of the quality traits, moreover, the number of quality traits predicted could be increased.