Introduction

The use of edible films to coat food is a technique that allows for an extended shelf-life of food products, retaining their characteristics as minimally processed, a requirement of consumers who want healthy products. The components of edible films can be divided into three categories: polysaccharides, lipids, and proteins. Hydrocolloids such as polysaccharides and proteins, being very good gas barriers, tend to form hydrophilic networks (Olivas and Barbosa-Canovas 2005).

One of the most widely used polysaccharides is calcium alginate. When a liquid solution of sodium alginate is cross-linked with Ca+2 ions under controlled conditions, a hydrogel (called calcium alginate) that can increase the shelf-life of the coated food is formed, providing a moisture barrier, mechanical resistance, cohesiveness, and rigidity (Skurtys et al. 2009).

Alginate is a natural polysaccharide extracted from brown sea algae (Phaeophyceae) and is also synthesized from microorganisms (Martinsen et al. 1989; Vauchel et al. 2008). It is composed of two uronic acids: β-d-mannuronic acid and α-l-guluronic acid. Sodium alginate is composed of block polymers of sodium poly(l-guluronate), sodium poly(d-mannuronate), and alternating sequences of both sugars. The chemical composition and sequence of the blocks depend on the biological source (Bouhadir and Mooney 2002; Yang and Wright 2002).

The hydrogels formed by alginate are considered biocompatible (Klock et al. 1997; Schmidt et al. 1993). Alginate is known as a hydrophilic biopolymer that has a coating function because of its well-studied unique colloidal properties, which include its use for thickening, suspension forming, gel forming, and emulsion stabilizing. The water permeability and mechanical attributes of the calcium alginate can be considered as moderate compared to those of synthetic films (Zactiti and Kieckbusch 2006). Edible films prepared with alginate are appropriated to load additives and antibacterial compounds (Rojas-Graü et al. 2007a, b).

In the recent years, research efforts have been made to improve the mechanical and barrier properties of edible films and coatings, but few studies have focused on optical properties such as color or transparency (Skurtys et al. 2009). Indeed the color of foods is an important quality factor that greatly influences a consumer prior to purchase (Mendoza et al. 2006; León et al. 2006; Pedreschi et al. 2006). The main reason is that food is appreciated via its sensory properties and that vision is the most acute human sense. Moreover, consumers tend to associate color with flavor, safety, storage time, nutrition, and level of satisfaction due to the fact that color correlates well with physical, chemical, and sensorial evaluations of food quality. Thus, the biomaterials used to coat food should not be visually perceptible by consumers. In particular, the internal and surface film microstructures are two important parameters in the optical properties of the film. Indeed the intensity of light reflected by the coated food is determined both by the light directly reflected at the interface between the air and the coated food surface (specular reflection) and by the light re-emitted out of the surface in all directions after penetrating into the coating of the food and scattering internally (indirect reflection) (Villalobos et al. 2005; Fabra et al. 2009).

In laboratories, the color of edible films can be evaluated by a colorimeter or a colorimetric spectrophotometer. Moreover, the transparency of films can be measured through the surface reflectance spectra in a spectrocolorimeter. A good method to determine the transparency is the Kubelka–Munk theory (Hutchings 1999). In colorimetry, the CIELab color is the most popular color space where the parameters L is the luminosity, a the red–green scale, and b the yellow–blue scale. However, the most popular hardware-orientated space is the standard RGB (red, green, blue) space, so called because this is the way in which video cameras sense natural scenes (Russ 1999).

Since the color of edible films can be affected by various physical parameters such as thickness, microstructure, and surface concentration (film mass per unit of coated surface area), the design of edible films must be approached from an engineering perspective, selecting parameters of design to optimize the technology. The objective of this research is to select a surface concentration that would allow a design of edible films formulated with calcium alginate without affecting the colorimetric properties of the coated surface.

Materials and Methods

Preparation of Edible Film

Edible films were prepared using 2% w/v food-grade alginate solution (Loba-Chemie, India), which was sterilized at 121 °C. Then, glycerol (Sigma-Aldrich, USA) was added as plasticizer, in a proportion of 0.5 g per gram of alginate (Zactiti and Kieckbusch 2006).

