1. Introduction
An increased consumer interest in functional foods is observed, which is a result, among others, of increasing health awareness, as well as a better understanding of the mechanisms of action of many of the active ingredients [
1,
2,
3]. Functional food contains pharmacologically active ingredients that have a beneficial effect on health, especially in the context of chronic diseases, such as diabetes, osteoporosis or overweight [
1]. The concept of functional food is not explicit, both in terms of a definition and legislation. Nevertheless, it is assumed that the term functional food is a hybrid of food and pharmaceuticals [
4].
Despite the fact that the legal conditions for functional food are not clear and the benefits of its use are not obvious, this market is one of the most dynamic in the world, with an average turnover growth rate of 9.6% per year. The largest functional food markets are the United States, followed by Japan and Canada, with the US functional food industry valued at
$ 98.9 billion [
4].
It should be noted, however, that there are no specific legal provisions regarding the regulations related to the production of functional food [
4]. An important problem that appears in the context of functional food is primarily the homogeneity of the dose of active ingredients. From a technological point of view, it is quite easy to control the total dose of pharmacologically active ingredients with which a food product is enriched by adding a constant, known mass of the active ingredient. The problem, however, is the evaluation of the distribution of the active ingredients throughout the product volume, especially for those products that are subject to splitting. In this case, if the ingredients are unevenly distributed throughout the food, it may result in an overdose if the patient/consumer uses a fragment where more of the active ingredients have accumulated. Therefore, methods are sought that would allow the assessment of the distribution of active ingredients in the entire sample volume. Such a method is expected primarily to provide accuracy, repeatability, non-invasiveness of the product, low measurement costs and relatively fast analysis [
5,
6,
7]. Indicating that the proposed methodology is low-cost means that it should be compared to alternative methodologies, e.g., mass spectroscopy, where in order to assess the homogeneity of API distribution, it is necessary to perform several/several dozen tests of a single sample.
A product that is increasingly enriched with pharmacologically active ingredients is chocolate.
Chocolate is a product that is defined in Directive 2000/36/EC of the European Parliament and of the Council of 23 June 2000 [
8], relating to cocoa-based and chocolate products intended for human consumption. Under this definition, dark chocolate should contain not less than 43% total dry cocoa solids, including not less than 26% cocoa butter, and 30% and 18% in milk chocolate, respectively.
The fat content allows for the introduction into the chocolate mass of fat-soluble substances, such as vitamins D and K, while the cocoa mass can be supplemented with mineral substances.
The purpose of this work is to determine the possibility of using computer microtomography to assess the homogeneity of the distribution of pharmaceutical active ingredients throughout the chocolate.
2. Material and Methods
2.1. Material
It is very difficult to assess the homogeneity of API distribution in chocolate, because it changes its physicochemical form during the technological process. At the conching stage, the chocolate and API are mixed which allows for homogenization. However, as the chocolate cools, mixing is not possible and ingredients with different densities (especially API) may be unevenly distributed throughout the volume of the chocolate.
Four chocolate samples were prepared using technology that reflected all of the stages of the production process:
- (a)
Sample GF—bitter chocolate sweetened with fructose;
- (b)
GFV sample—dessert chocolate sweetened with fructose enriched with calcium and vitamins D3 and K2;
- (c)
MF sample—milk chocolate sweetened with fructose;
- (d)
Sample SK—cream chocolate sweetened with xylitol.
As a source of calcium, raw material from calcified red sea algae (Lithothamnion calcareum) was used. This raw material contains 34–35% calcium. The raw material derived from the marine algae contains various polymorphic forms of calcium carbonate in the proportion calcite: aragonite: vaterite = 65:23:12, which is to provide a unique spatial structure and be the key to the beneficial technological properties of this raw material. The most popular component of calcium carbonate, E-170 (CaCO3), has not met technological expectations due to adverse organoleptic properties.
Vitamin D3 and K2 were used as the pharmacologically active ingredients. These raw materials were used in a dispersed form in the carrier. After technological tests, the raw materials with carbohydrate and fat carriers were selected.
2.2. Computed Microtomography
The methods of analysis and processing of microtomographic scans were used to quantify chocolate parameters. The computer Phoenix vltomelx, General Electric, USA was used to acquire the 2D images of the chocolate samples by microtomography. The chocolate samples placed on a polymer base were scanned at 130 kV. After passing through the sample, the X-rays were converted to visible radiation using a YAG: Ce scintillator, which allowed the recording of the image with a resolution of 2024 × 2024 pixels. A total of 2260 scans were recorded for each chocolate sample with a total scan time of 120 min and a current intensity of 160 μA. In total, 9040 two-dimensional microtomographic scans were recorded for four chocolate samples. Due to the fact that a small number of initial and final scans (about 30 for each sample) did not contain chocolate images, 8910 scans were sent for further analysis.
The microtomographic projections were acquired every 0.4° with a total object rotation of 180°. To improve the signal-to-noise ratio, measurements were averaged over every four acquisitions made at each chocolate turnover step. The parameters set in this way allowed the recording of an image with optimal contrast with a resolution of 5 μm.
Each chocolate sample was scanned with the Micro-CT HA Phantom D32 density sample. The template contained five density standards, corresponding to: H0 1.13 g/cm3 ± 0.5%; HA50 1.17 g/cm3 ± 0.5%; HA200 1.27 g/cm3 ± 0.5%; HA800 1.56 g/cm3 ± 0.5%; and HA1200 1.90 g/cm3 ± 0.5%. Stencil parameters were optimized for pre-determined chocolate densities.
The degree of absorption of the X-rays is proportional to the density of the object. In turn, the density of the object is reflected in the microtomographic scan as an adequate level of gray. Thus, the darker the object (area) on a microtomographic scan, the higher its density and, by analogy, the lighter color corresponds to less dense objects. The use of high resolution computer microtomography, supported by advanced methods of image analysis and processing, allows for the determination of the homogeneity of the distribution of chocolate ingredients of different density. Thanks to this, it is possible to identify the distribution (homogeneous/non-homogeneous) of the active pharmaceutical ingredients (API) in the whole chocolate volume because their density differs from the chocolate density. The homogeneous distribution of active ingredients is one of the most important conditions determining the possibility of producing pharmacologically enriched products. It should be emphasized that no other method can identify the precise distribution of the API throughout the sample volume.
For the projection acquisition and image reconstruction, the scanner manufacturer’s software—Datos 2.0—was used.
2.3. Methods of Image Analysis and Processing
The following image analysis and processing methods were used to quantify the distribution of API throughout the chocolate volume:
The above methods of image analysis and processing are known, but their application is new.
2.3.1. Brightness Analysis
Brightness analysis was conducted using the ImageJ (National Institutes of Health Laboratory of Optics and Computational Instrumentation, University of Wisconsin, Madison, WI, United States) program.
Before determining the degree of brightness of the image or part of it, all of the recorded microtomographic scans were normalized. The normalization of the recorded images consisted of identifying the lightest and darkest pixel in the entire set of recorded images. The brightest pixel was assigned a brightness of 1, while the darkest was assigned 0. This allowed the changes in the pixel brightness to be brought to the full range of gray levels (range from 0 to 255). In this way, the average brightness for each of the microtomographic scans was determined for each chocolate sample. At the same time, the degree of gray of the obtained density standards was determined, which was recorded in parallel with the tested samples. On this basis, the average density of the samples tested was identified.
2.3.2. GLCM
The GLCM analysis consists of contrast and homogeneity. These parameters are negatively correlated with each other.
The GLCM analysis, i.e., the gray level co-occurrence matrix, determines how many times a pixel of a given brightness is adjacent to a pixel of a different brightness. In the GLCM analysis, the pixels located in the immediate vicinity are most often analyzed. The GLCM functions enable accurate, numerical image texture characteristics to be identified by calculating the frequency of the coexistence of pixel neighborhoods with arbitrarily determined gray level differences. In the GLCM matrix, the number of columns and rows is equal to the number of gray levels (G). Image analysis can be completed in different directions: vertical (90°), horizontal (0°) and diagonally (45 or 135°) (
Figure 1).
Before generating the matrix, you must specify the offset d, i.e., the distance between the pixels and the angle θ at which they will be analyzed. In this study, the horizontal pixels (θ = 0°) were tested, located in the immediate vicinity (d = 1). In practice, this means that the matrix x row and column y contain information about how often a pixel with a certain gray level (brightness) is located directly to the right of a pixel with a different, defined gray level. It numerically identifies the
p element of the matrix, which informs of the frequency with which the two pixels separated by a distance (Δx, Δy) occur in a given neighborhood. In summary, the GLCM contrast identification allows quantifying whether the image is homogeneous or not (
Figure 2).
The derivative of the GLCM contrast is image homogeneity. In the proposed research model, homogeneity is understood to mean:
where:
i is the brightness of the test pixel;
j is the brightness of the adjacent pixel.
The number of neighborhoods occurring between the individual pixel brightness values is stored in GLCM by determining the number of neighborhoods between the pixels with brightness “1” and “0”. In the case analyzed below, “1” corresponds to a black pixel and “0” to a white one. Then, the contrast is calculated, based on the GLCM. The analysis of the results for the sample, artificial images gave the results shown in
Figure 3. The artificial images were chosen in such a way so that the total number of white and black pixels was almost equal. For the image (b), the contrast is very high (0.503) and the homogeneity very low (0.145), while for the image (a) the contrast is small (0.0109) and the homogeneity high (0.904). This is also reflected in the GLCM shown in the Tables. The number of neighborhoods of pixels “1” > “0” for the image (a) is only 56—this is one of the edges of the white square. For the image (b), there are 2251 neighborhoods of pixels “1” > “0”—this is due to the large number of white pixels with an adjacent black pixel. This method enables the quantification of the contrast in the ROI, thus it allows for the qualitative determination of the homogeneity degree of the distribution of API in the chocolate. In the above example, a two dimensional model (0.1) was used, while in the analyzed case an
n-dimensional model was applied, where
n is the number of gray levels in a micro tomographic image (image bit depth).
Homogeneity, in the same way as with the GLCM contrast, is used to assess image uniformity. The higher the homogeneity, the more homogeneous the image is; it contains fewer neighboring pixels with different levels of gray, which corresponds to areas of different density.
2.3.3. Quadtree Decomposition
Quadtree decomposition (QTDECOMP) divides the image into four equal-sized square blocks, and then tests each block to see if it meets a certain homogeneity criterion. In this case, the homogeneity criterion is understood to be arbitrarily assumed image brightness (which corresponds to the density of objects). If the block meets the criterion, it is not further divided. If it does not meet the criterion, it is again divided into four blocks, and the test criterion is applied to these blocks. This process is repeated iteratively until each block meets the criterion. The brightness value of 1 was assumed as the threshold for decomposing the division. For this arbitrarily adopted value, the most representative quantitative results of the analysis were obtained.
The GLCM and QTDECOMP analyses were performed using MATLAB Version 7.11.0.584 (R2010b). To this end, dedicated image analysis and processing algorithms were designed.
2.3.4. Hyperspectral Imaging
To assess the homogeneity of the API distribution, the SPECIM IQ, SPECIM, Finland hyperspectral camera was used. It allowed for the acquisition of images in the spectral range of 400–1000 nm with a spectral resolution of 5 nm and a spatial resolution of 512 × 512 with a pixel size of 17.58 × 17.58 μm. The images were recorded from a distance of 30 cm with the use of a lens with a focal length of 21 mm.
The images were recorded with a reflectance standard using an optimized lighting system consisting of two halogen lamps with flat spectral characteristics in the wavelength range of 400–1000 nm. The above spectral range has been proposed because it allows to identify all of the chocolate ingredients and the API. The integration time for the lighting system used was 16 ms for a single frame.
The acquisition of the examined chocolate images was carried out in parallel with the acquisition of the reference panel which allowed the determination of the absolute reflectance of materials in the investigated wavelength range.
The files were saved in a * dat format and then converted to a * mat format for analysis in the MATLAB environment. On this basis, for all of the tested materials the dependence of the reflectance on the length in the hyperspectral camera operation range of 400–1000 nm was determined.
Each cube of chocolate was cut into six equal parts according to the longest axis of the sample with a guillotine. Thus, six surfaces were obtained, for which hyperspectral data were recorded. Trying to cut the chocolate into more pieces caused the disintegration of the samples.
The idea of using a hyperspectral camera to assess the distribution of API throughout the whole volume of chocolate is as follows:
The maximum, average and minimum reflectance over the entire surface of a single slice of chocolate was assessed. The greater the difference between the maximum and minimum values, the less homogeneous the API distribution is within one slice. The quantitative analysis included the mean difference between the minimum, average and maximum reflectance in the study area. It allowed for the assessment of the homogeneity of the distribution of ingredients within one slice; the greater the difference between the maximum and minimum reflectance, the less homogeneous is the distribution;
The hyperspectral profile (mean reflectance) for individual chocolate slice was compared. The greater the difference in the hyperspectral profile, the less homogeneous is the distribution of the chocolate ingredients. The quantitative analysis included differences in the reflectance for individual profiles (
Figure 4). This allowed for the determination of the distribution of the ingredients within the entire volume of chocolate; the greater the standard deviation from the mean, the less homogeneous is the distribution.
4. Discussion
One of the most important aspects of the production of food enriched with pharmacologically active ingredients (API) is the homogeneity of their distribution throughout the products’ volume.
The distribution of the active ingredients in functional food can be analyzed using chemical analysis methods or image analysis and processing methods.
The chemical analysis methods used to determine the distribution of active ingredients require sampling from various locations of the product being analyzed. The most commonly used methods are infrared spectroscopy [
9,
10,
11] and Raman spectroscopy [
12,
13,
14,
15].
The greater the number of samples taken, the better the measurement accuracy is. However, especially for relatively small objects such as chocolate cubes, it is not always possible to collect a large number of samples. Furthermore, sampling from a three-dimensional object then requires a precise identification of the sampling location in 3D space to reconstruct the object and assess the homogeneity of the API distribution. In view of the above, classical methods of chemical analysis do not work well in assessing the distribution of API in the entire volume of the product.
Imaging methods show much better efficiency in identifying the homogeneity of API distribution in the entire product volume. For this purpose, 3D analysis methods and hyperspectral imaging are most commonly used.
There are two basic types of measurements performed on the images. Some identify the entire image structure represented, while the others relate to the analysis of individual, segmented specific objects in the image. Nevertheless, regardless of the analyses carried out, the identification of the homogeneity of the distribution of API, especially in food products, faces a number of difficulties. The first difficulty is the assessment of the API distribution throughout the product volume using the image in 2D space. In this case, the appropriate number of images (sections) from the entire sample to obtain isotropicity should be acquired, to achieve a uniformity and randomness of the samples. This requires invasive action and slicing of the sample in most cases. For some samples, such as chocolate, just cutting it may cause false results.
In addition, determining the number of objects in a sample, necessary to assess homogeneity, is more complicated when analyzing 2D images because a planar section is more likely to intersect large objects than small ones. This problem can be eliminated by full 3D reconstruction. On the other hand, 3D reconstruction requires a very high number of sections to be accurate.
To determine the distribution of the API, you can analyze objects in 2D and 3D space. In these studies, it was decided to analyze individual microtomographic cross-sections in 2D space. This is because the 3D reconstruction causes additional errors that can add up and make the results less reliable. Therefore, 2260 microtomographic images were analyzed.
Similar problems are encountered by both hyperspectral imaging and other methods of chemical imaging, e.g., NIR or Raman. This is due to the fact that the radiation permeability of the material used in chemical analysis methods is limited. For most food products, including the analyzed chocolate, the transmittance of radiation with a wavelength from several hundred nm to several micrometers is below 1 mm. Therefore, to obtain a full 3D reconstruction of the image and assess its homogeneity, it would be necessary to make cross-sections of the sample with a very high density—higher than the smallest segmented object.
An alternative to imaging in 2D space is to use imaging in 3D space. The proposed method of microtomographic imaging of chocolate supported by the proposed algorithms of image analysis and processing allows for the quantitative identification of the homogeneity of the distribution of the ingredients in the entire volume of the product [
16,
17].
Considering the results of the quadtree decomposition histograms, the homogeneity of the samples, starting from the most homogeneous, is as follows: GFV, SK, GF, MF. An identical relationship was obtained for the analysis based on the GLCM algorithm.
The advantage of the proposed method is its non-invasiveness as well as high sensitivity and specificity of the method. In addition, it does not require 3D reconstruction, which introduces a stochastic factor, which reduces its accuracy.
It should be emphasized that both the GLCM and QTDECOPM algorithms used take into account both the dispersion of rocks in relation to each other as well as the grain size. Therefore, it is not necessary to segment and extract individual elements. This is especially important for products for which the differences in density and, therefore, the brightness of the microtomograms are small. In the case of chocolate, for non-standardized microtomograms, the difference in the brightness of the darkest and brightest pixel is small, which would further hinder analysis using object size/shape analysis methods.
It should be emphasized that the proposed methods of image analysis and processing (GLCM and QTDECOPM) have a significant advantage over the simple methods of assessing the brightness of images. As shown in
Figure 3, a similar average brightness of the images can be obtained (the average brightness of
Figure 3a,b will be very similar) while the homogeneity of these images will be significantly different. Thus, simply determining local image differences will not be a good tool for assessing the API homogeneity in a medium such as chocolate.
There are also some limitations to the proposed method. In the present case, the vitamins were added to the chocolate in the form of a mixture with the carrier. If they were added without a carrier, a small amount of them—depending on the size of the milligram or microgram sample—would not allow their distribution to be assessed. In addition, air bubbles, which the GLCM algorithm and QTDCOMP can identify as unevenly dispersed components, are also a limitation. The solution to this problem can be, in the case of QTDCOMP analysis, such an arbitrary assumption of the brightness difference threshold that will not take air bubbles into account.
The proposed methods of image analysis and processing were applied independently on the same set of images (2260 microtomographic scans). Both methods are complementary to each other—the obtained results are identical with regard to both the GLCM and QTDCOMP methods—the homogeneity of the API distribution in the tested chocolates is as follows (starting with the most homogeneous): GFV; SK; GF; MF.
Hyperspectral imaging (HSI), as a non-destructive and advanced optical technology, allows for the identification of image data using image analysis and processing methods, and the evaluation of spectral parameters of each image pixel [
18]. Hyperspectral imaging also offers the possibility of assessing the distribution of ingredients within the chocolate. Until now, hyperspectral imaging has not been used to evaluate the distribution of ingredients in both chocolate and other types of food. However, HSI was used to predict the total fat content in the whole dried cocoa beans [
19], to quantitatively predict the fermentation index (FI), total polyphenols (TP) and antioxidant activity (AA) of individual dry fermented cocoa beans [
20] and to predict the quality of chocolate [
21].
The results obtained by the hyperspectral imaging method are analogous to those obtained by microtomographic methods. The proposed methods allow for the assessment of the distribution of ingredients within a single slice, based on the verification of the difference between the minimum and maximum reflectance and within the entire sample volume, by analyzing the differences in reflectance for individual slices. Nevertheless, there are also limitations to the method: it requires cutting the sample into slices which makes precise analysis difficult due to the difficulty in obtaining multiple slices. In addition, the pixel size is also a limitation. In the conducted research, the hyperspectral cubes were recorded from the minimum distance provided by the camera. However, the same pixel size of the camera matrix and the optical resolution of the camera are also a limitation.
The results obtained with the use of a hyperspectral camera indicate (as in the case of microtomography) that the most homogeneous ingredients are distributed in the GFV; SK; GF and MF chocolate, respectively.
Chocolate is a very difficult object to analyze and, at the same time, the probability of the non-homogeneous distribution of active ingredients is relatively high. This is due to the fact that, during the chocolate production process, while still in a liquid state, the higher density ingredients may be deposited at the base of the product (bottom) and lighter ones may undergo the phenomenon of flocculation or creaming. The proposed methods of image analysis and processing can be helpful in assessing the distribution of the ingredients within chocolate and optimizing the production processes to achieve the highest homogeneity of API dispersion throughout the product volume. It should be emphasized that the proposed methodology for assessing the homogeneity of API distribution in chocolate can be applied to other types of functional food.