Can the Image Processing Technique Be Potentially Used to Evaluate Quality of Frying Oil?
The objective of this study was to investigate the feasibility of a computer vision system (CVS) for assessing the contact angle of frying oil. The oil was used to fry carbohydrate- and protein-based foods for 40 h, and the oil was collected for measuring free fatty acids (FFA), peroxide value (PV), total polar materials (TPMs), and FOS reading (dielectric constant). The results showed that FFA linearly increased with frying time (R2 > 0.95) while the polynomial correlation between TPMs and FOS reading as a result of time was observed (R2 > 0.97). The contact angle obtained from CVS was highly correlated with all chemical qualities (R2 > 0.94), except PV. In addition, the contact angle models could be used to adequately predict FFA, TPMs, and FOS reading of frying oil (R2 > 0.91). This result suggested that the image processing technique through CVS could be an appropriate alternative to chemical analysis, especially for small- and medium-scale industrial frying.
Deep-frying is one of the most common cooking processes to achieve desirable product attributes and is widely applied in small-, medium-, and large-scale industries. By this process, the food is submerged in hot oil at temperatures that range from 150 to 190°C. In the presence of moisture and oxygen during frying, a number of chemical reactions continuously occur such as lipid oxidation, hydrolysis, polymerization, and fission of the frying medium . These reactions produce various chemical products such as free fatty acids, conjugate diene/triene, peroxides, alcohol, aldehydes, ketones, and cyclic compounds , which can deteriorate the functional and sensory quality of both fried products and oils . Many of these compounds have been shown to have adverse effects on human health  such as metabolic alterations [5, 6], atherosclerosis [7, 8], hypertension , coronary heart disease , and cancer . Thus, evaluating the quality of frying oil through reliable methods is very important for public health and economic concerns.
There are physical and chemical indicators that have been developed and used to evaluate the quality of frying oil. In cases of street vendors and restaurants, visual inspection based on physical changes of color, foaming, odor, and smoking is widely used . However, this method is not reliable, and those physical parameters may manifest only when the oil has already become hazardous to be reused . For commercial enterprises, chemical indicators, such as free fatty acids (FFA), anisidine value (AV), peroxide value (PV), and total polar materials (TPMs), are mostly applied as these methods are more decisive to assess the quality of frying oil [13, 14]. Many fried-food industries in Thailand always use FFA as a fast indicator to discard the oil; however, this method only reflects hydrolytic changes . Although TPM analysis is more accurate in explaining the quality of frying oil , measuring polar compounds is complicated, time-consuming, and requires highly skilled personnel as well as the high investment cost of chemical agents, which is not fully acceptable for use at industrial scales. Other chemical methods might have low sensitivity and applicability and be discriminatory in investigating the quality of frying oil .
Presently, some methods such as Fourier transform infrared (FTIR) [18, 19], nuclear magnetic resonance (NMR) , low-field nuclear magnetic resonance (LF-NMR) , fluorescence spectroscopy , and gas/liquid chromatography  have been developed as alternative techniques to measure the quality of frying oils. These methods are very accurate and require low quantities of hazardous solvents, but the equipment is very expensive. Some test strip kits such as 3M™ oil quality test strips (3M, USA) and MQuant™ (Merck KGaA, Germany) have also been introduced as an easy and rapid test to monitor the level of FFA; some drawbacks of this method are that such strip is single-use only, it might be more expensive in long-term application when compared to some of the scientific options, and the color change of the strip sometimes is affected by the oil color, resulting in underestimation and/or overestimation of values when compared to the titratable acidity method . In addition, some digital testers such as Testo 270 (Testo Inc., Germany) and Ebro FOM 310 (Ebro®Electronic GmbH, Germany) have been developed for measuring the TPMs based on changes in the dielectric constant of the frying medium. However, Chen et al.  observed that some results from these testers were nearly 6 times higher than those of the standard method.
The computer vision system (CVS) is one of the most promising techniques that have potential in many areas of quality prediction, especially color evaluation [26, 27]. CVS basically consists of a standard illuminant, a digital camera, and computer hardware and software. Vithu and Moses  and Bhargava and Bansal  reported that CVS provides a less expensive and more versatile way to evaluate the quality of foods compared to human inspection or conventional measurement equipment. From our preliminary study, the CVS method was applied to measure the color of frying oils. The correlation between color parameters obtained from CVS and colorimeter and the correlation between hue (H) obtained from CVS and chemical qualities (FFA, PV, TPM, and dielectric constant) were investigated (Table 1). Due to the liquid depth and the background effects, low linear and nonlinear correlations were observed, particularly in PV values. Based on this result, the viscosity changes of frying oil due to the formation of surfactants were then considered as they influence the wettability of oil on horizontal and flat solid surfaces. The wettability is usually explained by the static contact angle (θ) between liquid and solid interaction. As presented in Figure 1, a contact angle of less than 90° indicates that the wetting of the surface is favourable and the liquid spreads over the solid surface, whereas a contact angle higher than 90° generally means the wetting of the surface in unfavourable, so forming a compact liquid droplet . Measuring the contact angle through the CVS method might be an option to explain the quality of frying oil. A study of Rossi et al.  showed that the contact angle obtained from a digital video microscope was suitable to use as an index of overall oil degradation. Nonetheless, the digital microscope has a limitation due to its lack of flexibility in industrial applications when compared to the digital camera, especially in small- and medium-scale enterprises. Therefore, the objective of this study was to assess the feasibility of using CVS with a digital camera for static contact angle measurement, and the correlations between contact angle and chemical qualities of oil used in frying of carbohydrate- and protein-based foods were investigated.
2. Materials and Methods
2.1. Sample Preparation
Prefried French fries (carbohydrate-based food) were purchased from Siam Macro (Thailand) Co. Ltd., Bangkok, Thailand, whereas prefried chicken nuggets (protein-based food) were obtained from Bangkok Produce Merchandising Co. Ltd., Saraburi Province, Thailand. All materials were frozen at −10°C before use and brought to the temperature of −4°C for 24 h before frying experiment. Refined palm olein was used as the frying medium and was supplied by Morakot Industry Co. Ltd., Bangkok, Thailand.
2.2. Frying Protocols
About 5 L of frying oil was placed in a 12-L commercial electric batch fryer (model RF 85 Roller Grill, Ramita Co. Ltd., Bangkok, Thailand) with temperature control. The oil was preheated to 175 ± 5°C for 15 min. Every 10 min, French fries (150 g) at an initial temperature of −4°C were fried for 5 min. The fried samples were then lifted out of the oil, and the oil was kept at 175°C for the rest of the cycle even if food materials were being unloaded. The gap between each cycle provided time for preparation of the next batch and allowed the temperature of the fryer to build backup. The frying experiment was held for 5 continuous days with frequent frying of 8 hours per day. Each experiment involved a total number of 240 frying cycles (48 cycles/day).
Every day at intervals of 4 and 8 h, about 50 mL of frying oil sample was collected while fresh oil was not added during frying. In the beginning of each day, the oil was not filtered and about 500 ml of fresh oil was added before the frying process to keep the oil level constant. The collected oil samples were kept in closed and dark containers and sealed to prevent oxidation. Then, the samples were cooled in a dark room at ambient temperature for 1 h. Afterwards, the samples were kept at −4°C until further FFA, PV, TPM, and FOS reading analyses. The leftover oil was kept in the pot, covered with a fryer cover, and left overnight at ambient temperature. A similar frying protocol was used for the protein-based food. The frying experiment was performed in triplicate.
2.3. Chemical Analysis
The percentage of FFA was analyzed using the AOCS procedure Ca 5a-40 . Briefly, 1 g of oil sample was weighed and then 10 mL of 95% ethanol and a phenolphthalein indicator were added to the Erlenmeyer flask. The mixture was shaken and immediately titrated with 0.1 N NaOH solution until a consistent pink color remained for 30 sec.
The PV value was analyzed by AOCS procedure Cd 8-53 . In brief, a known measured weight of the sample was dissolved with 30 mL of mixed chloroform: acetic acid (3 : 2, v/v). Subsequently, 1 mL of saturated potassium iodide solution was added to react with the sample for 3 min. The sample was then titrated with 0.1 N standard sodium thiosulfate using starch solution as an indicator.
The percentage of TPMs in the oil sample was analyzed using AOCS official method Cd 20-91 . A glass column with 35 cm length and 2.1 cm diameter was used for chromatography, and a mixture of petroleum and diethyl ether (87 : 13, v/v) was prepared as an eluent. About 2.5 g of sample was loaded into the packed column, and the nonpolar fraction was eluted. The content of TPMs was calculated as the mass fraction of the total polar compounds in the oil sample.
The dielectric property of oil samples was measured using the food oil sensor (model NI-2C, Northern Instrument Co., MN, USA). The instrument was firstly balanced to zero with the fresh oil, and a few drops of the fresh oil or test oil were placed into an open test cell that had a heater and temperature controller. Subsequently, the fresh oil was removed from the instrument cup with soft tissue paper and each oil sample was added in the cup to measure the change in dielectric constant. All the chemical tests were done in triplicate.
2.4. Computer Vision System
An image acquisition system consists of four basic components: illumination, camera, hardware, and software. To avoid direct reflection, a black wooden box 30 × 37 × 25 cm3 was equipped with two daylight fluorescent lamps (model T5, Sylvania, Havells Sylvania (Thailand) Co., Ltd., Thailand) with a color temperature of 3500 K, power of 9 W, voltage of 42 V, current of 0.17 A, length of 13.5 cm, and color rendering index up to 90% at the base of the box (Figure 2). The distance from the base to the floor was 40 cm. The lamps were switched on 10 min before image acquisition. In addition, a digital camera (model 550D, Canon Marketing (Thailand) Co. Ltd., Thailand) with a full resolution of 1280 × 720 pixels was used.
About 30 ± 0.3 mg of the oil sample was dropped on the glass surface at the temperature of 25°C using a fluid dispenser (model TS250, Techcon, OK International Co. Ltd., USA). To avoid contamination, the glass surface was previously cleaned with ethanol and allowed to dry for 1 min before using . Glass was chosen as it is a relatively nonwetting surface with oil at setting temperature, making the contact angle measurement feasible. However, glass surface might not be appropriate when the oil was dropped at high temperature as the oil droplet can spread over the surface. In this case, polytetrafluoroethylene (PTFE or Teflon) surface is highly recommended . The dispenser was controlled by the vacuum pump with a power of 0.25 hp (model TG-1, Tiger, Tirawat Air Compressor Co. Ltd., Bangkok). The distance between the tip of the syringe and glass surface was 0.3 cm. The camera lens was horizontally aligned with the glass surface, and the distance between the camera lens and sample was 20 cm. The capturing process was manually performed in the VDO mode with 25 frames per sec, shutter speed of 1/50, and ISO sensitivity of 160. To minimize the deviation of contact angle during dropping process, the VDO mode was selected instead of taking in the photo mode. For each oil sample, 10 different droplets were taken.
The VDO file was opened with a VLC media player, and twenty-five images were classified (Figure 3). The last image was selected as the dropped oil completely fell from the syringe. The digital image was converted to the grayscale mode, and then, the median and Roberts filters were applied to emphasize drop contour. Subsequently, the algorithm (Figure 4(c)) was developed to analyze the contact angle of dropped oil, and the analysis was done using the open CV software (version 2.1, Git Hub Inc., Russia). As could be seen in Figure 4(a), the position of “c” was moved at every pixel until the area of the “acd” triangle was covered (Figure 4(b)). Thereafter, the contact angle (CA) was calculated.
2.5. Statistical Analysis
The regression analyses were conducted using Microsoft Excel. Data were analyzed using SAS software (Ver. 9.0, SAS Inst., Cary, NC, USA), and significance was determined at the 5% probability level. Furthermore, the complete data set was randomly divided into calibration (50%) and validation (50%) sets. Coefficients of determination (R2) were calculated for evaluating correlations between contact angle and chemical qualities of frying oil. The mean absolute percentage error (MAPE) was used to evaluate the model performance as determined by the following equation:where Pexp is the experimentally observed parameters, Ppre is the predicted parameters, and N is the number of observations.
3. Results and Discussion
3.1. Changes of Chemical Qualities
The results showed that all chemical qualities of oil being used to fry carbohydrate- and protein-based foods increased with frying time (Figure 5).These are similar to a study of Santos et al.  and Udomkun et al.  who studied the change of frying medium during frying of potatoes and chicken nuggets, respectively. The highly linear relationship between FFA and frying time was observed (R2 > 0.95), while polynomial correlation was found in TPMs and FOS reading (R2 > 0.97) (Table 2). At the end of 40 h, the FFA content increased by 87% for carbohydrate-based foods and 89% for protein-based foods (Figure 5(a)). An increase of the FFA value can be explained by the effect of hydrolytic degradation of triacylglycerols caused by water vapor being released from the inside and surface of the food. The change of FFA content could be also caused by further oxidation of secondary products produced during frying . When considering the thermal oxidation through PV values, it could be seen that the level of PV fluctuated over the frying period (Figure 5(b)). However, it should be noted that these primary oxidation products such as FFAs, conjugated diene/triene, and hydroperoxides rapidly break down into secondary or tertiary oxidation products such as alcohols, aldehydes, conjugated dienoic acids, epoxides, and ketones [14, 37, 38]. For example, fatty acids in frying oil could be oxidized to form hydroperoxides and then undergo an intramolecular reaction, leading to the formation of a cyclic compound such as cyclohexene. This degraded product may be further oxidized to form benzene, which in turn reacts with a C4 compound to form naphthalene and other polycyclic aromatic hydrocarbons . Therefore, the total accumulation of PV in the frying medium can be greatly underestimated. Naz et al.  stated that the formation and accumulation rates of lipid oxidation products depend on frying temperature, heating time, frequency of frying, exposure to oxygen, and presence of antioxidants and prooxidants. Lynch et al.  suggested that measuring of malondialdehyde (MDA) or 4-hydroxynonenal (4-HNE)—the major aldehydes occurring in the secondary oxidation process—might be a good indicator for evaluating the oxidation process of frying oil as these aldehydes can form adducts with proteins and may have implications for protein stability and functionality.
TPM is normally used as an indicator to describe the formation of all oxidized and dimerized products such as oligomeric triacylglycerols, dimeric triacylglycerols, oxidized triacylglycerols, diacylglycerols, and FFAs [42, 43]. In this study, the TPM value quickly increased during the first 24 h of frying (Figure 5(c)). At the end of 24 h, the TPM value increased by 90% for carbohydrate-based and 83% for protein-based foods, and the increasing rate was less than 15% when the food was being fried from 24 to 40 h. Considering the changes of dielectric constant as measured by the FOS reading, the result showed that the FOS reading value also increased with frying time (Figure 5(d)). The FOS reading increased by 62% for both carbohydrate- and protein-based foods. Fritsch et al.  and Innawong et al.  mentioned that an increase in dielectric properties of frying oils is a result of TPM accumulation during frying. This is in agreement with a study of Wegmüller  who reported the linear correlation between FOS reading and polar components of frying oil.
To compare the effect of food type on oil degradation, the result did not clearly show different trends between carbohydrate- and protein-based foods, especially in TPM and FOS reading values. PV values seem to be higher in the carbohydrate-based food when compared to the protein-based food. This result might be ascribed to the intensive sorption of oxidized products in French fries . On the other hand, Koh and Surh  reported that carbohydrate-rich food has higher starch content when compared to other food groups and starch was shown to form hydrophobic helical structures which can entrap hydrophobic substances, resulting in the lower lipid oxidation rate. In the case of protein-based foods, peroxy radicals and hydroperoxides—the primary oxidation products—are known to react with thiol, sulphide, disulphide, and primary amine group of proteins , therefore inhibiting the occurrence of thermo-oxidized products. These results are in agreement with a study of Koh and Surh  who exhibited the less difference of lipid oxidation products (hydroperoxides, malondialdehyde, and nonvolatile aldehydes) between carbohydrate-rich (grains and root-based products) and meat (pork and chicken-based products) groups. While the level of lipid oxidation products was found to be highest in the fish group, they explained this phenomenon to the release of polyunsaturated fatty acids in fish during frying process.
3.2. Contact Angle and Its Correlation with Chemical Qualities
The result showed that the contact angle of oil droplets obtained from both carbohydrate- and protein-based frying decreased with frying time and a high linear relationship was found (R2 > 0.94) (Figure 6). An increase of frying time from 0 to 40 h resulted in a 19% decrease of the contact angle of carbohydrate-based frying, while a decrease of 21% was found in protein-based frying. This result is consistent with the formation of oxidative and hydrolytic degradation compounds, causing a reduction of food-oil interfacial tension and a concurrent contact angle reduction [31, 33].
Likewise, a highly linear relationship between contact angle and FFA was found (R2 > 0.93), whereas a polynomial correlation was observed between the contact angle and other chemical parameters (TPMs and FOS reading) with R2 > 0.95 (Figure 7 and Table 3). When validating the regression models of FFA, TPMs, and FOS reading (Figure 8), it could be seen that the contact angle value obtained from CVS was found to be satisfactory for predicting the experimental data (R2 = 0.91–0.95 and MAPE = 9.25–15.18). Based on the results, it clearly indicates that the contact angle provides greater correlation with chemical qualities than the color value obtained from CVS (Table 1). This correlation is in agreement with Rossi et al.  who reported a significant relationship between the contact angle and oxidative-hydrolytic reaction of oils. A study of Rossi et al.  found a reduction of contact angle with frying time due to the effect of surfactant compounds such as monoacylglycerols and diacylglycerols, which cause a reduction in food-oil interfacial tension; a similar trend to this study was also observed.
The prediction of FFA, TPMs, and FOS reading from the contact angle value obtained from CVS technique was highly possible. The changes of contact angle due to the formation of thermo-oxidative compounds is a promising technology, which can be applied as a simple, inexpensive, and reliable tool to predict and control chemical qualities of frying oil. However, the drawback of this technique is limited by temperature during measurement as it influences the interfacial tension between liquid and solid surfaces. Future work should include different types of frying medium and building CVS with a temperature control. In order to get more variables for improving prediction models, the geometrical information of the oil droplet is still required. In addition, a change of contact angle as a result of thermal polymerization can influence the amount of oil absorbed by the food during frying and postfrying. Therefore, the physical principles governing the contact angle and oil uptake of products should be considered. These will be more useful for a wide range of fried-food industries.
The data used to support the findings of this study are included within the article.
Conflicts of Interest
The authors have no conflicts of interest.
The authors gratefully acknowledge the Department of Food Technology, Silpakorn University, and the International Institute of Tropical Agriculture (IITA) for giving the opportunity to prepare this article.
Y.-F. Chiang, H.-M. Shaw, M.-F. Yang, C.-Y. Huang, C.-H. Hsieh, and P.-M. Chao, “Dietary oxidised frying oil causes oxidative damage of pancreatic islets and impairment of insulin secretion, effects associated with vitamin E deficiency,” British Journal of Nutrition, vol. 105, no. 9, pp. 1311–1319, 2011.View at: Publisher Site | Google Scholar
F. A. Kummerow, “Interaction between sphingomyelin and oxysterols contributes to atherosclerosis and sudden death,” American Journal of Cardiovascular Disease, vol. 3, no. 1, pp. 17–26, 2013.View at: Google Scholar
S. Karimi, M. Wawire, and F. M. Mathooko, “Impact of frying practices and frying conditions on the quality and safety of frying oils used by street vendors and restaurants in Nairobi, Kenya,” Journal of Food Composition and Analysis, vol. 62, pp. 239–244, 2017.View at: Publisher Site | Google Scholar
S. Lalas, “Quality of frying oil,” in Advances in Deep-Fat Frying of Foods, S. Sahin and S. G. Sumnu, Eds., pp. 57–80, CRC Press-Taylor & Francis Group, Boca Ratón, FL, USA, 2009.View at: Google Scholar
R. Cheikhousman, M. Zude, D. J.-R. Bouveresse, C. L. Léger, D. N. Rutledge, and I. Birlouez-Aragon, “Fluorescence spectroscopy for monitoring deterioration of extra virgin olive oil during heating,” Analytical and Bioanalytical Chemistry, vol. 382, no. 6, pp. 1438–1443, 2005.View at: Publisher Site | Google Scholar
Q. Zhang, W. Qin, M. Li, Q. Shen, and A. S. M. Saleh, “Application of chromatographic techniques in the detection and identification of constituents formed during food frying: a review,” Comprehensive Reviews in Food Science and Food Safety, vol. 14, no. 5, pp. 601–633, 2015.View at: Publisher Site | Google Scholar
W. Chen, C. Chiu, W. Cheng, C. Hsu, and M. Kuo, “Total polar compounds and acid values of repeatedly used frying oils measured by standard and rapid methods,” Journal of Food and Drug Analysis, vol. 21, no. 1, pp. 58–65, 2013.View at: Google Scholar
Y. Yuan and R. Lee, “Contact angle and wetting properties,” in Surface Science Techniques. Springer Series in Surface Science, G. Bracco and B. Holst, Eds., vol. 51, pp. 1–34, Springer-Verlarg, Berlin, Germany, 2013.View at: Google Scholar
AOCS, Official Methods and Recommended Practice of the American Oil Chemist Society, AOAC Press, Champaign, IL, USA, 5th edition, 1990.
T. Y. Kun, Improvements in the Frying Quality of Vegetable Oil by Blending with Palm Olein. Palm Oil Development No. 15, Palm Oil Research Institute of Malaysia (PORIM), Bangi, Malaysia, 1990.