Different volumes of alginate–glycerol solution were added on Petri dishes (21 cm2) at room temperature to obtain 16 alginate surface concentrations (mass/area) between 0.7 and 9.4 mg/cm2. Each alginate surface concentration was prepared three times, hence obtaining 48 independent samples (16 × 3 = 48).

The alginate–glycerol mixtures on Petri dishes were dehydrated in a forced convection oven at 40 °C during 12 h, forming uncross-linked films. The films were cross-linked upon addition of 10 ml CaCl2 solution (1% w/v) (Sigma-Aldrich, USA) for 30 min at room temperature. The excess solution at the surface was removed and washed with distilled water.

The cross-linked alginate films were studied in two states: hydrated and dry. The hydrated state (~90% moisture) was achieved by soaking the polymers in distilled water and the dry state (~20% moisture) by drying them at 40 °C.

RGB Image Analysis

To obtain the images of alginate edible film, the device made by León et al. (2006) was used. The images (2,272 × 1,704 pixels) were obtained by quintuplicate in RAW format with a Canon PowerShot G3 digital camera (Canon, Japan) using the following settings: focal length 140 mm (indicated as equivalent to a 35-mm camera), zoom ×4, ISO 100, aperture f/8.0, shutter speed 1/15 s, and fluorescent-H white balance. Illumination was achieved with four fluorescent lights (18 W, 60 cm in length; Philips), with a color temperature of 6,500 K and a color index (Ra) close to 95%. The lamps were located at 35 cm and 45° of the film surface. The distance between the camera lens and the sample was 20 cm. The complete device characterization can be consulted in León et al. (2006) and Pedreschi et al. (2006).

RGB image analysis was applied to model the edible films color. It was done with the ImageJ software (NIH, USA). ImageJ is Java-based, multithreaded, freely available, open source, platform-independent—a public domain image processing and analysis program developed at the National Institutes of Health.

The R, G, B, and RGB histograms were obtained using the following algorithm (for k = 0 to 255):

$$ \begin{array}{*{20}{c}} {{R_k} = \sum\limits_{{i = {1}}}^N {{l_k}{(}{r_i}{)}} } \\{{G_k} = \sum\limits_{{i = {1}}}^N {{l_k}{(}{g_i}{)}} } \\{{B_k} = \sum\limits_{{i = {1}}}^N {{l_k}{(}{b_i}{)}} } \\{{\hbox{RG}}{{\hbox{B}}_k} = \sum\limits_{{i = {1}}}^N {{l_k}{(0}{.299}{r_i} + {0}{.587}{g_i} + {0}{.114}{b_i}{)}} } \\\end{array} $$

where R k , G k , B k , and RGBk are the red, green, blue, and compound RGB values of bin k. r i , g i , and b i are the red, blue, and green levels of pixel i, quantized in eight bits. The total number of pixels is N = 3,871,488 (2,272 × 1,704). The expression l k (x) corresponds to the indicator function defined by:

