# A Review of Optical Nondestructive Visual and Near-Infrared Methods for Food Quality and Safety

Authors: Jarmo T. Alander; Vladimir Bochko; Birgitta Martinkauppi; Sirinnapa Saranwong; Timo Mantere
Journal: International Journal of Spectroscopy
 (2013)

---

## Abstract

This paper is a review of optical methods for online nondestructive food quality monitoring. The key spectral areas are the visual and near-infrared wavelengths. We have collected the information of over 260 papers published mainly during the last 20 years. Many of them use an analysis method called chemometrics which is shortly described in the paper. The main goal of this paper is to provide a general view of work done according to different FAO food classes. Hopefully using optical VIS/NIR spectroscopy gives an idea of how to better meet market and consumer needs for high-quality food stuff.


---

## Body

## 1. Introduction

Consumers are the driving force in the food market. They have become more health conscious, demanding and willing to pay for the “good quality.” The consumers’ trust for food industry has been diminished due to food scandals thus making it important to improve the safety monitoring.The “quality” and “safety” have different meanings and aspects which depend on the food class, target market, criteria, and application. In some sense, the safety is part of the quality but here we separate these two because we like to emphasize the difference between how a human perceive the food and how we can evaluate threats of health. Some unsafe food cannot be detected by manual inspection. The food quality and safety evaluation has become more important and the need for more comprehensive assessment for all food batches is adequate.Even though a lot of research and development work has been done on food safety and quality, more needs to be done to find economic ways of monitoring food safety. In this paper, our purpose is to go through the subject according to Food and Agriculture Organizations of the United Nations (FAO) categories (http://www.fao.org/) and publications related to quality and safety. These two factors can be evaluated in many different methods and techniques.The traditional methods are sensory evaluation, chemical analysis, and microbiological analysis. A more recent approach in technical sense is optical techniques, especially the multispectral methods in visual and near-infrared wavelengths. The optical methods can be used for nondestructive, fast, real-time, online monitoring of all samples (Huang et al. [1]). Table 1 gives a general comparison of these four approaches.Table 1
Comparison of method properties.
Method
Subjective/objective
Sample/all
Sensory
Subjective
All
Chemical
Objective
Sample
Microbiological
Objective
Sample
NIR
Objective
AllThe sensory evaluation is the oldest method and still used every day. The evaluation is done by both consumers and professional food observers. It is relatively fast but hardly suitable for a large amount of samples due to many reasons like observer’s fatiguing. The reliability varies with food item group and by person. The results are typically very subjective, depending on many non-food-related factors, and difficult to evaluate quantitatively.The chemical analysis is an objective technique which often provides reliable results if the monitored batch is represented well by the samples measured. It has some limitations—the processes may not work correctly due to some substances, the need of accurate and correct calibrations, the need of complex multiphased processing, and the need of experts for the analysis. It might not be suitable if the distribution of the substance content is nonuniform. It cannot provide a point measurement of the sample, only an average over the whole sample. Since the sample is destroyed, chemical analysis cannot be used for monitoring all food units. In addition, the price of the analysis per measurement may be quite high and it produces toxic waste; thus, the number of samples for monitoring must be limited due to economic and ecological reasons. It is generally not very well suited for fast, online product management.The microbiological analysis is usually applied to detect biological organism like fungi or bacteria but not so much for identifying other content. It gives often objective and reliable results provided that, for example, the culture do grow, the growth is detectable, or the sample is not contaminated by some other sources. The analysis is typically slow and more tedious and expensive than the previous two methods. The microbiological analysis is suitable only for low speed, offline monitoring using a representative sample set of the batch. The main problem is that it allows defective products to be manufactured even though the cheapest solution might be to immediately stop processing and clean up the manufacturing unit.To overcome the disadvantages and limitations of the previous methods, new economic, fast, and environment friendly techniques are sought after. As a result, optical multispectral measurements and imaging have recently become more and more popular in food measurements because they lend themselves easily to online monitoring of all samples even without touching the samples. The price of the measurement instruments has also decreased so they provide a viable option for the traditional methods. However, analysis of spectral measurements is often not easy and requires expertise. The mathematical and statistical models created might not be general and need to be adjusted to new conditions and products. Nowadays, a typical optical system employs ultraviolet (fluorescence) and visible wavelengths (VIS), near-infrared (NIR) or infrared (IR) areas or a combinations of them. The near-infrared spectrum is especially interesting since it is related to overtones and combinations of such chemical bonds as C–H, O–H, and N–H which have influence on many properties of food.


### 1.1. History

Food and agriculture have been subjects for near-infrared (NIR) applications from the beginning of NIR measurement history. The earliest work which involved nondestructive moisture content determination of grain and seeds is published in [2] of the United State Department of Agriculture (USDA). Later, the success of NIR spectroscopy is marked by the establishment of wheat protein analysis throughout Canada by Phil Williams of the Canadian Grain Commission in 1975 [3]. In this area of application, at first, NIR was restricted to quality evaluation of low-moisture products such as cereal grains including wheat, corn, and soybean due to interference of water absorption in the long-wavelength region, especially in the combination area of 1900–2500 nm. In the latter stages of NIR applications, the development of silicon sensors allowed acquisition in the short-wavelength region of 700–1100 nm, leading to the analysis of thicker and higher-moisture samples such as fruit, fish, meat, and intact kernels. The use of the short-wavelength region allows nondestructive measurement of relatively thick samples since the electromagnetic wave in this region has better penetration because the absorption of water in this third overtone band becomes weak.According to Osborne [4], the major limitation of using NIR spectroscopy for food analysis is its dependence on less precise reference methods. Since the chemical information of sample is analyzed from the changes in spectra, in most food samples NIR spectroscopy needs calibration against a reference method with the ingredient of interest.Other optical methods have been studied for food quality lately by many researchers, for example, Farkas and Dalmadi [5], Kaffka [6], and Huang et al. [7]. The optical methods could alleviate these problems although they are not so accurate. Another advantage of optics is that it can be imaging and thus characterizing the sample better. A popular spectral area for food research has been near-infrared (NIR) in which many publications can be found like Huang et al. [7], Pallav et al. [8], Ozaki et al. [9], and Osborne [4].Berrueta et al. [10] have recently made a review of supervised pattern recognition methods in food analysis. Reid et al. [11] have made a review of different food authentication methods including NIRS. Cen and He [12] give a review of NIR reflectance spectroscopy in determination of food quality.Du and Sun [13] give a review of machine learning techniques such as neural networks and evolutionary optimization in computer vision for food quality.


### 1.2. Optical NIR Measurements for Food

#### 1.2.1. NIR Measurement Modes

There are four standard measurement modes for the acquisition of NIR spectra from a sample: transmission, reflection, transflection, and interaction (interactance). Illustrations of these are shown in Figure1. The selection of measurement mode depends on many factors like sample type or installment location. Generally, the design and implementation of measurement system and the selection of measurement mode require at least some expertise.Sample presentation for near-infrared (NIR) spectroscopy. N: NIR light source, D: detector.
(a)
Transmission
(b)
Reflection
(c)
Transflection
(d)
InteractionIn the transmission measurement mode (Figure1(a)), incident light propagates through the sample and is measured as it exits the sample at a point directly opposite to the light source. Occasionally, in the case of transmission for solid samples, the detector is placed at an angle of 90 degrees to the source.For the reflection mode (Figure1(b)), the light source and the detector are placed on the same side of sample. To avoid surface reflection, detectors are usually placed at an angle of 45 degrees to the sample plane. In some cases, an integrating sphere is used to concentrate light reflected from the sample before it reaches the detector by capturing and integrating light from various directions.Transflection (Figure1(c)) is the combination of transmission and reflection modes. The sample is positioned as if for reflection mode measurement, but a reflector is situated opposite to the light source on the far side of the sample, reflecting light that is transmitted through the sample back through the sample again to the detector. The samples, generally in liquid form, are placed in a holder of 0.1–0.3 mm width along the direction of light propagation. Therefore, the physical path length of transflection mode is double the sample thickness. Transflection is often used to reduce path length as the thinnest cuvette (standard sample holder for transmission measurements) is generally 1.0 mm thick. In some cases, transflection is employed for NIR instruments without transmission capability.The fourth configuration, the interactance mode (Figure1(d)), is also a combination of transmission and reflection but for solid samples. In this mode, the sample is illuminated by a fiber-optic cable(s) in direct contact with the sample surface or the sample holder. Light propagates inside the sample and interacts with the interior through reflection, transmission, and/or absorption. Fibre bundles that are placed on the same side as the source subsequently return the light that propagates inside the sample to the detector. The direct contact between the fibre bundles (for both the source and the detector) and the sample eliminates the effect of surface reflection and maximizes the penetration depth.


#### 1.2.2. Types of Food Samples

From the product viewpoint, NIR applications in food and agriculture could be classified into three groups by the state of the sample: (i) liquid samples, (ii) ground and relatively small solid samples, and (iii) relatively large samples that require nondestructive or noninvasive measurement.A benefit in working with samples from the first group (liquid samples) is the handling of optical path length. In the case of a clear liquid such as soy sauce, filtrated fruit juice, or vegetable oil, samples can be contained in a quartz cuvette, a disposable glass vial, or a transflectance sample holder, all of which would provide a relatively high consistency of optical path length due to the low scattering characteristics of the samples. The measurements used are transmission or transflection. The sample thickness can be adjusted based on the absorptivity of major composition(s) and the constituent of interest.Figure2 shows NIR spectra in the long-wavelength region of water and oil acquired in various physical path lengths. According to the figure, if the sample analyzed is water-rich and the constituent of interest has absorption bands overlapped with water absorption, the appropriate physical path length would be 0.2 mm for the combination region measurement (1800–2100 nm), 1.0 mm for the first overtone region (1400–1500 nm), and 10 mm for the second overtone region (900–1000 nm). However, as a forementioned, the decision for optical path length is also dependent on the molar absorptivity, that is, the ability of a particular substance to absorb light at a given wavelength, and the concentration of that constituent of interest. In many cases, the constituent of interest has absorption bands on the shoulder of water bands such as in the region of 2100–2300 nm. In such cases, sample cells with longer physical path length, say 1 mm, could be more appropriate than the 0.2 mm sample cell due to lower absorptivity of substances in this region.NIR spectra of water and oil measured at different path lengths. (a) Water spectra when the path length is 1, 2, 5, or 10 mm. (b) Water spectra when the path length is 0.2 mm. (c) Vegetable oil spectra when the path length is 1, 8, or 22 mm. The shape and level of measured spectra depend on the path length.
(a)
Water measured at 1, 2, 5, and 10 mm path length
(b)
Water measured at 0.2 mm path length
(c)
Vegetable oil measured at 1, 8, and 22 mm path lengthOn the other hand, if the sample is oil-based, sample cells with significant longer path length could be used due to the lower absorptivity of oil compared to water. In the case where the constituent of interest has very low absorptivity and/or concentration, for example, acid value or peroxide value in fresh vegetable oil, increasing physical path length to obtain adequate information is necessary.However, one should keep in mind that the analysis of clear samples typically differs from that of the analysis of scattering samples. When colloids or suspensions are analyzed, the scattering characteristics of the samples are stronger, and thus the optical path length, that is, the actual distance that NIR wave travels, is much longer than that of clear samples. Due to this, the path length would have to be reduced. Figure3 shows the NIR spectra of homogenized milk (colloid) and vegetable-mix juice (suspension) using a 4 mm path length. In this case, milk has a stronger absorption due to its composition and the scattering characteristics of the constituent small fat globules. Vegetable-mix juice has less absorbance compared to milk but stronger than that of water at 5 mm path length (for water, see Figure 2). This is due to the scattering characteristics of the constituent suspended particles.Figure 3
NIR of milk (colloid) and vegetable-mix juice (suspension) measured with 4 mm physical path length. Note: the preamplifier gain used for milk was stronger than that of vegetable-mix juice due to very weak transmitted light.


#### 1.2.3. Some Important Considerations for Measurements

Another point to be aware of for liquid samples with water as a major constituent is the importance of temperature control. It is well documented [14–17] that water absorption bands in the NIR region shift in both peak position and amplitude according to sample temperature, as the number of hydrogen bonds in the water molecules is temperature dependent. Increasing temperature results in a higher percentage of water molecules with fewer hydrogen bonds due to the higher kinetic energy. Therefore, in many cases, temperature control is necessary to perform precise NIR measurements. Since many oil-based samples are in solid or opaque form at room temperature, temperature control is required not mainly to maintain spectral consistency but to increase sample transparency.For ground or small-particle samples, NIR spectra are usually acquired in reflection mode due to strong scattering characteristics. Such samples are generally placed in sample holders with quartz or glass windows. Quartz is more expensive but has lower OH absorption compared to glass resulting in better precision in some constituents, especially those with OH functional groups. However, in the case where the absorption of the constituent of interest occurs at different wavelength region than the OH absorption in glass and there is enough concentration of those constituents, it is possible to use glass-window sample holder or glass Petri dish. For many food manufacturers, the use of glass or quartz is prohibited and plastic such as a polystyrene dish is used as a sample holder. In that case, the absorption band of the constituent would fall within the absorption bands for polystyrene, especially in the combination region beyond 2000 nm. If the absorption bands of the constituent can be precisely measured in the shorter-wavelength region by arranging an adequate path length and detector, the use of plastic dish would be applicable. For samples with a relatively coarse particle size, there is the possibility that light could pass through the space between samples and be lost. One way to reduce this problem is to place a reflector on the back side of the sample cell. During the measurement, spinning the sample cell will increase the acquisition area, thus reducing error due to sample nonuniformity especially in relatively coarse or large-particle samples. Examples of samples belonging to this group include ground and intact cereal grains, cereal meals such as soy bean meals or corn gluten meals, crushed processed foods/snacks, and powder milk or drink.Finally, we consider samples that require nondestructive measurement. Samples in this group include meat, fish, intact fruit, and intact nut kernels. For the most part, these samples are sold intact and the constituent of interest is not evenly distributed between the surface and the sample core. To obtain information from deep inside the sample, two modes of measurement are used for this group: the interaction mode and the transmission mode. As mentioned earlier, most of the applications in this group use silicon detectors that allow spectral acquisition in the short-wavelength region of 700–1100 nm. The measurement parameters could be moisture and sugar contents for intact fruit and fat, protein, and moisture content in meat and kernels, as well as detection of various internal disorders or pest in agricultural products.To employ NIR spectroscopy for routine quality control, it is not enough to develop calibration equations. A system developer needs to consider various factors affecting calibration results including instrument status (source strength, detector responses, and wavelength selection mechanism), atmospheric effects (temperature and humidity), and physical conditions (dust, vibration, and stray light) as well as transferability of the equations developed between various instrument in the same period of time and the transferability to the newer version of instrument and software upon the end of instrument life span.


### 1.3. Chemometrics

Optical measurement results connected with chemical analysis and statistics are called chemometrics. Chemometrics has become an established technique for handling chemical data. Good reviews of chemometrics are provided by Geladi and Grahn [18], and Workman and Springsteen [19], and Koljonen et al. [20], which present a review of genetic algorithm optimization in chemometry. The next text is a short introduction for the subject, and for a deeper insight, the previous reviews are recommended.The first step of chemometrics is to collect the data. This includes sample selection, measurements, and chemical analysis. The measurement geometry, measurement conditions, number of samples, and ingredients need to be very carefully designed and determined. The samples need to be representative of the food batches because interpolation or generalization of the model most probably does not work. The samples are first subjected to optical measurement and after that chemical analysis. One should also notice that the chemical analysis might sometimes provide unreliable results. Sometimes even the samples may change during time. The data should be divided into a training and test sets.After the measurements, the equations to transform optical data to chemical data should be set up. Since many functions and equations are available, it might be useful to test a couple of them to select the best results. After the selection, the equations need to be solved and coefficients to be determined with the training set. A typical approach for modeling is regression. The training of the model can be understood as a “calibration.” The optical methods are calibrated to produce the amount of a given substance or substances.The training data should be subjected to detection of residuals, outliers, and nonlinearity. The outliers should be excluded and nonlinearity corrected if present. Otherwise the results might be distorted. Typically the number of wavelengths from the optical measurements needs to be reduced due to their high amount and interdependence. Many techniques are available for wavelength reduction (e.g., splines or Savitzky-Golay filtering).Maybe the most often used regression models are multiple linear regression (MLR) or “ordinary” least squares (LS), ridge regression (RR), principal component regression (PCR), and partial least squares (PLS). The general equation for the regression is(1)y=b0+b1x1+b2x2+⋯+bkxk+f=b0+∑i=1kbixi+f=b0+f+BX,
where y is the response (from chemical analysis), xk are the predictors (from optical measurements, k pieces), bk are the regression coefficient to be determined, b0 is the offset and a constant factor, and f is the residual. If X and y are mean-centered, then b0=0.The solution for regression coefficient for the LS is(2)b=(XTX)-1XTy,
where T means transpose of the matrix. The LS may not work since the inverse might not exist or may be unstable. It is also notoriously sensitive to noise. The results should be also diagnosed using the following method: coefficient of determination and root mean squared error of calibration.A better solution for problems related to inversion can be RR:(3)b=(XTX+rI)-1XTy,
where I is an identity matrix and r is a ridge constant. The ridge constant should be as small as possible. However, there is no established method for the selection of the ridge constant or diagnostic of results.PCR also provides an easy inversion of matrices. It requires applying the principal component analysis (PCA) to reduce dimensions ofX and to obtain the eigenvectors. The eigenvectors are orthogonal. The PCA also reduces the noise present in X. The equation for regression can be formulated as
(4)y=Vd+f,d=(VTV)-1VTy,
where V is the principal components and d contains coefficients. The number of components needs to be determined by testing and checking.Assume thaty matrix consists of several measurements of y. PLS decomposes both y and X matrices. It also removes noise in both of these matrices. Its formulae are
(5)y=UQT+F,X=TPT+E,
where T and U are projections (principal components) of X and y on eigenvectors and P and Q are eigenvectors of X and y. The projections are obtained by decomposing the corresponding matrix. Error terms are marked as E and F.Both PLS and PCR calculate one component at a time using regression betweent and u. Then a residual is calculated and the calculation of the next component is based on this residual.The obtained results for equations need to be evaluated by using the test set. The predicted values are calculated using test values from the optical measurement set and parameters obtained from the training phase. The difference between actual and predicted values in the test set can be evaluated using the root mean squared error of prediction and the coefficient of determination.The visualization gives a good view of how the model is working. This could be done, for example, by plotting root mean squared error of calibration, root mean squared error of prediction, calculated loading plot, residual versus sample, and residual versus predicted test value.


### 1.4. Food Quality and Safety

#### 1.4.1. Safety Factors

We consider here food safety to factors which may cause danger to health either directly or indirectly.(1)Foreign Bodies. A foreign body can be anything unwanted in a food product. It can be from the raw material for the product or external material added indeliberately; for example, the raw material can contain bones which are shattered to sharp bone fraction pieces during the manufacturing process. The product may be littered with machine parts due machine blistering or residues from other sources like pieces of plastic.(2)Incorrect, Contaminated, or Phony Ingredients in Product. Incorrect food ingredients refer here to any material which should not be in the food. They can be residues from previous production like peanut remnants or accidently added wrong material. The food can be contaminated from external sources like manure or too much pesticide. The phony ingredients are deliberately added to generate more income from consumers or manufacturers. The phony items can be rip-offs like cheap wine sold as a more expensive version or even very dangerous ones like melanin milk.(3)Spoilage. The spoilage is considered in this paper as a decomposition of the food. It is often a byproduct of the activity of harmful bioagents like fungi or bacteria. Other causes are wrong handling, like overheating, freezing or wrong harvesting time, wrong environment, like too hot environment or environment that has gases like ethene which mature fruits too fast, or age.(4)Bioagents: Fungi, Yeast, and Molds; Microbes, Bacteria, and Viruses. Fungi, yeast, or molds can be used in the production of certain food, but usually they are serious quality problems. This paper concentrates on articles on harmful effects of the bioorganisms like food poisoning or infections. The detection of smaller bioorganisms like bacteria or viruses is usually very hard due to their small size.


#### 1.4.2. Quality Factors

Food quality consists of several factors. The validity or importance of a factor depends on the food group and on the evaluator. For example, the fat content is irrelevant for apples but very relevant for meat. The factors for this paper are appearance and taste.(1)Appearance. The appearance of food is related to the visual experience of the product. It is affected by the perceived colors and textures as well as personal preferences and opinions. The environment in which the food is presented has its own effect. Since the color perceived depends on the prevailing illumination, for example, there are already available special lamps to emphasize the color of meat. Good texture can be achieved with proper processing.(2)Taste. Taste is composed of several ingredients and is affected greatly by smell and also appearance. In this paper, we limit the taste to the actual food ingredients or state-like amount of sugar or acidity.Smell. The smell can be used to separate bad food from good food. It is also essential to make food more delicious.Juiciness. One attribute especially for fruit is juiciness. It is related to the water content and distribution of fruits.Noise. Consumers often expect certain noise when eating food like cereals.Freshness. Freshness is important especially for fish and other sea products.Authentication. Some food products have been falsified. An example of this kind of products is wine. Spectral methods can be used to separate authentic wine from nonauthentic wine. The NIR spectra is used for food authentication by Sun [21].Essential Ingredients. Food can contain many elements which have positive effects on health. These elements include, for example, flavonoids and vitamins in plants flavonoids and vitamins or omega-6 fatty acid in fish. It is generally thought that the higher the amount obtained from food the better the effect on health. Ingredients can be correlated using chemometrics.Unwanted Ingredients. Food contains also ingredients which consumers want to avoid for real or imaginary reasons. These ingredients can be preservatives which can in fact make the food safer. Other harmful ingredients include excessive amount of fat or salt.Unwanted Objects. Although food can be perfectly safe and edible, it can still contain unwanted objects. This kind of objects can range from machine parts to stones and insect parts.In their book, Workman and Weyer [22] explain theoretical backgrounds on how different qualities can be analyzed and found from NIR spectra; these qualities include alkanes and cycloalkanes, methylene groups, alkenes and alkynes, aromatic compounds, hydroxyls, water, carbonyls, amines and amides, carbohydrates, amino acids, peptides, and proteins.High Quality. Affordable price consistently.Chemometric Models. None known.


### 1.5. Optimization

Optimization with NIR spectroscopy is mostly connected with the selection of optimal wavelengths that correlate best with the object of interest. Usually we want to use as few wavelengths as possible, since the less the data needs to be analyzed the faster it is. However, we need to be sure that the selected wavelengths are adequate for reliable results.A special type of genetic algorithms is called genetic programming (GP). It uses genetic algorithms to find a function or a program to solve a given problem. GP has been demonstrated to find solutions to problems that have been found by the most skilled engineers as patents and other inventions [23]. Another view of GP is to say that it is symbolic regression, that is, a method to find a function that best satisfies the given constraints. Yet another usage of GP is to find rules to explain data. GP is an extremely flexible method to solve computational intelligence problems. The main drawback of GP is its slow processing which prevents its usage in most online applications. However, in the systems design or similar phase, GP can be a nice tool to find good solutions automatically after the proper fitness function is implemented.While spectroscopy produces huge amounts of raw data, there is a strong need to automatically process this data to compress it and to find the features that are relevant or correlate to those that are looked for. Norris and Williams [24] used wavelength selection so that they selected 12 wavelengths that produced the closest prediction with the required constituent in wheat measurements, particle size, and protein content. Goodacre and Kell [25] have demonstrated spectroscopical imaging GP applications related directly or indirectly to food quality. More specifically the application was to find the algebraic formula of the wavelengths that give the best discrimination between the bacterial samples examined. More generally the authors claim that GP is one potential tool to decrypt metabolomic data for biomedical applications.With several materials, the VIS/NIR reflectance works best if the wavelengths used are optimized between 400 and 1800 nm [26]. This was also true with wholegrain measurement, where they found wavelengths between 1100 and 1400 nm giving the highest correlations with most of the constituents of interest with wholegrain measurements. However, the protein content was best determined from the 1700 to 2500 nm wavelength band.


#### 1.5.1. Illustrative Example of Tomato Classification

The spectral methods lend themselves very well to fruit quality inspection. In this example, the transmittance spectra of tomatoes were measured using a spectrophotometer (Ocean optics). The spectra were further handled: they were smoothed to reduce noise and then downsampled by splines. An example of tomato spectra is shown in Figure4. The transmittance is measured from 400 nm to 1000 nm. The spectra differ in both visible and NIR areas. The difference is caused by the ripening process.Transmittance spectra for different tomatoes of the same cultivar from 400 nm to 1000 nm. (a) A raw tomato, (b) a partially raw tomato, (c) an acceptably ripe tomato, and (d) a ripe tomato.
(a)
(b)
(c)
(d)The spectral data itself contains a lot of information, part of which is in some cases irrelevant or redundant. The dimensionality of data can therefore be reduced. Here the locally linear embedding was used for this purpose in a nonlinear manner. The visualization of results can be seen in Figure5, in which the feature space is spanned by the first two embedded components.Figure 5
The feature space is spanned by the first two components. The red curve indicates the boundary between good and bad tomatoes. The good tomatoes are outside the red curve.The kernel Fisher discriminant (KFD) was used to classify tomatoes into good and bad ones. As shown in Figure5, the tomatoes are classified 100% correctly into these two groups. The red-colored tomatoes are ripe while the yellow and green are raw. The boundary between the groups is visualized with red curve (Figure 5).


## 1.1. History

Food and agriculture have been subjects for near-infrared (NIR) applications from the beginning of NIR measurement history. The earliest work which involved nondestructive moisture content determination of grain and seeds is published in [2] of the United State Department of Agriculture (USDA). Later, the success of NIR spectroscopy is marked by the establishment of wheat protein analysis throughout Canada by Phil Williams of the Canadian Grain Commission in 1975 [3]. In this area of application, at first, NIR was restricted to quality evaluation of low-moisture products such as cereal grains including wheat, corn, and soybean due to interference of water absorption in the long-wavelength region, especially in the combination area of 1900–2500 nm. In the latter stages of NIR applications, the development of silicon sensors allowed acquisition in the short-wavelength region of 700–1100 nm, leading to the analysis of thicker and higher-moisture samples such as fruit, fish, meat, and intact kernels. The use of the short-wavelength region allows nondestructive measurement of relatively thick samples since the electromagnetic wave in this region has better penetration because the absorption of water in this third overtone band becomes weak.According to Osborne [4], the major limitation of using NIR spectroscopy for food analysis is its dependence on less precise reference methods. Since the chemical information of sample is analyzed from the changes in spectra, in most food samples NIR spectroscopy needs calibration against a reference method with the ingredient of interest.Other optical methods have been studied for food quality lately by many researchers, for example, Farkas and Dalmadi [5], Kaffka [6], and Huang et al. [7]. The optical methods could alleviate these problems although they are not so accurate. Another advantage of optics is that it can be imaging and thus characterizing the sample better. A popular spectral area for food research has been near-infrared (NIR) in which many publications can be found like Huang et al. [7], Pallav et al. [8], Ozaki et al. [9], and Osborne [4].Berrueta et al. [10] have recently made a review of supervised pattern recognition methods in food analysis. Reid et al. [11] have made a review of different food authentication methods including NIRS. Cen and He [12] give a review of NIR reflectance spectroscopy in determination of food quality.Du and Sun [13] give a review of machine learning techniques such as neural networks and evolutionary optimization in computer vision for food quality.


## 1.2. Optical NIR Measurements for Food

### 1.2.1. NIR Measurement Modes

There are four standard measurement modes for the acquisition of NIR spectra from a sample: transmission, reflection, transflection, and interaction (interactance). Illustrations of these are shown in Figure1. The selection of measurement mode depends on many factors like sample type or installment location. Generally, the design and implementation of measurement system and the selection of measurement mode require at least some expertise.Sample presentation for near-infrared (NIR) spectroscopy. N: NIR light source, D: detector.
(a)
Transmission
(b)
Reflection
(c)
Transflection
(d)
InteractionIn the transmission measurement mode (Figure1(a)), incident light propagates through the sample and is measured as it exits the sample at a point directly opposite to the light source. Occasionally, in the case of transmission for solid samples, the detector is placed at an angle of 90 degrees to the source.For the reflection mode (Figure1(b)), the light source and the detector are placed on the same side of sample. To avoid surface reflection, detectors are usually placed at an angle of 45 degrees to the sample plane. In some cases, an integrating sphere is used to concentrate light reflected from the sample before it reaches the detector by capturing and integrating light from various directions.Transflection (Figure1(c)) is the combination of transmission and reflection modes. The sample is positioned as if for reflection mode measurement, but a reflector is situated opposite to the light source on the far side of the sample, reflecting light that is transmitted through the sample back through the sample again to the detector. The samples, generally in liquid form, are placed in a holder of 0.1–0.3 mm width along the direction of light propagation. Therefore, the physical path length of transflection mode is double the sample thickness. Transflection is often used to reduce path length as the thinnest cuvette (standard sample holder for transmission measurements) is generally 1.0 mm thick. In some cases, transflection is employed for NIR instruments without transmission capability.The fourth configuration, the interactance mode (Figure1(d)), is also a combination of transmission and reflection but for solid samples. In this mode, the sample is illuminated by a fiber-optic cable(s) in direct contact with the sample surface or the sample holder. Light propagates inside the sample and interacts with the interior through reflection, transmission, and/or absorption. Fibre bundles that are placed on the same side as the source subsequently return the light that propagates inside the sample to the detector. The direct contact between the fibre bundles (for both the source and the detector) and the sample eliminates the effect of surface reflection and maximizes the penetration depth.


### 1.2.2. Types of Food Samples

From the product viewpoint, NIR applications in food and agriculture could be classified into three groups by the state of the sample: (i) liquid samples, (ii) ground and relatively small solid samples, and (iii) relatively large samples that require nondestructive or noninvasive measurement.A benefit in working with samples from the first group (liquid samples) is the handling of optical path length. In the case of a clear liquid such as soy sauce, filtrated fruit juice, or vegetable oil, samples can be contained in a quartz cuvette, a disposable glass vial, or a transflectance sample holder, all of which would provide a relatively high consistency of optical path length due to the low scattering characteristics of the samples. The measurements used are transmission or transflection. The sample thickness can be adjusted based on the absorptivity of major composition(s) and the constituent of interest.Figure2 shows NIR spectra in the long-wavelength region of water and oil acquired in various physical path lengths. According to the figure, if the sample analyzed is water-rich and the constituent of interest has absorption bands overlapped with water absorption, the appropriate physical path length would be 0.2 mm for the combination region measurement (1800–2100 nm), 1.0 mm for the first overtone region (1400–1500 nm), and 10 mm for the second overtone region (900–1000 nm). However, as a forementioned, the decision for optical path length is also dependent on the molar absorptivity, that is, the ability of a particular substance to absorb light at a given wavelength, and the concentration of that constituent of interest. In many cases, the constituent of interest has absorption bands on the shoulder of water bands such as in the region of 2100–2300 nm. In such cases, sample cells with longer physical path length, say 1 mm, could be more appropriate than the 0.2 mm sample cell due to lower absorptivity of substances in this region.NIR spectra of water and oil measured at different path lengths. (a) Water spectra when the path length is 1, 2, 5, or 10 mm. (b) Water spectra when the path length is 0.2 mm. (c) Vegetable oil spectra when the path length is 1, 8, or 22 mm. The shape and level of measured spectra depend on the path length.
(a)
Water measured at 1, 2, 5, and 10 mm path length
(b)
Water measured at 0.2 mm path length
(c)
Vegetable oil measured at 1, 8, and 22 mm path lengthOn the other hand, if the sample is oil-based, sample cells with significant longer path length could be used due to the lower absorptivity of oil compared to water. In the case where the constituent of interest has very low absorptivity and/or concentration, for example, acid value or peroxide value in fresh vegetable oil, increasing physical path length to obtain adequate information is necessary.However, one should keep in mind that the analysis of clear samples typically differs from that of the analysis of scattering samples. When colloids or suspensions are analyzed, the scattering characteristics of the samples are stronger, and thus the optical path length, that is, the actual distance that NIR wave travels, is much longer than that of clear samples. Due to this, the path length would have to be reduced. Figure3 shows the NIR spectra of homogenized milk (colloid) and vegetable-mix juice (suspension) using a 4 mm path length. In this case, milk has a stronger absorption due to its composition and the scattering characteristics of the constituent small fat globules. Vegetable-mix juice has less absorbance compared to milk but stronger than that of water at 5 mm path length (for water, see Figure 2). This is due to the scattering characteristics of the constituent suspended particles.Figure 3
NIR of milk (colloid) and vegetable-mix juice (suspension) measured with 4 mm physical path length. Note: the preamplifier gain used for milk was stronger than that of vegetable-mix juice due to very weak transmitted light.


### 1.2.3. Some Important Considerations for Measurements

Another point to be aware of for liquid samples with water as a major constituent is the importance of temperature control. It is well documented [14–17] that water absorption bands in the NIR region shift in both peak position and amplitude according to sample temperature, as the number of hydrogen bonds in the water molecules is temperature dependent. Increasing temperature results in a higher percentage of water molecules with fewer hydrogen bonds due to the higher kinetic energy. Therefore, in many cases, temperature control is necessary to perform precise NIR measurements. Since many oil-based samples are in solid or opaque form at room temperature, temperature control is required not mainly to maintain spectral consistency but to increase sample transparency.For ground or small-particle samples, NIR spectra are usually acquired in reflection mode due to strong scattering characteristics. Such samples are generally placed in sample holders with quartz or glass windows. Quartz is more expensive but has lower OH absorption compared to glass resulting in better precision in some constituents, especially those with OH functional groups. However, in the case where the absorption of the constituent of interest occurs at different wavelength region than the OH absorption in glass and there is enough concentration of those constituents, it is possible to use glass-window sample holder or glass Petri dish. For many food manufacturers, the use of glass or quartz is prohibited and plastic such as a polystyrene dish is used as a sample holder. In that case, the absorption band of the constituent would fall within the absorption bands for polystyrene, especially in the combination region beyond 2000 nm. If the absorption bands of the constituent can be precisely measured in the shorter-wavelength region by arranging an adequate path length and detector, the use of plastic dish would be applicable. For samples with a relatively coarse particle size, there is the possibility that light could pass through the space between samples and be lost. One way to reduce this problem is to place a reflector on the back side of the sample cell. During the measurement, spinning the sample cell will increase the acquisition area, thus reducing error due to sample nonuniformity especially in relatively coarse or large-particle samples. Examples of samples belonging to this group include ground and intact cereal grains, cereal meals such as soy bean meals or corn gluten meals, crushed processed foods/snacks, and powder milk or drink.Finally, we consider samples that require nondestructive measurement. Samples in this group include meat, fish, intact fruit, and intact nut kernels. For the most part, these samples are sold intact and the constituent of interest is not evenly distributed between the surface and the sample core. To obtain information from deep inside the sample, two modes of measurement are used for this group: the interaction mode and the transmission mode. As mentioned earlier, most of the applications in this group use silicon detectors that allow spectral acquisition in the short-wavelength region of 700–1100 nm. The measurement parameters could be moisture and sugar contents for intact fruit and fat, protein, and moisture content in meat and kernels, as well as detection of various internal disorders or pest in agricultural products.To employ NIR spectroscopy for routine quality control, it is not enough to develop calibration equations. A system developer needs to consider various factors affecting calibration results including instrument status (source strength, detector responses, and wavelength selection mechanism), atmospheric effects (temperature and humidity), and physical conditions (dust, vibration, and stray light) as well as transferability of the equations developed between various instrument in the same period of time and the transferability to the newer version of instrument and software upon the end of instrument life span.


## 1.2.1. NIR Measurement Modes

There are four standard measurement modes for the acquisition of NIR spectra from a sample: transmission, reflection, transflection, and interaction (interactance). Illustrations of these are shown in Figure1. The selection of measurement mode depends on many factors like sample type or installment location. Generally, the design and implementation of measurement system and the selection of measurement mode require at least some expertise.Sample presentation for near-infrared (NIR) spectroscopy. N: NIR light source, D: detector.
(a)
Transmission
(b)
Reflection
(c)
Transflection
(d)
InteractionIn the transmission measurement mode (Figure1(a)), incident light propagates through the sample and is measured as it exits the sample at a point directly opposite to the light source. Occasionally, in the case of transmission for solid samples, the detector is placed at an angle of 90 degrees to the source.For the reflection mode (Figure1(b)), the light source and the detector are placed on the same side of sample. To avoid surface reflection, detectors are usually placed at an angle of 45 degrees to the sample plane. In some cases, an integrating sphere is used to concentrate light reflected from the sample before it reaches the detector by capturing and integrating light from various directions.Transflection (Figure1(c)) is the combination of transmission and reflection modes. The sample is positioned as if for reflection mode measurement, but a reflector is situated opposite to the light source on the far side of the sample, reflecting light that is transmitted through the sample back through the sample again to the detector. The samples, generally in liquid form, are placed in a holder of 0.1–0.3 mm width along the direction of light propagation. Therefore, the physical path length of transflection mode is double the sample thickness. Transflection is often used to reduce path length as the thinnest cuvette (standard sample holder for transmission measurements) is generally 1.0 mm thick. In some cases, transflection is employed for NIR instruments without transmission capability.The fourth configuration, the interactance mode (Figure1(d)), is also a combination of transmission and reflection but for solid samples. In this mode, the sample is illuminated by a fiber-optic cable(s) in direct contact with the sample surface or the sample holder. Light propagates inside the sample and interacts with the interior through reflection, transmission, and/or absorption. Fibre bundles that are placed on the same side as the source subsequently return the light that propagates inside the sample to the detector. The direct contact between the fibre bundles (for both the source and the detector) and the sample eliminates the effect of surface reflection and maximizes the penetration depth.


## 1.2.2. Types of Food Samples

From the product viewpoint, NIR applications in food and agriculture could be classified into three groups by the state of the sample: (i) liquid samples, (ii) ground and relatively small solid samples, and (iii) relatively large samples that require nondestructive or noninvasive measurement.A benefit in working with samples from the first group (liquid samples) is the handling of optical path length. In the case of a clear liquid such as soy sauce, filtrated fruit juice, or vegetable oil, samples can be contained in a quartz cuvette, a disposable glass vial, or a transflectance sample holder, all of which would provide a relatively high consistency of optical path length due to the low scattering characteristics of the samples. The measurements used are transmission or transflection. The sample thickness can be adjusted based on the absorptivity of major composition(s) and the constituent of interest.Figure2 shows NIR spectra in the long-wavelength region of water and oil acquired in various physical path lengths. According to the figure, if the sample analyzed is water-rich and the constituent of interest has absorption bands overlapped with water absorption, the appropriate physical path length would be 0.2 mm for the combination region measurement (1800–2100 nm), 1.0 mm for the first overtone region (1400–1500 nm), and 10 mm for the second overtone region (900–1000 nm). However, as a forementioned, the decision for optical path length is also dependent on the molar absorptivity, that is, the ability of a particular substance to absorb light at a given wavelength, and the concentration of that constituent of interest. In many cases, the constituent of interest has absorption bands on the shoulder of water bands such as in the region of 2100–2300 nm. In such cases, sample cells with longer physical path length, say 1 mm, could be more appropriate than the 0.2 mm sample cell due to lower absorptivity of substances in this region.NIR spectra of water and oil measured at different path lengths. (a) Water spectra when the path length is 1, 2, 5, or 10 mm. (b) Water spectra when the path length is 0.2 mm. (c) Vegetable oil spectra when the path length is 1, 8, or 22 mm. The shape and level of measured spectra depend on the path length.
(a)
Water measured at 1, 2, 5, and 10 mm path length
(b)
Water measured at 0.2 mm path length
(c)
Vegetable oil measured at 1, 8, and 22 mm path lengthOn the other hand, if the sample is oil-based, sample cells with significant longer path length could be used due to the lower absorptivity of oil compared to water. In the case where the constituent of interest has very low absorptivity and/or concentration, for example, acid value or peroxide value in fresh vegetable oil, increasing physical path length to obtain adequate information is necessary.However, one should keep in mind that the analysis of clear samples typically differs from that of the analysis of scattering samples. When colloids or suspensions are analyzed, the scattering characteristics of the samples are stronger, and thus the optical path length, that is, the actual distance that NIR wave travels, is much longer than that of clear samples. Due to this, the path length would have to be reduced. Figure3 shows the NIR spectra of homogenized milk (colloid) and vegetable-mix juice (suspension) using a 4 mm path length. In this case, milk has a stronger absorption due to its composition and the scattering characteristics of the constituent small fat globules. Vegetable-mix juice has less absorbance compared to milk but stronger than that of water at 5 mm path length (for water, see Figure 2). This is due to the scattering characteristics of the constituent suspended particles.Figure 3
NIR of milk (colloid) and vegetable-mix juice (suspension) measured with 4 mm physical path length. Note: the preamplifier gain used for milk was stronger than that of vegetable-mix juice due to very weak transmitted light.


## 1.2.3. Some Important Considerations for Measurements

Another point to be aware of for liquid samples with water as a major constituent is the importance of temperature control. It is well documented [14–17] that water absorption bands in the NIR region shift in both peak position and amplitude according to sample temperature, as the number of hydrogen bonds in the water molecules is temperature dependent. Increasing temperature results in a higher percentage of water molecules with fewer hydrogen bonds due to the higher kinetic energy. Therefore, in many cases, temperature control is necessary to perform precise NIR measurements. Since many oil-based samples are in solid or opaque form at room temperature, temperature control is required not mainly to maintain spectral consistency but to increase sample transparency.For ground or small-particle samples, NIR spectra are usually acquired in reflection mode due to strong scattering characteristics. Such samples are generally placed in sample holders with quartz or glass windows. Quartz is more expensive but has lower OH absorption compared to glass resulting in better precision in some constituents, especially those with OH functional groups. However, in the case where the absorption of the constituent of interest occurs at different wavelength region than the OH absorption in glass and there is enough concentration of those constituents, it is possible to use glass-window sample holder or glass Petri dish. For many food manufacturers, the use of glass or quartz is prohibited and plastic such as a polystyrene dish is used as a sample holder. In that case, the absorption band of the constituent would fall within the absorption bands for polystyrene, especially in the combination region beyond 2000 nm. If the absorption bands of the constituent can be precisely measured in the shorter-wavelength region by arranging an adequate path length and detector, the use of plastic dish would be applicable. For samples with a relatively coarse particle size, there is the possibility that light could pass through the space between samples and be lost. One way to reduce this problem is to place a reflector on the back side of the sample cell. During the measurement, spinning the sample cell will increase the acquisition area, thus reducing error due to sample nonuniformity especially in relatively coarse or large-particle samples. Examples of samples belonging to this group include ground and intact cereal grains, cereal meals such as soy bean meals or corn gluten meals, crushed processed foods/snacks, and powder milk or drink.Finally, we consider samples that require nondestructive measurement. Samples in this group include meat, fish, intact fruit, and intact nut kernels. For the most part, these samples are sold intact and the constituent of interest is not evenly distributed between the surface and the sample core. To obtain information from deep inside the sample, two modes of measurement are used for this group: the interaction mode and the transmission mode. As mentioned earlier, most of the applications in this group use silicon detectors that allow spectral acquisition in the short-wavelength region of 700–1100 nm. The measurement parameters could be moisture and sugar contents for intact fruit and fat, protein, and moisture content in meat and kernels, as well as detection of various internal disorders or pest in agricultural products.To employ NIR spectroscopy for routine quality control, it is not enough to develop calibration equations. A system developer needs to consider various factors affecting calibration results including instrument status (source strength, detector responses, and wavelength selection mechanism), atmospheric effects (temperature and humidity), and physical conditions (dust, vibration, and stray light) as well as transferability of the equations developed between various instrument in the same period of time and the transferability to the newer version of instrument and software upon the end of instrument life span.


## 1.3. Chemometrics

Optical measurement results connected with chemical analysis and statistics are called chemometrics. Chemometrics has become an established technique for handling chemical data. Good reviews of chemometrics are provided by Geladi and Grahn [18], and Workman and Springsteen [19], and Koljonen et al. [20], which present a review of genetic algorithm optimization in chemometry. The next text is a short introduction for the subject, and for a deeper insight, the previous reviews are recommended.The first step of chemometrics is to collect the data. This includes sample selection, measurements, and chemical analysis. The measurement geometry, measurement conditions, number of samples, and ingredients need to be very carefully designed and determined. The samples need to be representative of the food batches because interpolation or generalization of the model most probably does not work. The samples are first subjected to optical measurement and after that chemical analysis. One should also notice that the chemical analysis might sometimes provide unreliable results. Sometimes even the samples may change during time. The data should be divided into a training and test sets.After the measurements, the equations to transform optical data to chemical data should be set up. Since many functions and equations are available, it might be useful to test a couple of them to select the best results. After the selection, the equations need to be solved and coefficients to be determined with the training set. A typical approach for modeling is regression. The training of the model can be understood as a “calibration.” The optical methods are calibrated to produce the amount of a given substance or substances.The training data should be subjected to detection of residuals, outliers, and nonlinearity. The outliers should be excluded and nonlinearity corrected if present. Otherwise the results might be distorted. Typically the number of wavelengths from the optical measurements needs to be reduced due to their high amount and interdependence. Many techniques are available for wavelength reduction (e.g., splines or Savitzky-Golay filtering).Maybe the most often used regression models are multiple linear regression (MLR) or “ordinary” least squares (LS), ridge regression (RR), principal component regression (PCR), and partial least squares (PLS). The general equation for the regression is(1)y=b0+b1x1+b2x2+⋯+bkxk+f=b0+∑i=1kbixi+f=b0+f+BX,
where y is the response (from chemical analysis), xk are the predictors (from optical measurements, k pieces), bk are the regression coefficient to be determined, b0 is the offset and a constant factor, and f is the residual. If X and y are mean-centered, then b0=0.The solution for regression coefficient for the LS is(2)b=(XTX)-1XTy,
where T means transpose of the matrix. The LS may not work since the inverse might not exist or may be unstable. It is also notoriously sensitive to noise. The results should be also diagnosed using the following method: coefficient of determination and root mean squared error of calibration.A better solution for problems related to inversion can be RR:(3)b=(XTX+rI)-1XTy,
where I is an identity matrix and r is a ridge constant. The ridge constant should be as small as possible. However, there is no established method for the selection of the ridge constant or diagnostic of results.PCR also provides an easy inversion of matrices. It requires applying the principal component analysis (PCA) to reduce dimensions ofX and to obtain the eigenvectors. The eigenvectors are orthogonal. The PCA also reduces the noise present in X. The equation for regression can be formulated as
(4)y=Vd+f,d=(VTV)-1VTy,
where V is the principal components and d contains coefficients. The number of components needs to be determined by testing and checking.Assume thaty matrix consists of several measurements of y. PLS decomposes both y and X matrices. It also removes noise in both of these matrices. Its formulae are
(5)y=UQT+F,X=TPT+E,
where T and U are projections (principal components) of X and y on eigenvectors and P and Q are eigenvectors of X and y. The projections are obtained by decomposing the corresponding matrix. Error terms are marked as E and F.Both PLS and PCR calculate one component at a time using regression betweent and u. Then a residual is calculated and the calculation of the next component is based on this residual.The obtained results for equations need to be evaluated by using the test set. The predicted values are calculated using test values from the optical measurement set and parameters obtained from the training phase. The difference between actual and predicted values in the test set can be evaluated using the root mean squared error of prediction and the coefficient of determination.The visualization gives a good view of how the model is working. This could be done, for example, by plotting root mean squared error of calibration, root mean squared error of prediction, calculated loading plot, residual versus sample, and residual versus predicted test value.


## 1.4. Food Quality and Safety

### 1.4.1. Safety Factors

We consider here food safety to factors which may cause danger to health either directly or indirectly.(1)Foreign Bodies. A foreign body can be anything unwanted in a food product. It can be from the raw material for the product or external material added indeliberately; for example, the raw material can contain bones which are shattered to sharp bone fraction pieces during the manufacturing process. The product may be littered with machine parts due machine blistering or residues from other sources like pieces of plastic.(2)Incorrect, Contaminated, or Phony Ingredients in Product. Incorrect food ingredients refer here to any material which should not be in the food. They can be residues from previous production like peanut remnants or accidently added wrong material. The food can be contaminated from external sources like manure or too much pesticide. The phony ingredients are deliberately added to generate more income from consumers or manufacturers. The phony items can be rip-offs like cheap wine sold as a more expensive version or even very dangerous ones like melanin milk.(3)Spoilage. The spoilage is considered in this paper as a decomposition of the food. It is often a byproduct of the activity of harmful bioagents like fungi or bacteria. Other causes are wrong handling, like overheating, freezing or wrong harvesting time, wrong environment, like too hot environment or environment that has gases like ethene which mature fruits too fast, or age.(4)Bioagents: Fungi, Yeast, and Molds; Microbes, Bacteria, and Viruses. Fungi, yeast, or molds can be used in the production of certain food, but usually they are serious quality problems. This paper concentrates on articles on harmful effects of the bioorganisms like food poisoning or infections. The detection of smaller bioorganisms like bacteria or viruses is usually very hard due to their small size.


### 1.4.2. Quality Factors

Food quality consists of several factors. The validity or importance of a factor depends on the food group and on the evaluator. For example, the fat content is irrelevant for apples but very relevant for meat. The factors for this paper are appearance and taste.(1)Appearance. The appearance of food is related to the visual experience of the product. It is affected by the perceived colors and textures as well as personal preferences and opinions. The environment in which the food is presented has its own effect. Since the color perceived depends on the prevailing illumination, for example, there are already available special lamps to emphasize the color of meat. Good texture can be achieved with proper processing.(2)Taste. Taste is composed of several ingredients and is affected greatly by smell and also appearance. In this paper, we limit the taste to the actual food ingredients or state-like amount of sugar or acidity.Smell. The smell can be used to separate bad food from good food. It is also essential to make food more delicious.Juiciness. One attribute especially for fruit is juiciness. It is related to the water content and distribution of fruits.Noise. Consumers often expect certain noise when eating food like cereals.Freshness. Freshness is important especially for fish and other sea products.Authentication. Some food products have been falsified. An example of this kind of products is wine. Spectral methods can be used to separate authentic wine from nonauthentic wine. The NIR spectra is used for food authentication by Sun [21].Essential Ingredients. Food can contain many elements which have positive effects on health. These elements include, for example, flavonoids and vitamins in plants flavonoids and vitamins or omega-6 fatty acid in fish. It is generally thought that the higher the amount obtained from food the better the effect on health. Ingredients can be correlated using chemometrics.Unwanted Ingredients. Food contains also ingredients which consumers want to avoid for real or imaginary reasons. These ingredients can be preservatives which can in fact make the food safer. Other harmful ingredients include excessive amount of fat or salt.Unwanted Objects. Although food can be perfectly safe and edible, it can still contain unwanted objects. This kind of objects can range from machine parts to stones and insect parts.In their book, Workman and Weyer [22] explain theoretical backgrounds on how different qualities can be analyzed and found from NIR spectra; these qualities include alkanes and cycloalkanes, methylene groups, alkenes and alkynes, aromatic compounds, hydroxyls, water, carbonyls, amines and amides, carbohydrates, amino acids, peptides, and proteins.High Quality. Affordable price consistently.Chemometric Models. None known.


## 1.4.1. Safety Factors

We consider here food safety to factors which may cause danger to health either directly or indirectly.(1)Foreign Bodies. A foreign body can be anything unwanted in a food product. It can be from the raw material for the product or external material added indeliberately; for example, the raw material can contain bones which are shattered to sharp bone fraction pieces during the manufacturing process. The product may be littered with machine parts due machine blistering or residues from other sources like pieces of plastic.(2)Incorrect, Contaminated, or Phony Ingredients in Product. Incorrect food ingredients refer here to any material which should not be in the food. They can be residues from previous production like peanut remnants or accidently added wrong material. The food can be contaminated from external sources like manure or too much pesticide. The phony ingredients are deliberately added to generate more income from consumers or manufacturers. The phony items can be rip-offs like cheap wine sold as a more expensive version or even very dangerous ones like melanin milk.(3)Spoilage. The spoilage is considered in this paper as a decomposition of the food. It is often a byproduct of the activity of harmful bioagents like fungi or bacteria. Other causes are wrong handling, like overheating, freezing or wrong harvesting time, wrong environment, like too hot environment or environment that has gases like ethene which mature fruits too fast, or age.(4)Bioagents: Fungi, Yeast, and Molds; Microbes, Bacteria, and Viruses. Fungi, yeast, or molds can be used in the production of certain food, but usually they are serious quality problems. This paper concentrates on articles on harmful effects of the bioorganisms like food poisoning or infections. The detection of smaller bioorganisms like bacteria or viruses is usually very hard due to their small size.


## 1.4.2. Quality Factors

Food quality consists of several factors. The validity or importance of a factor depends on the food group and on the evaluator. For example, the fat content is irrelevant for apples but very relevant for meat. The factors for this paper are appearance and taste.(1)Appearance. The appearance of food is related to the visual experience of the product. It is affected by the perceived colors and textures as well as personal preferences and opinions. The environment in which the food is presented has its own effect. Since the color perceived depends on the prevailing illumination, for example, there are already available special lamps to emphasize the color of meat. Good texture can be achieved with proper processing.(2)Taste. Taste is composed of several ingredients and is affected greatly by smell and also appearance. In this paper, we limit the taste to the actual food ingredients or state-like amount of sugar or acidity.Smell. The smell can be used to separate bad food from good food. It is also essential to make food more delicious.Juiciness. One attribute especially for fruit is juiciness. It is related to the water content and distribution of fruits.Noise. Consumers often expect certain noise when eating food like cereals.Freshness. Freshness is important especially for fish and other sea products.Authentication. Some food products have been falsified. An example of this kind of products is wine. Spectral methods can be used to separate authentic wine from nonauthentic wine. The NIR spectra is used for food authentication by Sun [21].Essential Ingredients. Food can contain many elements which have positive effects on health. These elements include, for example, flavonoids and vitamins in plants flavonoids and vitamins or omega-6 fatty acid in fish. It is generally thought that the higher the amount obtained from food the better the effect on health. Ingredients can be correlated using chemometrics.Unwanted Ingredients. Food contains also ingredients which consumers want to avoid for real or imaginary reasons. These ingredients can be preservatives which can in fact make the food safer. Other harmful ingredients include excessive amount of fat or salt.Unwanted Objects. Although food can be perfectly safe and edible, it can still contain unwanted objects. This kind of objects can range from machine parts to stones and insect parts.In their book, Workman and Weyer [22] explain theoretical backgrounds on how different qualities can be analyzed and found from NIR spectra; these qualities include alkanes and cycloalkanes, methylene groups, alkenes and alkynes, aromatic compounds, hydroxyls, water, carbonyls, amines and amides, carbohydrates, amino acids, peptides, and proteins.High Quality. Affordable price consistently.Chemometric Models. None known.


## 1.5. Optimization

Optimization with NIR spectroscopy is mostly connected with the selection of optimal wavelengths that correlate best with the object of interest. Usually we want to use as few wavelengths as possible, since the less the data needs to be analyzed the faster it is. However, we need to be sure that the selected wavelengths are adequate for reliable results.A special type of genetic algorithms is called genetic programming (GP). It uses genetic algorithms to find a function or a program to solve a given problem. GP has been demonstrated to find solutions to problems that have been found by the most skilled engineers as patents and other inventions [23]. Another view of GP is to say that it is symbolic regression, that is, a method to find a function that best satisfies the given constraints. Yet another usage of GP is to find rules to explain data. GP is an extremely flexible method to solve computational intelligence problems. The main drawback of GP is its slow processing which prevents its usage in most online applications. However, in the systems design or similar phase, GP can be a nice tool to find good solutions automatically after the proper fitness function is implemented.While spectroscopy produces huge amounts of raw data, there is a strong need to automatically process this data to compress it and to find the features that are relevant or correlate to those that are looked for. Norris and Williams [24] used wavelength selection so that they selected 12 wavelengths that produced the closest prediction with the required constituent in wheat measurements, particle size, and protein content. Goodacre and Kell [25] have demonstrated spectroscopical imaging GP applications related directly or indirectly to food quality. More specifically the application was to find the algebraic formula of the wavelengths that give the best discrimination between the bacterial samples examined. More generally the authors claim that GP is one potential tool to decrypt metabolomic data for biomedical applications.With several materials, the VIS/NIR reflectance works best if the wavelengths used are optimized between 400 and 1800 nm [26]. This was also true with wholegrain measurement, where they found wavelengths between 1100 and 1400 nm giving the highest correlations with most of the constituents of interest with wholegrain measurements. However, the protein content was best determined from the 1700 to 2500 nm wavelength band.


### 1.5.1. Illustrative Example of Tomato Classification

The spectral methods lend themselves very well to fruit quality inspection. In this example, the transmittance spectra of tomatoes were measured using a spectrophotometer (Ocean optics). The spectra were further handled: they were smoothed to reduce noise and then downsampled by splines. An example of tomato spectra is shown in Figure4. The transmittance is measured from 400 nm to 1000 nm. The spectra differ in both visible and NIR areas. The difference is caused by the ripening process.Transmittance spectra for different tomatoes of the same cultivar from 400 nm to 1000 nm. (a) A raw tomato, (b) a partially raw tomato, (c) an acceptably ripe tomato, and (d) a ripe tomato.
(a)
(b)
(c)
(d)The spectral data itself contains a lot of information, part of which is in some cases irrelevant or redundant. The dimensionality of data can therefore be reduced. Here the locally linear embedding was used for this purpose in a nonlinear manner. The visualization of results can be seen in Figure5, in which the feature space is spanned by the first two embedded components.Figure 5
The feature space is spanned by the first two components. The red curve indicates the boundary between good and bad tomatoes. The good tomatoes are outside the red curve.The kernel Fisher discriminant (KFD) was used to classify tomatoes into good and bad ones. As shown in Figure5, the tomatoes are classified 100% correctly into these two groups. The red-colored tomatoes are ripe while the yellow and green are raw. The boundary between the groups is visualized with red curve (Figure 5).


## 1.5.1. Illustrative Example of Tomato Classification

The spectral methods lend themselves very well to fruit quality inspection. In this example, the transmittance spectra of tomatoes were measured using a spectrophotometer (Ocean optics). The spectra were further handled: they were smoothed to reduce noise and then downsampled by splines. An example of tomato spectra is shown in Figure4. The transmittance is measured from 400 nm to 1000 nm. The spectra differ in both visible and NIR areas. The difference is caused by the ripening process.Transmittance spectra for different tomatoes of the same cultivar from 400 nm to 1000 nm. (a) A raw tomato, (b) a partially raw tomato, (c) an acceptably ripe tomato, and (d) a ripe tomato.
(a)
(b)
(c)
(d)The spectral data itself contains a lot of information, part of which is in some cases irrelevant or redundant. The dimensionality of data can therefore be reduced. Here the locally linear embedding was used for this purpose in a nonlinear manner. The visualization of results can be seen in Figure5, in which the feature space is spanned by the first two embedded components.Figure 5
The feature space is spanned by the first two components. The red curve indicates the boundary between good and bad tomatoes. The good tomatoes are outside the red curve.The kernel Fisher discriminant (KFD) was used to classify tomatoes into good and bad ones. As shown in Figure5, the tomatoes are classified 100% correctly into these two groups. The red-colored tomatoes are ripe while the yellow and green are raw. The boundary between the groups is visualized with red curve (Figure 5).


## 2. Review of Hyperspectral/Multispectral Methods for Different Food Groups

This paper follows the FAO classification in grouping food which divides the food and animal feed into five classes:(i)
class A—primary food commodities of plant origin,(ii)
class B—primary food commodities of animal origin,(iii)
class C—primary animal feed commodities,(iv)
class D—processed foods of plant origin,(v)
class E—processed foods of animal origin.Each of these classes has subclasses. Class A consists of five subclasses: fruits, vegetables, grasses, nuts and seeds, and herbs and spices. Class B has the following classes: mammalian products, poultry products, aquatic animal products, amphibians and reptilians, and invertebrate animals. Class C has only one class, primary feed commodities of plant origin. Subclasses, which belong to class D, are secondary food commodities of plant origin, derived products of plant origin, manufactured foods (single ingredient) of plant origin, and manufactured foods (multi-ingredient) of plant origin. Class E is made of the following subclasses: secondary food commodities of animal origin, derived edible products of animal origin, manufactured food (single ingredient) of animal origin, and manufactured food (multi-ingredient) of animal origin.More detailed reviews of the selected papers for each of the classes can be found at the Appendices A (for class A), B (for class B), C (for class D), and D (for class E). The papers in class C are not considered in this paper.


### 2.1. Class A—Primary Food Commodities of Plant Origin

Class A has five groups: fruits, vegetables, grasses, nuts and seeds, and herbs and spices.The fruit group consists of 6 subgroups: citrus, pome and stone fruits, berries and other small fruits, and assorted tropical and subtropical fruits with edible or inedible peels. Optical and spectroscopic methods [27] and near-infrared spectroscopy [28] present a review of promising methods for fruit quality.Vegetables include bulb vegetables, cabbage (Brassica (cole or cabbage) vegetables, Head cabbages, Flowerhead cabbages), fruiting vegetables either cucurbits or other than cucurbits, leafy vegetables (including Brassica leafy vegetables), legume vegetables, pulses, root and tuber vegetables. Mushrooms and fungi belong also to this group. Reviews of vegetable quality have been made by Butz et al. [27] and Nicolaï et al. [28].The grasses have two groups: cereal grains and grasses used for sugar or syrup production. The nuts and seeds’ group consists of tree nuts, oilseed, and seed for beverages, and sweets. The herbs and spices’ group consists of herbs and spices as the name indicates.Table2 provides a short description for each of the subgroups of class A. We list parameters which have successfully been evaluated for the group and methods applied.Table 2
Different food groups, their parameters and methods applied for class A.
Food group/appendix
Examples of parameters evaluated and one of related research articles
Methods applied
Fruit/A.1
Quality
Taste (Mehinagic et al. [46])
Content
(i) Sugar (Walsh et al. [47])
MLR, PCR, PLS, PCAGenetic algorithms for wavelength and calibration model selection
(ii) Soluble solid (Carlini et al. [48])
(iii) acid content (León et al. [51])
(iv) water/moisture (Blakey et al. [50])
(v) titratable acidity and ph (Ying and Liu [56])
(vi) vitamin C and polyphenol (Pissard et al. [57])
Translucency (Terdwongworakul et al. [53])
Internal quality (Magwaza et al. [54])
Maturity (Tanaka and Kojima [58])
Defects (Blasco et al. [262])
Safety
Internal insect detection (Xing et al. [60])
Fecal and other contaminations (Kim et al. [61] and  Mehl et al. [263])
Storage (Veraverbeke et al. [63])
Vegetables/A.2
Quality
Texture metrics, wavelength selection, PLS, MLR, PCA
Appearance (Flores Rojas [65] and Gowen et al. [84])
Content
(i) Cyst nematode (Fernández Pierna et al. [64])
(ii) Sugar (Tsuta et al. [67])
(iii) Soluble solid content, lycopene,β-carotene,
and carotenoid (Pedro and  Ferreira [68])
(Iv) Protein (Liu et al. [69])
(v) Phytic acid (Delwiche et al. [73])
(vi) Dry matter (Van Dijk et al. [70])
(vii) Protein (Pazdernik et al. [75])
(viii) Freshness (Esquerre et al. [81])
(ix) Moisture (Lamb and Hurburgh Jr. [78])
Structural characteristics (Siska and Hurburgh Jr. [83])
Damage (Esquerre et al. [81])
Safety
Incorrect ingredients (Roggo et al. [72])
Bioagents (Pearson and Wicklow [85] )
Grasses/A.3
Quality
PLS, MLR, PCA
Content
(i) Moisture, gluten, alveograph parameters, and protein (Miralbés [90])
(ii) Scab, vomitoxin, and ergosterol (Dowell et al. [89])
(iii) Rutin and D-chiro-inositol (Yang and Ren [91])
(iv) Carotenoids (Brenna and Berardo [92])
(v) Phenolics and antioxidant capacity (Zhang et al. [94])
(vi) Neutral acid detergent fibers and acid detergent lignin (Stubbs et al. [95])
(vii) Nitrogen and protein (Wiley et al. [96])
structural characteristics
(i) Softness/hardness (Manley et al. [98])
(ii) Density (Siska and Hurburgh Jr. [83])
Taste (Kawamura et al. [99])
Safety
many impurities like plastics or faeces (Fernández Pierna et al. [64])
Nuts and seeds/A.4
Quality
PLS
Content
(i) Moisture, fat, stearic acid, and oleic acids (Davrieux et al. [100])
(ii) Sinigrin, gluconapin, and glucosinolate (Font et al. [101])
(iii) Lipids, water, protein, and chlorophyll (Font et al. [102])
(iv) Oil and fatty acid content (Kim et al. [103])
(v) Starch (Hacisalihoglu et al. [104])
(vi) Amino acids (Wang et al. [105])
Authentication (Downey et al. [107])
Herbs and spices/A.5
Quality:
PLS
Content
(i) Kava pyrones (Gautz et al. [110])
(ii) Moisture, volatile content, and coloring strength (Zalacain et al. [111]
(iii) Curcuminoids (Tanaka et al. [112])
(iv) Ginsenosides (Ren and Chen [113])
(v) Lignans (Kwan et al. [114])
Origin (Zalacain et al. [111])


### 2.2. Class B—Primary Food Commodities of Animal Origin

Class B consists of the following groups: mammalian products, poultry products, aquatic animals, amphibians and reptilians, and invertebrate animals. Examples of publications can be found at Table3.Table 3
Class B groups.
Food group/appendix
Examples of parameters evaluated and one of related research articles
Methods applied
Mammalian products/B.1
Quality
Color, geometrical features, textureMultivariate data analysis, ratios, MLR, PCA, PLS
Taste (Byrne et al. [120])
Color (Van den Oord and Wesdorp [124])
Diet (Prieto et al. [130])
Content
(i) pH (Andrés et al. [128])
(ii) Moisture (Chan et al. [135])
(iii) Fat (Sierra et al. [136])
(iv) Iron (Hong and Yasumoto [139])
(v) Protein and dry content (Prieto et al. [140])
Maturity (Prieto et al. [154]) Shear force (Yancey et al. [155])
Tenderness (Shackelford et al. [126])
Texture (Byrne et al. [[120])
Sensory characteristics (Prieto et al. [159])
Structural properties (Shackelford et al. [126])
Drip loss (Geesink et al. [160])
Authentication (Dian et al. [168] and Arvanitoyannis and Houwelingen-Koukaliaroglou [264])
Freshness (Downey and Beauche^ne [173])
Safety
Spoilage (Horváth et al. [116])
Contamination (Windham et al. [118])
Bioagents (Ellis et al. [117])
Adulteration of milk (Sato et al. [181])
Poultry products/B.2
Quality
Wavelength selectionPLS Correlation
Content (fat, protein, iron)
Authenticity/origin (Hong and Yasumoto [139])
Storage and handling (Liu et al. [192])
Safety
Safety in general (Chen et al. [182])
Fecal contamination (Park et al. [188])
Spoilage (Lin et al. [190])
Aquatic animal products/B.3
Quality
WavelengthPCA, linear discriminant analysisPLS
TemperatureAppearance (olsen [195])
Identification/authentication (Cozzolino et al. [197])
Freshness (Uddin et al. [198])
Content
(i) Water, fat, and protein (Gjerde and Martens [204])
(ii) Free fatty acids (Zhang and Lee [203])
(iii) Salt and moisture (Huang et al. [7])
(iv) Crude lipid (Mathias et al. [209])
Defects like bruises (Lin et al. [211])
Safety
Incorrect ingredients (Font et al. [212])
Spoilage (Lin et al. [202])
Invertebrate animals and spices/B.5
Quality
PLC, PCA
Authenticity (Gayo and Hale [213])
Content (Brown [215])Mammalian products consist of nonmarine meat, mammalian fats, edible offals, and milks. It seems that NIR technologies are more acceptable, for example, to the AOAC (Association of Official Agricultural Chemists).The poultry can be studied by other optical techniques than just reflectance or transmittance. Autofluorescence has been suggested for food by Andersen et al. [29] and for poultry by Wold and Mielnik [30].FAO includes in aquatic animals fish (freshwater, marine and diadromous, i.e., migrating between fresh and saltwater), fish roe and milt, fish offals, marine mammals, and crustaceans. Seafood and its products are an important source of nutrition [31]. Their special challenge is the changes in properties from the moment of catch or harvest due to metabolic processes, microbiological processes, and microbiological fauna change. This change is described as a function of spoilage and freshness parameters.The invertebrate animals’ group consists of molluscs (includingcephalopods) and other invertebrate animals.


### 2.3. Class D—Processed Foods of Plant Origin

Class D has four groups: secondary food commodities of plant origin, derived products of plant origin, manufactured foods (single ingredient) of plant origin, and manufactured foods (multi-ingredient) of plant origin.Secondary food commodities of plant origin are dried fruits, vegetables and herbs, secondary food commodities of plant origin, and miscellaneous secondary food commodities of plant origin.Derived products of plants for human consumption include cereal grain milling fractions, teas, vegetable oils: crude, edible, or refined, origin including miscellaneous derived edible products of plant origin, and fruit juices.Manufactured foods (single ingredient) of the plant origin group naturally consist of fruits, vegetables, or miscellaneous manufactured single-ingredient foods from plants. Manufactured foods (multi-ingredient) of the plant origin group are all manufactured, multi-ingredient cereal products. Table4 shows examples of published works in this area.Table 4
Class D food groups, their parameters, and methods applied.
Food group/appendix
Examples of parameters evaluated and one of related research articles
Methods applied
Secondary food commodities of plant origin/D.1
Content
Wavelength selectionPLSPCA
(i) Starch, sugar, nitrogen, and ash (Lebot et al. [216])
(ii) Hollow heart (Dacal-Nieto et al. [217])
(iii) Bioactive components (Jourbert et al. [218])
(iv) Glucan and protein (Bellato et al. [219])
Adulteration (Laasonen et al. [224])
Derived products of plant origin/D.2
Content
Multivariate calibrationPLS, MLR
(i) Dry extract and sugars (Li et al. [225])
(ii) Acids (Chen et al. [226])
(iii) Alcohol (González-Sáiz et al. [227])
(iv) Soluble solids and pH (Liu and He [229])
(v) Oils (Ng et al. [230])
Manufactured foods (single ingredient) of plant origin aquatic animal products/D.3
Content
Wavelength selectionPLS, LS, PCA
(i) Carbohydrate (Chen and Lei [232])
(ii) Soluble solids and pH (Liu et al. [238])
(iii) Methanol (Dambergs et al. [233])
(iv) Acids (Fan et al. [236])
Protein-lipid-carbohydrate interactions (Bruun [237])
Authentication (Cozzolino et al. [239])Age
manufactured foods (multi-ingredient) of plant origin/D.4
Content
PLSWavelength selection
Fat (Vines et al. [243])
Moisture (Kays et al. [245])
Impurity (Fernández Pierna et al. [64])
Total fiber amount (Kays et al. [246])
Structural properties (de Alencar Figueiredo et al. [253])
Handling and fermentation (Bruun et al. [254])


### 2.4. Class E—Processed Foods of Animal Origin

Class E has the following subgroups: secondary food commodities of animal origin, derived edible products of animal origin, manufactured food (single-ingredient) of animal origin, and manufactured food (multi-ingredient) of animal origin.Secondary food commodities of animal origin consist of dried meat and fish products and secondary milk products. We include here also products using dried meat and fish. An example of this is ham.Derived edible products of the animal origin group include processed crustaceans and animals, milk, and derived fats. Manufactured food (single ingredient) of the animal origin group is the manufactured milk products using only single ingredient.Manufactured milk products using multi-ingredient belong to manufactured food (single ingredient) of the animal origin group. Here we consider dairy products like cheese or yogurts. Some publications has been listed in Table5.Table 5
Different food groups, their parameters, and methods applied for class E.
Food group/appendix
Examples of parameters evaluated and one of related research articles
Methods applied
Secondary food commodities of animal origin/E.1
Appearance (García-Rey et al. [257])
Wavelength
Manufactured food (multi-ingredient) of animal origin/E.5
Appearance (Lucas et al. [258])Smell and taste (Çelik [259])Content (Lucas et al. [258], Arvanitoyannis and Van Houwelingen-Koukaliaroglou [264])pH (Navrátil et al. [260])Origin (Cozzi et al. [261])Authenticity (Woodcock et al. [265])
PLS, wavelengthdiscriminant analysis


### 2.5. Other Foods Not Included in FAO Criteria

Some foods are not included in FAO classification although they are commonly used. For example, honey is not included. There is no clear category for processed foods like hamburgers or sausages. Some of the research done for these foods is introduced here.


#### 2.5.1. Authentication

There have been cases in which the ingredients of manufactured food have been replaced by a cheaper version. For example, beef hamburger can be adulterated with mutton, pork, skim milk powder, or wheat flour. Ding and Xu [32] used near-infrared for detecting and evaluating the adulteration level in the adulterated hamburgers with 5–25% phony ingredients. The accuracy increases as a function of adulteration rate since there were more ingredients to be detected. The highest detection rate was 92.7%.ElMasry et al. [33] have applied hyperspectral imaging (Imspector N17E, Specim, Spectral Imaging Ltd., Oulu, Finland) in the region 900–1700 nm for predicting colour, pH, and tenderness of fresh beef. With more improvement in terms of speed and processing, their approach has potential for nondestructive quality measurements.Liao et al. [34] have used VIS/NIR reflectance spectroscopy for the online assessment of the pH value in fresh pork. Their result show that VIS/NIR spectroscopy can be used for the online prediction of pH and that wavelength selection can provide a cost-effective calibration model. For wavelength selection, they compared variable importance in projection (VIP), uninformative varible elimination (UVE), genetic algorithms, and success project algorithm (SPA).Collell et al. [35] have used NIR reflectance spectroscopy to predict moisture, water activity, and salt content on the surface of dry-cured ham during the process. Their results show that the proposed method could be used in the dry-curing process of ham. However, the optical properties of the meat surface seem to strongly affect the measured spectra.Authenticity and origin are also important issues for honey especially when it is claimed to be collected by bees from certain flowers. One example is avocado honey. Dvash et al. [36] applied near-infrared reflectance spectroscopy to obtain the concentration of specific sugar (perseitol) for this honey.Downey and Kelly [37] studied sulfited strawberry and raspberry purées which have been adulterated with cooked apples (10–75% w/w). They applied VIS and NIR transreflectance measurement on 0.1 mm thick samples. The best wavelength bands were 400–1098 nm with 75% correct classification rate for strawberry and 750–1098 nm with 95% rate for raspberry. PLS regression was used for the prediction of apple content with 400–1880 nm range for raspberry and with 1100–1880 nm range for strawberry. They concluded that apple adulteration can be detected if its content exceeds 25% for raspberry and 20% for strawberry purées.Fügel et al. [38] made a review about authenticity control of fruit purées, fruit preparations, and jams.


#### 2.5.2. Content

Qiu et al. [39] applied near-infrared transmittance to quantify the chemical content of honey. They found that 1 mm optical path length was the best for this purpose. Modified partial least squares were applied for the determination of content except for moisture. Moisture was determined using just partial least squares. The models were successful for fructose, glucose, sucrose, and maltose content but poor and unreliable for free acid, lactone, and hydroxymethylfurfural.NIR spectroscopy is applicable also for wholemeals. Fontaine et al. [40] used near-infrared for detecting essential amino acids for different meals. They concluded that the NIRS calibration model was good for evaluating the content of protein-rich feed ingredient for amino acids methionine, cystine, lysine, and threonine, tryptophan with 85–98% variation explained and was better than crude protein regression. The protein and moisture contents were also evaluated.Kim et al. [41] used NIR reflectance (400–2498 nm) and partial least-square modeling to detect the total dietary fiber in meals. Meals have different handling alternatives: homogenization, homogenization and drying, and homogenization, drying, and defatting. The reference method for total dietary fiber evaluation was AOAC 991.43. The predictions were good. The main advantage over the NIR-based method was faster evaluation. The traditional method takes 4 days.Zeng et al. [42] developed a NIR transmission system for determining the amount of starch in liquid gravies with low concentration. The best wavelengths were 605, 623, 919, 1017, and 1031 nm for the regression model. The starch content makes possibility to evaluate the viscosity of liquid gravies.


#### 2.5.3. Authenticity

Sausages can be made with different fats. In some cases, sausages can be identified based on their fat substitutes [43]. The quality of them has been studied, for example, by Gaitán-Jurado et al. [44] and Ortiz-Somovilla et al. [45].


## 2.1. Class A—Primary Food Commodities of Plant Origin

Class A has five groups: fruits, vegetables, grasses, nuts and seeds, and herbs and spices.The fruit group consists of 6 subgroups: citrus, pome and stone fruits, berries and other small fruits, and assorted tropical and subtropical fruits with edible or inedible peels. Optical and spectroscopic methods [27] and near-infrared spectroscopy [28] present a review of promising methods for fruit quality.Vegetables include bulb vegetables, cabbage (Brassica (cole or cabbage) vegetables, Head cabbages, Flowerhead cabbages), fruiting vegetables either cucurbits or other than cucurbits, leafy vegetables (including Brassica leafy vegetables), legume vegetables, pulses, root and tuber vegetables. Mushrooms and fungi belong also to this group. Reviews of vegetable quality have been made by Butz et al. [27] and Nicolaï et al. [28].The grasses have two groups: cereal grains and grasses used for sugar or syrup production. The nuts and seeds’ group consists of tree nuts, oilseed, and seed for beverages, and sweets. The herbs and spices’ group consists of herbs and spices as the name indicates.Table2 provides a short description for each of the subgroups of class A. We list parameters which have successfully been evaluated for the group and methods applied.Table 2
Different food groups, their parameters and methods applied for class A.
Food group/appendix
Examples of parameters evaluated and one of related research articles
Methods applied
Fruit/A.1
Quality
Taste (Mehinagic et al. [46])
Content
(i) Sugar (Walsh et al. [47])
MLR, PCR, PLS, PCAGenetic algorithms for wavelength and calibration model selection
(ii) Soluble solid (Carlini et al. [48])
(iii) acid content (León et al. [51])
(iv) water/moisture (Blakey et al. [50])
(v) titratable acidity and ph (Ying and Liu [56])
(vi) vitamin C and polyphenol (Pissard et al. [57])
Translucency (Terdwongworakul et al. [53])
Internal quality (Magwaza et al. [54])
Maturity (Tanaka and Kojima [58])
Defects (Blasco et al. [262])
Safety
Internal insect detection (Xing et al. [60])
Fecal and other contaminations (Kim et al. [61] and  Mehl et al. [263])
Storage (Veraverbeke et al. [63])
Vegetables/A.2
Quality
Texture metrics, wavelength selection, PLS, MLR, PCA
Appearance (Flores Rojas [65] and Gowen et al. [84])
Content
(i) Cyst nematode (Fernández Pierna et al. [64])
(ii) Sugar (Tsuta et al. [67])
(iii) Soluble solid content, lycopene,β-carotene,
and carotenoid (Pedro and  Ferreira [68])
(Iv) Protein (Liu et al. [69])
(v) Phytic acid (Delwiche et al. [73])
(vi) Dry matter (Van Dijk et al. [70])
(vii) Protein (Pazdernik et al. [75])
(viii) Freshness (Esquerre et al. [81])
(ix) Moisture (Lamb and Hurburgh Jr. [78])
Structural characteristics (Siska and Hurburgh Jr. [83])
Damage (Esquerre et al. [81])
Safety
Incorrect ingredients (Roggo et al. [72])
Bioagents (Pearson and Wicklow [85] )
Grasses/A.3
Quality
PLS, MLR, PCA
Content
(i) Moisture, gluten, alveograph parameters, and protein (Miralbés [90])
(ii) Scab, vomitoxin, and ergosterol (Dowell et al. [89])
(iii) Rutin and D-chiro-inositol (Yang and Ren [91])
(iv) Carotenoids (Brenna and Berardo [92])
(v) Phenolics and antioxidant capacity (Zhang et al. [94])
(vi) Neutral acid detergent fibers and acid detergent lignin (Stubbs et al. [95])
(vii) Nitrogen and protein (Wiley et al. [96])
structural characteristics
(i) Softness/hardness (Manley et al. [98])
(ii) Density (Siska and Hurburgh Jr. [83])
Taste (Kawamura et al. [99])
Safety
many impurities like plastics or faeces (Fernández Pierna et al. [64])
Nuts and seeds/A.4
Quality
PLS
Content
(i) Moisture, fat, stearic acid, and oleic acids (Davrieux et al. [100])
(ii) Sinigrin, gluconapin, and glucosinolate (Font et al. [101])
(iii) Lipids, water, protein, and chlorophyll (Font et al. [102])
(iv) Oil and fatty acid content (Kim et al. [103])
(v) Starch (Hacisalihoglu et al. [104])
(vi) Amino acids (Wang et al. [105])
Authentication (Downey et al. [107])
Herbs and spices/A.5
Quality:
PLS
Content
(i) Kava pyrones (Gautz et al. [110])
(ii) Moisture, volatile content, and coloring strength (Zalacain et al. [111]
(iii) Curcuminoids (Tanaka et al. [112])
(iv) Ginsenosides (Ren and Chen [113])
(v) Lignans (Kwan et al. [114])
Origin (Zalacain et al. [111])


## 2.2. Class B—Primary Food Commodities of Animal Origin

Class B consists of the following groups: mammalian products, poultry products, aquatic animals, amphibians and reptilians, and invertebrate animals. Examples of publications can be found at Table3.Table 3
Class B groups.
Food group/appendix
Examples of parameters evaluated and one of related research articles
Methods applied
Mammalian products/B.1
Quality
Color, geometrical features, textureMultivariate data analysis, ratios, MLR, PCA, PLS
Taste (Byrne et al. [120])
Color (Van den Oord and Wesdorp [124])
Diet (Prieto et al. [130])
Content
(i) pH (Andrés et al. [128])
(ii) Moisture (Chan et al. [135])
(iii) Fat (Sierra et al. [136])
(iv) Iron (Hong and Yasumoto [139])
(v) Protein and dry content (Prieto et al. [140])
Maturity (Prieto et al. [154]) Shear force (Yancey et al. [155])
Tenderness (Shackelford et al. [126])
Texture (Byrne et al. [[120])
Sensory characteristics (Prieto et al. [159])
Structural properties (Shackelford et al. [126])
Drip loss (Geesink et al. [160])
Authentication (Dian et al. [168] and Arvanitoyannis and Houwelingen-Koukaliaroglou [264])
Freshness (Downey and Beauche^ne [173])
Safety
Spoilage (Horváth et al. [116])
Contamination (Windham et al. [118])
Bioagents (Ellis et al. [117])
Adulteration of milk (Sato et al. [181])
Poultry products/B.2
Quality
Wavelength selectionPLS Correlation
Content (fat, protein, iron)
Authenticity/origin (Hong and Yasumoto [139])
Storage and handling (Liu et al. [192])
Safety
Safety in general (Chen et al. [182])
Fecal contamination (Park et al. [188])
Spoilage (Lin et al. [190])
Aquatic animal products/B.3
Quality
WavelengthPCA, linear discriminant analysisPLS
TemperatureAppearance (olsen [195])
Identification/authentication (Cozzolino et al. [197])
Freshness (Uddin et al. [198])
Content
(i) Water, fat, and protein (Gjerde and Martens [204])
(ii) Free fatty acids (Zhang and Lee [203])
(iii) Salt and moisture (Huang et al. [7])
(iv) Crude lipid (Mathias et al. [209])
Defects like bruises (Lin et al. [211])
Safety
Incorrect ingredients (Font et al. [212])
Spoilage (Lin et al. [202])
Invertebrate animals and spices/B.5
Quality
PLC, PCA
Authenticity (Gayo and Hale [213])
Content (Brown [215])Mammalian products consist of nonmarine meat, mammalian fats, edible offals, and milks. It seems that NIR technologies are more acceptable, for example, to the AOAC (Association of Official Agricultural Chemists).The poultry can be studied by other optical techniques than just reflectance or transmittance. Autofluorescence has been suggested for food by Andersen et al. [29] and for poultry by Wold and Mielnik [30].FAO includes in aquatic animals fish (freshwater, marine and diadromous, i.e., migrating between fresh and saltwater), fish roe and milt, fish offals, marine mammals, and crustaceans. Seafood and its products are an important source of nutrition [31]. Their special challenge is the changes in properties from the moment of catch or harvest due to metabolic processes, microbiological processes, and microbiological fauna change. This change is described as a function of spoilage and freshness parameters.The invertebrate animals’ group consists of molluscs (includingcephalopods) and other invertebrate animals.


## 2.3. Class D—Processed Foods of Plant Origin

Class D has four groups: secondary food commodities of plant origin, derived products of plant origin, manufactured foods (single ingredient) of plant origin, and manufactured foods (multi-ingredient) of plant origin.Secondary food commodities of plant origin are dried fruits, vegetables and herbs, secondary food commodities of plant origin, and miscellaneous secondary food commodities of plant origin.Derived products of plants for human consumption include cereal grain milling fractions, teas, vegetable oils: crude, edible, or refined, origin including miscellaneous derived edible products of plant origin, and fruit juices.Manufactured foods (single ingredient) of the plant origin group naturally consist of fruits, vegetables, or miscellaneous manufactured single-ingredient foods from plants. Manufactured foods (multi-ingredient) of the plant origin group are all manufactured, multi-ingredient cereal products. Table4 shows examples of published works in this area.Table 4
Class D food groups, their parameters, and methods applied.
Food group/appendix
Examples of parameters evaluated and one of related research articles
Methods applied
Secondary food commodities of plant origin/D.1
Content
Wavelength selectionPLSPCA
(i) Starch, sugar, nitrogen, and ash (Lebot et al. [216])
(ii) Hollow heart (Dacal-Nieto et al. [217])
(iii) Bioactive components (Jourbert et al. [218])
(iv) Glucan and protein (Bellato et al. [219])
Adulteration (Laasonen et al. [224])
Derived products of plant origin/D.2
Content
Multivariate calibrationPLS, MLR
(i) Dry extract and sugars (Li et al. [225])
(ii) Acids (Chen et al. [226])
(iii) Alcohol (González-Sáiz et al. [227])
(iv) Soluble solids and pH (Liu and He [229])
(v) Oils (Ng et al. [230])
Manufactured foods (single ingredient) of plant origin aquatic animal products/D.3
Content
Wavelength selectionPLS, LS, PCA
(i) Carbohydrate (Chen and Lei [232])
(ii) Soluble solids and pH (Liu et al. [238])
(iii) Methanol (Dambergs et al. [233])
(iv) Acids (Fan et al. [236])
Protein-lipid-carbohydrate interactions (Bruun [237])
Authentication (Cozzolino et al. [239])Age
manufactured foods (multi-ingredient) of plant origin/D.4
Content
PLSWavelength selection
Fat (Vines et al. [243])
Moisture (Kays et al. [245])
Impurity (Fernández Pierna et al. [64])
Total fiber amount (Kays et al. [246])
Structural properties (de Alencar Figueiredo et al. [253])
Handling and fermentation (Bruun et al. [254])


## 2.4. Class E—Processed Foods of Animal Origin

Class E has the following subgroups: secondary food commodities of animal origin, derived edible products of animal origin, manufactured food (single-ingredient) of animal origin, and manufactured food (multi-ingredient) of animal origin.Secondary food commodities of animal origin consist of dried meat and fish products and secondary milk products. We include here also products using dried meat and fish. An example of this is ham.Derived edible products of the animal origin group include processed crustaceans and animals, milk, and derived fats. Manufactured food (single ingredient) of the animal origin group is the manufactured milk products using only single ingredient.Manufactured milk products using multi-ingredient belong to manufactured food (single ingredient) of the animal origin group. Here we consider dairy products like cheese or yogurts. Some publications has been listed in Table5.Table 5
Different food groups, their parameters, and methods applied for class E.
Food group/appendix
Examples of parameters evaluated and one of related research articles
Methods applied
Secondary food commodities of animal origin/E.1
Appearance (García-Rey et al. [257])
Wavelength
Manufactured food (multi-ingredient) of animal origin/E.5
Appearance (Lucas et al. [258])Smell and taste (Çelik [259])Content (Lucas et al. [258], Arvanitoyannis and Van Houwelingen-Koukaliaroglou [264])pH (Navrátil et al. [260])Origin (Cozzi et al. [261])Authenticity (Woodcock et al. [265])
PLS, wavelengthdiscriminant analysis


## 2.5. Other Foods Not Included in FAO Criteria

Some foods are not included in FAO classification although they are commonly used. For example, honey is not included. There is no clear category for processed foods like hamburgers or sausages. Some of the research done for these foods is introduced here.


### 2.5.1. Authentication

There have been cases in which the ingredients of manufactured food have been replaced by a cheaper version. For example, beef hamburger can be adulterated with mutton, pork, skim milk powder, or wheat flour. Ding and Xu [32] used near-infrared for detecting and evaluating the adulteration level in the adulterated hamburgers with 5–25% phony ingredients. The accuracy increases as a function of adulteration rate since there were more ingredients to be detected. The highest detection rate was 92.7%.ElMasry et al. [33] have applied hyperspectral imaging (Imspector N17E, Specim, Spectral Imaging Ltd., Oulu, Finland) in the region 900–1700 nm for predicting colour, pH, and tenderness of fresh beef. With more improvement in terms of speed and processing, their approach has potential for nondestructive quality measurements.Liao et al. [34] have used VIS/NIR reflectance spectroscopy for the online assessment of the pH value in fresh pork. Their result show that VIS/NIR spectroscopy can be used for the online prediction of pH and that wavelength selection can provide a cost-effective calibration model. For wavelength selection, they compared variable importance in projection (VIP), uninformative varible elimination (UVE), genetic algorithms, and success project algorithm (SPA).Collell et al. [35] have used NIR reflectance spectroscopy to predict moisture, water activity, and salt content on the surface of dry-cured ham during the process. Their results show that the proposed method could be used in the dry-curing process of ham. However, the optical properties of the meat surface seem to strongly affect the measured spectra.Authenticity and origin are also important issues for honey especially when it is claimed to be collected by bees from certain flowers. One example is avocado honey. Dvash et al. [36] applied near-infrared reflectance spectroscopy to obtain the concentration of specific sugar (perseitol) for this honey.Downey and Kelly [37] studied sulfited strawberry and raspberry purées which have been adulterated with cooked apples (10–75% w/w). They applied VIS and NIR transreflectance measurement on 0.1 mm thick samples. The best wavelength bands were 400–1098 nm with 75% correct classification rate for strawberry and 750–1098 nm with 95% rate for raspberry. PLS regression was used for the prediction of apple content with 400–1880 nm range for raspberry and with 1100–1880 nm range for strawberry. They concluded that apple adulteration can be detected if its content exceeds 25% for raspberry and 20% for strawberry purées.Fügel et al. [38] made a review about authenticity control of fruit purées, fruit preparations, and jams.


### 2.5.2. Content

Qiu et al. [39] applied near-infrared transmittance to quantify the chemical content of honey. They found that 1 mm optical path length was the best for this purpose. Modified partial least squares were applied for the determination of content except for moisture. Moisture was determined using just partial least squares. The models were successful for fructose, glucose, sucrose, and maltose content but poor and unreliable for free acid, lactone, and hydroxymethylfurfural.NIR spectroscopy is applicable also for wholemeals. Fontaine et al. [40] used near-infrared for detecting essential amino acids for different meals. They concluded that the NIRS calibration model was good for evaluating the content of protein-rich feed ingredient for amino acids methionine, cystine, lysine, and threonine, tryptophan with 85–98% variation explained and was better than crude protein regression. The protein and moisture contents were also evaluated.Kim et al. [41] used NIR reflectance (400–2498 nm) and partial least-square modeling to detect the total dietary fiber in meals. Meals have different handling alternatives: homogenization, homogenization and drying, and homogenization, drying, and defatting. The reference method for total dietary fiber evaluation was AOAC 991.43. The predictions were good. The main advantage over the NIR-based method was faster evaluation. The traditional method takes 4 days.Zeng et al. [42] developed a NIR transmission system for determining the amount of starch in liquid gravies with low concentration. The best wavelengths were 605, 623, 919, 1017, and 1031 nm for the regression model. The starch content makes possibility to evaluate the viscosity of liquid gravies.


### 2.5.3. Authenticity

Sausages can be made with different fats. In some cases, sausages can be identified based on their fat substitutes [43]. The quality of them has been studied, for example, by Gaitán-Jurado et al. [44] and Ortiz-Somovilla et al. [45].


## 2.5.1. Authentication

There have been cases in which the ingredients of manufactured food have been replaced by a cheaper version. For example, beef hamburger can be adulterated with mutton, pork, skim milk powder, or wheat flour. Ding and Xu [32] used near-infrared for detecting and evaluating the adulteration level in the adulterated hamburgers with 5–25% phony ingredients. The accuracy increases as a function of adulteration rate since there were more ingredients to be detected. The highest detection rate was 92.7%.ElMasry et al. [33] have applied hyperspectral imaging (Imspector N17E, Specim, Spectral Imaging Ltd., Oulu, Finland) in the region 900–1700 nm for predicting colour, pH, and tenderness of fresh beef. With more improvement in terms of speed and processing, their approach has potential for nondestructive quality measurements.Liao et al. [34] have used VIS/NIR reflectance spectroscopy for the online assessment of the pH value in fresh pork. Their result show that VIS/NIR spectroscopy can be used for the online prediction of pH and that wavelength selection can provide a cost-effective calibration model. For wavelength selection, they compared variable importance in projection (VIP), uninformative varible elimination (UVE), genetic algorithms, and success project algorithm (SPA).Collell et al. [35] have used NIR reflectance spectroscopy to predict moisture, water activity, and salt content on the surface of dry-cured ham during the process. Their results show that the proposed method could be used in the dry-curing process of ham. However, the optical properties of the meat surface seem to strongly affect the measured spectra.Authenticity and origin are also important issues for honey especially when it is claimed to be collected by bees from certain flowers. One example is avocado honey. Dvash et al. [36] applied near-infrared reflectance spectroscopy to obtain the concentration of specific sugar (perseitol) for this honey.Downey and Kelly [37] studied sulfited strawberry and raspberry purées which have been adulterated with cooked apples (10–75% w/w). They applied VIS and NIR transreflectance measurement on 0.1 mm thick samples. The best wavelength bands were 400–1098 nm with 75% correct classification rate for strawberry and 750–1098 nm with 95% rate for raspberry. PLS regression was used for the prediction of apple content with 400–1880 nm range for raspberry and with 1100–1880 nm range for strawberry. They concluded that apple adulteration can be detected if its content exceeds 25% for raspberry and 20% for strawberry purées.Fügel et al. [38] made a review about authenticity control of fruit purées, fruit preparations, and jams.


## 2.5.2. Content

Qiu et al. [39] applied near-infrared transmittance to quantify the chemical content of honey. They found that 1 mm optical path length was the best for this purpose. Modified partial least squares were applied for the determination of content except for moisture. Moisture was determined using just partial least squares. The models were successful for fructose, glucose, sucrose, and maltose content but poor and unreliable for free acid, lactone, and hydroxymethylfurfural.NIR spectroscopy is applicable also for wholemeals. Fontaine et al. [40] used near-infrared for detecting essential amino acids for different meals. They concluded that the NIRS calibration model was good for evaluating the content of protein-rich feed ingredient for amino acids methionine, cystine, lysine, and threonine, tryptophan with 85–98% variation explained and was better than crude protein regression. The protein and moisture contents were also evaluated.Kim et al. [41] used NIR reflectance (400–2498 nm) and partial least-square modeling to detect the total dietary fiber in meals. Meals have different handling alternatives: homogenization, homogenization and drying, and homogenization, drying, and defatting. The reference method for total dietary fiber evaluation was AOAC 991.43. The predictions were good. The main advantage over the NIR-based method was faster evaluation. The traditional method takes 4 days.Zeng et al. [42] developed a NIR transmission system for determining the amount of starch in liquid gravies with low concentration. The best wavelengths were 605, 623, 919, 1017, and 1031 nm for the regression model. The starch content makes possibility to evaluate the viscosity of liquid gravies.


## 2.5.3. Authenticity

Sausages can be made with different fats. In some cases, sausages can be identified based on their fat substitutes [43]. The quality of them has been studied, for example, by Gaitán-Jurado et al. [44] and Ortiz-Somovilla et al. [45].


## 3. Conclusions

Nondestructive methods for food quality measurement are warmly welcomed by the food industry. Optical engineering provides a large variety of measurement techniques, some of which, like optical and near-infrared spectroscopy and imaging, have especially high potential for various food-quality-related measurements. And indeed, during the last few decades, it has seen an increasing number of applications, not only in food quality laboratories, but also in factories, and even in farm fields and orchards, where the food quality arises. In this paper, we have shortly described the most prominent application examples in this rapidly growing area of food quality techniques. Unfortunately there are already so many important works in this area that we were able to consider only a small fraction of the total literature existing, which means that too many important contributions had to be omitted from this paper. However, the authors hope that even in its current imperfect state this paper could help those who are trying to find solutions or model approaches to their food quality problems from optics, imaging, and spectroscopy.



---

*Source: 341402-2013-03-24.xml*