$$ {l_k}{(}x{)} = \left\{ \begin{gathered} {\hbox{1 if }}x = k \hfill \\{\hbox{0 if }}x \ne k \hfill \\\end{gathered} \right. $$

The mean of each color field (R, G, B, and RGB) was estimated from their respective histogram:

$$ \begin{array}{*{20}{c}} {{\hbox{Mean Red}} = \frac{{\sum\limits_{{k = {0}}}^{{{255}}} {{R_k}k} }}{N}} \\{{\hbox{Mean Green}} = \frac{{\sum\limits_{{k = {0}}}^{{{255}}} {{G_k}k} }}{N}} \\{{\hbox{Mean Blue}} = \frac{{\sum\limits_{{k = {0}}}^{{{255}}} {{B_k}k} }}{N}} \\{{\hbox{Mean RGB}} = \frac{{\sum\limits_{{k = {0}}}^{{{255}}} {{\text{RG}}{{\text{B}}_k}k} }}{N}} \\\end{array} $$

The camera used in this research follows the sRGB standard (Poynton 2003), which is a subset of the famous CIE-1931 xy color system. The RGB compound histogram corresponds to the projection of the RGB values to the gray scale (Billmeyer and Saltzman 1966).

RGB calibration was made using black and white patterns corresponding to the (255, 255, 255) and (0, 0, 0) color scales, respectively (Acevedo et al. 2009a). Since each RGB primary color is represented by a vector (Poynton 2003), linear calibration of each color (red, green, and blue) was used. The calibration procedure was checked using two light sources (fluorescent and daylight) over RGB and CMYK color charts obtaining variation coefficients less than 1% for each color mean.

Structural Analysis

Samples of films were fixed in Bouin’s solution for 24 h, dehydrated, and embedded in Paraplast-Plus (Sigma-Aldrich, USA). Serial sections of 5-μm thickness were obtained with a microtome, mounted on xylene-coated microscope slides, deparaffinized, and rehydrated. The sections were stained with a modified Arteta trichrome stain (hematoxylin/erythrosine B—orange G/methyl blue) (Acevedo et al. 2009b). The images of the samples were taken using a light microscope (Leica, Germany).

Microbial Contamination

As a simple model of microbial contamination, the edible films were inoculated with food-grade yeast (Saccharomyces cerevisiae; Fermentis, France). The yeasts (dry mass) were hydrated in water for 1 h to obtain a cell solution of 100 mg/ml.

Uncross-linked films prepared and dried on Petri dishes were inoculated with different volumes of the yeast solution to obtain five cell densities between 0.3 and 1.4 mg of dry biomass per square centimeter. The yeasts were homogenized using the standard microbiology technique of sowing on Petri dishes (e.g., sowing on agar). Then, the samples were cross-linked using CaCl2 solution (1% w/v) (Sigma-Aldrich, USA) for 30 min, obtaining hydrated films inoculated with a homogeneous population of yeasts. The gentle cross-linking conditions using 1% CaCl2 did not affect the yeast viability (Almonacid et al. 2010). Only hydrated films were used in order not to alter the yeast viability.

Water Vapor Transmission

Since the mass transfer properties of the edible films are critical to design the coating process, the water vapor transmission (WVT) was estimated. WVT was determined at 30 °C using a gravimetric method based on ASTM standard E96 (ASTM 1989) with minimal modifications to work with edible films (Zactiti and Kieckbusch 2006; Jongjareonrak et al. 2006). Six replicates of each film were tested.

Other Physical Analysis

Moisture was measured in triplicates using a Moisture Analyzer model MS-70 (AND, USA).

To determine the swelling, distilled water was added to 4 cm2 of edible film. After each water addition (100 μL), the sample was weighed using an analytical balance to constant weight. Analysis was made in triplicates.

The thickness of edible films was measured with a micrometer (Mitutoyo, Japan). The average thickness corresponds to nine measurements (one in the center and two in each quadrant).

Multivariate Analysis

Multivariate statistics were performed using the Multiexperimental Viewer (TM4) software (Saeed et al. 2003).

The calculus of the Support Vector Machine (Boser et al. 1992) model was performed using the LibSVM software (Fan et al. 2005).

Results and Discussion

Characterization of Edible Film

Alginate–glycerol films in dry (~20% moisture) and hydrated states (~90% moisture) were prepared. Edible film thickness is directly proportional to surface concentration (mass/area) (p < 0.05) (Fig. 1), indicating a gentle cross-linking contraction. The hydration has a significant effect (p < 0.05; ANOVA) on the edible films’ thickness. It is known that the increase in thickness is produced by a structural expansion effect of the hydrophilic polymer (Park et al. 1993). Also, hydration has a plasticizing effect, increasing the free volume and molecular mobility (Bertuzzi et al. 2007; Rojas-Graü et al. 2007a; Cisneros-Zevallos and Krochta 2003).

Fig. 1
figure 1

Thicknesses of edible films in hydrated and dry states. Segmented lines represent confidence intervals (p < 0.05)

It is known that hydration and thickness changes in biopolymers can modify their physical properties (McHugh et al. 1993; Rhim 2004). Therefore, other properties such as morphology and color can also be modified. Figure 2 shows a transversal microstructure analysis (light microscope) and their surface RGB analysis (digital camera). The morphology of both films is similar; it indicates that a possible change in surface color is not a consequence of structural variations. This structure is achieved due to the cross-linking with Ca+2 ions, obtaining the traditional model called “egg box” (Grant et al. 1973) where the alginate chain builds a stable and very sorted structure with the calcium cation (similar to an egg box shape).

Fig. 2
figure 2

Structure analysis of edible films and their surface RGB analysis. Left, images correspond to transversal film section staining with Arteta technique (see “Materials and Methods”) and do not represent the surface color. Right, RGB histograms of the film surface color. a Edible film with a thickness close to 100 μm. b Edible film with a thickness close to 20 μm

The RGB image analysis shows that there is a relationship between color and alginate surface concentration, making it possible to study physical variables by surface color. Other authors have used the RGB model to study food properties (Yu and MacGregor 2003; Lana et al. 2006; Tanska et al. 2005; Acevedo et al. 2009a).

Alginate Surface Concentration and RGB Color

To analyze the color changes of the edible films in relation to their degree of hydration and alginate surface concentration, a RGB image analysis was carried out.

Figure 3 shows the results of the RGB analysis as a function of surface concentration and hydration. There is a zone in which the color does not change with alginate surface concentration (p > 0.05) and another zone in which the color is directly inversely proportional to surface concentration (p < 0.05). The limit between both zones is a surface concentration of 2.4 mg/cm2. This limit establishes a design concentration for biofilms. Then, it is possible to design alginate-coated foods without changing the surface color while maintaining the physical properties of the edible film. On the other hand, the hydration did not show a significant effect on the color of the edible film (p > 0.05; t-test).

Fig. 3
figure 3

RGB analysis of edible films at different alginate surface concentration. Gray color indicates the zone without significant variation (p > 0.05). a Mean red. b Mean green. c Mean blue. d The RGB mean

Microbial Contamination

A problem that may appear in the design of edible films is that the biopolymer may mask the visual signs of mold and yeast growth. Acevedo et al. (2009a) determined that yeast growth in alginate produces significant variations in the surface color. Therefore, the color changes caused by yeast on edible films at the design concentration (2.4 mg/cm2) were evaluated. A linear relation was obtained (p < 0.05) (Fig. 4) with increase in biomass. Since a color change was observed, it is likely that the film did not mask the microbial contamination. The latter scenario only applies to homogeneous films and we cannot predict the color response when microorganisms grow on non-homogeneous films. The interaction between biomass and surface concentration distribution in non-homogeneous films must be investigated in order to extrapolate to other cases.

Fig. 4
figure 4

RGB analysis of edible films at different biomass contamination. a Mean red. b Mean green. c Mean blue. d The RGB mean

Validation of the Design Concentration

To validate our proposed design concentration (2.4 mg/cm2), two questions need to be answered: (a) Is it possible to obtain an alginate surface concentration of 2.4 mg/cm2 using the standard soaking method? (b) Are the physical properties of the edible film adequate using the design concentration?

To answer the first question, four food products (meat, clam, blueberry, and apple) were soaked in different solutions of alginate–glycerol and then in a CaCl2 solution (1% w/v) (Fig. 5). A 2% alginate solution permits to obtain an alginate surface concentration lower than 2.4 mg/cm2. Images of these four types of food (before and after soaking) were taken using the same procedure described. The RGB analysis of the four types of food showed that there were no significant color changes (p > 0.05) when using an alginate surface concentration lower than 2.4 mg/cm2.

Fig. 5
figure 5

Alginate surface concentration on food. Segmented line represents the design concentration (2.4 mg/cm2). The data are the average of five samples. a Meat. b Clam. c Blueberry. d Apple

To answer the second question, swelling and water vapor transmission were evaluated in edible films prepared with the design concentration (2.4 mg/cm2) and a surface concentration in the color change zone (>2.4 mg/cm2). No significant differences (p > 0.05; t-test) in swelling were found (Fig. 6). The maximum amount of liquid sorption was 2.4 mL/mg film (Table 1). Zactiti and Kieckbusch (2006) reported a similar swelling behavior for alginate films cross-linked with calcium (2 to 3 mL/mg). In addition, no significant differences (p > 0.05; t-test) in WVT were found (Table 1) at equivalent hydration states. The WVT obtained were similar to those of other authors (Parris et al. 1995; Rhim 2004; Olivas and Barbosa-Canovas 2008).

Fig. 6
figure 6

Swelling of edible films for two alginate surface concentrations

Table 1 Physical properties of edible films for two alginate surface concentrations

RGB Color Model to Study the Alginate Surface Concentration

RGB values of dry and hydrated edible films were first modeled using cluster analysis. These statistical techniques group similar observations based on the behavior of the variables, in this case intensities of red, green, and blue fields of the RGB model. Figure 7b, d show the results of the cluster analysis. Three conglomerates were obtained with dry edible films and four conglomerates with hydrated films. The films with design concentration (<2.4 mg/cm2) remained separated from the films that modify the color (>2.4 mg/cm2). The latter indicates that the optical response of the films prepared with the recommended design concentration is appreciably different from other surface concentrations. In addition, the behaviors of each edible film were studied by multiple linear regressions using the RGB color fields as predictors (independent variables). With a multiple linear regression, it is possible to compare the experimental and the predicted values in both dry and hydrated edible films, hence obtaining a significant correlation (p < 0.05) (Fig. 7a, c).

Fig. 7
figure 7

Multivariate modeling of edible films using RGB data. a Regression analysis to dry film. b Cluster analysis to dry film using Pearson’s distance (a, b, c show individual clusters). c Regression analysis to hydrated film. d Cluster analysis to hydrated film using Pearson’s distance (a, b, c, d show individual clusters)

A second approach was to use a Support Vector Machine (SVM) (Boser et al. 1992) to automatically classify films that modify the color of a coated surface. Two models were generated, one for hydrated and one for dry films. To train each model, half of the samples were used while the other half were kept for testing. The SVM showed 100% accuracy in both dry and hydrated films. Then, using the function f(x) and the color information (mean of R, G, B, and RGB histograms), it is possible to classify new samples into two groups (if f(x) is positive or negative, respectively) as follows: \( f(x) = {\hbox{sign}}\left( {\sum\limits_{{i = 1}}^7 {{\alpha_i}K({x_i},x) + b} } \right) \), where \( K({x_i},x) = \exp \left( { - \gamma {{\left\| {{x_i} - x} \right\|}^2}} \right) \). The coefficient “b” for dry and hydrated films is −0.370 and −0.303, respectively. The coefficient “γ” is 0.250 for the dry and hydrated models. The support vector “x i ” and the coefficient “α i ” are shown in Table 2.

Table 2 Parameters of support vector machine models

So, it is possible to model the alginate surface concentration of the edible film using digital image analysis, providing a non-destructive on-line method of analysis of the physical properties.

Conclusions

There is an alginate surface concentration that does not change the color of food coated with an edible film. This parameter allows the designing of alginate–glycerol films. Also, the design concentration would not mask yeast growth.

It is possible to model the alginate surface concentration as a function of surface color using the RGB model, allowing the study of the polymer thickness. By modeling alginate surface concentration and color, it is possible to predict the physical properties of the edible film, generating non-destructive methods of analysis for the application of biopolymer-coated food materials.

The techniques used in this work, such as clustering and Support Vector Machines, can be easily integrated by software in a computer. This would allow an automatic on-line control. The RGB histograms require a computational complexity of O(n) (where n is the number of pixels in the image). Since the number of pixels is fixed by the camera used (and can be reduced by selecting a different camera), the RGB histogram processing time is fixed and could be further decreased by increasing the CPU speed in the machine processing the image. The robustness of the methods used depends on constructing a setup where the illumination is carefully reproduced. Small variations in illumination or in the image produced for a different camera can be solved by training the SVM classifier with a new training set obtained in situ. This implementation will be part of further studies.