Multispectral Image Processing System for Precision Detection of
Reheated Coconut Oil
S. A. ARUNMOZHI, S. RENGALAXMI
Department of Electronics and Communication Engineering,
Saranathan College of Engineering, Trichy,
INDIA
Abstract: - In the pursuit of enhancing food safety protocols, this article explores a cutting-edge approach to
quality control in the coconut oil industry. We present a multispectral image processing system designed
specifically for the detection of reheated coconut oil, leveraging advancements in machine learning. Machine
learning algorithms, fused with image classification techniques, provide a robust framework for accurately
identifying reheated coconut oil. It is proposed to develop a spectral clustering-based classifier to determine the
effect of reheating and reuse of coconut oil. Post-processing methods refine classification results, while
validation ensures the system's adaptability to diverse datasets.
Key-Words: - Multispectral image, Accuracy, oil reheating, food safety, Convolutional neural network, image
classification.
5HFHLYHG-XO\5HYLVHG2FWREHU$FFHSWHG1RYHPEHU3XEOLVKHG'HFHPEHU
1 Introduction
In the ever-evolving landscape of food safety,
technological advancements play a pivotal role in
ensuring the quality and authenticity of
consumables. One such innovation takes center
stage as we explore the development of a
multispectral image processing system designed
specifically for the detection of reheated coconut oil.
Coconut (Cocos nucifera), belonging to the palm
family is a multipurpose tree with many uses. The
fibrous one-seeded drupe is used for the production
of coconut water, coconut milk, desiccated coconut,
and coconut oil. Coconut oil has been used as a
cooking or frying oil, as an ingredient in some
foods, production of skin care products and
pharmaceuticals among others. The use of frying oil
over and over many times is common in food
service establishments and at the domestic level to
cut down on the cost. However, unfortunately, the
chemicals and thermo physical properties are altered
during reuse and these physiochemical changes
compromise the safety of edible oils and thus make
fried foods unsafe for consumption. The image
processing technique for oil reheat detection can be
further improvised for not only coconut oil but also
for other types of oils like groundnut oil, palm oil,
sunflower oil, etc.
This mechanism can also be used to detect the
quality of fruits classifying them as raw, ripe, and
rotten classes. With some improvements, this can be
used in satellite imaging and military applications
with the advancements in broadband devices and
mobile technologies. In industries, it allows real-
time monitoring of the products during the
manufacturing process efficiently. The primary
objective of this system is to identify reheated
coconut oil accurately, leveraging multispectral data
sources. The significance lies in the ability to
enhance food safety measures, particularly in the
context of the coconut oil industry where the quality
of the product is paramount.
2 Related Works
The authors, [1], proposed Hyperspectral imaging
and chemometrics for real-time monitoring to
predict microbial growth on Longissimus dorsi
along the meat supply chain. The differential
scanning calorimetry method was to study the
thermal behavior of edible oil at elevated
temperatures, [2]. The authors, [3], presented the
significant elements of a computer vision system
and described the main aspects of image processing
technique with a review of the latest improvements
in the food industry. A multispectral imaging system
for detecting the percentage of the common
adulterant; tartrazine colored rice flour found in
turmeric powder was discussed in literature, [4]. In
[5], it was described that how hyperspectral imaging
is suitable for determining TVC value for evaluating
microbial spoilage of grass carp fillets in a rapid and
non-invasive manner. The previous study, [6],
WSEAS TRANSACTIONS on SIGNAL PROCESSING
DOI: 10.37394/232014.2023.19.21
S. A. Arunmozhi, S. Rengalaxmi
E-ISSN: 2224-3488
200
Volume 19, 2023
proposed the approach for quantifying mold growth
by providing an accurate tool for measuring
different segments of mold colonies. The method
was based on clustering multispectral images by k-
means, an unsupervised and simple clustering
algorithm. The hyperspectral imaging system was
explored for early detection of bruises on
‘McIntosh’ apples in the literature, [7].
Standardization of near-infrared hyperspectral
imaging for quantification and classification of
DON-contaminated wheat samples has been
investigated in [8]. The authors, [9], [10], discussed
the hyperspectral imaging and its applications. A
multispectral imaging system with two dichroic
beamsplitters, two band-pass filters, and three
prism-based 2CCD multispectral progressive area
scan cameras was developed in the literature, [11].
The fourier transform infrared spectroscopy method
for classification and quantification of
virgin coconut oil was discussed in [12]. A
hyperspectral imaging system was investigated for
real-time monitoring of water holding capacity in
red meat was discussed in the previous study, [13].
A multispectral imaging system in the visible and
near-infrared) regions was developed to determine
the aerobic plate count in cooked pork sausages,
[14]. The hyperspectral imaging method was
proposed, [15], to check the changes in
sarcoplasmatic and myofibrillar proteins contents in
boiled pork. The previous study, [16], discussed
methods for the classification and analysis of
multivariate observations. The authors, [17],
conducted a study to evaluate the effectiveness of
Fourier transform infrared spectroscopy in detecting
adulteration of virgin coconut oil with palm kernel
olein as a potential adulterant. The literature, [18],
provided a non-linear classification technique based
on Fisher's discriminant. The previous study, [19],
developed a spectral clustering algorithm that uses
the eigenvectors. Applications of near, mid, and
Raman infrared spectroscopy combined with
multivariate analysis in edible fats and oils were
discussed in [20].
3 Proposed Work
The primary objective of this work is to identify
reheated coconut oil accurately, leveraging
multispectral data sources. The significance lies in
the ability to enhance food safety measures,
particularly in the context of the coconut oil industry
where the quality of the product is paramount. The
Convolution Neural Network (CNN) algorithm is
used to determine the estimation of the oil reheating
count cycle. The proposed work contributes to
multispectral imaging under the food image analysis
research, and we are proposing two analytical
methods for the detection of oil reheating. It is to
determine the reheat level count class and to detect
significant chemical property changes in the oil. A
novel application was proposed for MISs to estimate
reheat cycle count class and discrimination of
appreciable alterations in the chemical and thermo
physical properties under repetitive heating for
frying oil, Machine learning algorithm is
implemented for the classification of food quality
conditions. CNN scheme-based algorithm is
implemented for predicting higher accuracy.
This paper presents two multistage signal
processing algorithms to estimate the level of
adulteration of authentic coconut oil, adulterated
with palm oil, and a mechanism to determine the
number of times a coconut oil sample has been
repeatedly heated. The algorithms are developed for
multispectral images acquired from an in-house
developed transmittance-based multispectral
imaging system. The MIS is also used as a visual
assistance for the reheating and to detect the
significant changes to the oil quality to help them
come to the conclusion the used oil is suitable for
consumption or not. This can be further
experimented with using palm oil etc.
To initiate the process, multispectral data is
collected from the data sets. The main part of the
system lies in its capability to extract relevant
spectral features indicative of reheated coconut oil.
Multispectral image processing systems play a
crucial role in extracting valuable information from
the electromagnetic spectrum, enabling a wide range
of applications for scientific, industrial, and
environmental purposes.Figure 1 describes the block
diagram of our proposed work which includes
preprocessing, image segmentation, feature
extraction and processing using CNN.
The proposed algorithms were applied to
independent samples with known adulteration
levels, and several reheats for validation.
Fig. 1: Block Diagram of Proposed Work
WSEAS TRANSACTIONS on SIGNAL PROCESSING
DOI: 10.37394/232014.2023.19.21
S. A. Arunmozhi, S. Rengalaxmi
E-ISSN: 2224-3488
201
Volume 19, 2023
4 Multispectral Imaging System
This multispectral imaging system was developed
based on 9 wavelengths selected from ultraviolet
(UV) to near-infrared (NIR) region of the
electromagnetic spectrum. The system comprises
five components. An LED switching circuit
consisting of diodes as described in the table, an
integrating hemisphere (inner diameter - 130mm
and made up of Aluminum), a monochrome camera
(FLIR Blackfly S Mono, 1.3 MP, USB3 Vision
camera, resolution - 1280 x 1024, ADC - 10 bit), a
discovery board (STM32F0). The emission
intensities of all the LEDs were adjusted to
approximately constant using the LED driver ICs
(MAX16839ASA+). The multispectral frequency
table provides the dominant wavelength and
bandwidth for UV, visible, and near-infrared (NIR)
regions. Table 1 provides the details.
Table 1. Multispectral Frequency Table
5 Results and Discussions
The data collection part is first described in this
section. A 30x30 window was cropped from the
multispectral image obtained from the imaging
system. The cropped image was reshaped into a 900
x 10 dimensional matrix. Each row of the matrix
corresponds to a pixel in the cropped image. The
first nine columns of the matrix represent the nine
spectral bands of the imaging system. The 10th
column represents the label of the included class.
Each value of entry can range from 0 to 255. The
dataset corresponds to images obtained of the
coconut oil adulterated by palm oil. The dataset
consists of 9 adulteration levels. Class 1 corresponds
to the 0% adulteration level. Each class steps by a
5% adulteration level up to 40% indicated by class9.
Each class consists of 15 replicates. Therefore, the
dataset includes 15 x 9 x 900 =121500 rows.
Another dataset corresponds to images obtained of
the coconut oil after reheating and reused for several
iterations (days). The dataset consists of 6 classes
corresponding to the number of days reheated from
0 to 5. Each class consists of 9 replicates. Therefore,
the dataset includes 9 x 6 x 900= 48600 rows.
Figure 2 shows the sample input image. In Figure 3,
the convolutional layer image is given. Figure 4
gives the corresponding output image.
Fig. 2: Input Image
Fig. 3: Convolutional Layer image
Fig. 4: Output Image
6 Conclusion
Coconut Oil has many uses in our domestic daily
life as well as industrial applications. In this paper,
LED
No.
Region
(UV, Visible
and NIR)
Manufacturer Part
Number
(Manufacture)
Bandwidth
(nm)
1
UV
VLMU3100 (Vishay)
10
2
Visible
SM0603BWC (Bivar)
50
3
SM1204PGC (Bivar)
20
4
5973209202F-ND
(Dialight)
10
5
5975112402F
(Dialight)
20
6
NIR
QBHP684-IR4BU
(QTBrightek (QTB))
20
7
VSMY2850G (Vishay)
10
8
VSMF4710-GS08
(Vishay)
10
9
VSMS3700-GS08
(Vishay)
20
WSEAS TRANSACTIONS on SIGNAL PROCESSING
DOI: 10.37394/232014.2023.19.21
S. A. Arunmozhi, S. Rengalaxmi
E-ISSN: 2224-3488
202
Volume 19, 2023
an algorithm was proposed for MISs to estimate
reheat cycle count class by using the physical
characteristics of the Coconut oil. The proposed
work introduced the transmittance configuration of
the MIS to acquire images of translucent liquid
specimens. This system gives a positive result to
both the market demand and the industrial use to
detect the reheat cycles of the oil we use. This can
be used by the food service providers and food
authorities for the adherence to health and safety
protocols regarding the safe reheating of coconut
oil. This could be used by the food authorities to
check the use of reheated oil which is under use in
the food establishments. The vendors also use the
MIS as a visual assistance for the reheating and to
detect the significant changes to the oil quality to
help them conclude that the used oil is suitable for
further use or is deemed unfit for consumption. The
datasets and the case study used in this system are
only based on coconut oil. Hence, we can also
expand the proposed system for other oils like palm
oil, groundnut oil, sunflower oil, and much more.
References:
[1] Achata EM, Oliveira M, Esquerre CA, Tiwari
BK, O'Donnell CP., Visible and NIR
hyperspectral imaging and chemometrics for
prediction of microbial quality of beef
Longissimus dorsi muscle under simulated
normal and abuse storage conditions, LWT.
2020, Vol.128.
[2] Bhuiyan, M. T. H., Chowdhury, M. N., Akter,
R., Rahman, M. H., Rahman, M. A., & Khan,
M., Determination of thermophysical
properties of edible oil at high temperature
using differential scanning calorimetry
(DSC). Middle-East Journal of Scientific
Research, 2016, Vol.24, No.10, pp. 3302-
3306.
[3] Brosnan, T., & Sun, D. W., Improving quality
inspection of food products by computer
vision––a review. Journal of Food
Engineering, 2004, Vol.61, No.1, pp.3-16.
[4] Bandara, W. G. C., Prabhath, G. W. K.,
Dissanayake, D. W. S. C. B., Herath, V. R.,
Godaliyadda, G. M. R. I., Ekanayake, M. P.
B., ... & Madhujith, T., Validation of
multispectral imaging for the detection of
selected adulterants in turmeric
samples. Journal of Food Engineering,
2020, Vol.266.
[5] Cheng, J. H., & Sun, D. W., Rapid and non-
invasive detection of fish microbial spoilage
by visible and near-infrared hyperspectral
imaging and multivariate analysis. LWT-food
Science and Technology, 2015, Vol. 62, No.2,
pp.1060-1068.
[6] Ebrahimi, P., van den Berg, F., Aunsbjerg, S.
D., Honoré, A., Benfeldt, C., Jensen, H. M., &
Engelsen, S. B., Quantitative determination of
mold growth and inhibition by multispectral
imaging. Food Control, 2015, Vol. 55, pp.82-
89.
[7] ElMasry, G., Wang, N., Vigneault, C., Qiao,
J., & ElSayed, A., Early detection of apple
bruises on different background colors using
hyperspectral imaging. LWT-Food Science
and Technology, 2008, Vol.41, No. 2, pp.337-
345.
[8] Femenias, A., Gatius, F., Ramos, A. J.,
Sanchis, V., & Marín, S., Standardisation of
near-infrared hyperspectral imaging for
quantification and classification of DON
contaminated wheat samples, Food
Control, 2020, Vol.111.
[9] Goel, M., Whitmire, E., Mariakakis, A.,
Saponas, T. S., Joshi, N., Morris, D., & Patel,
S. N., HyperCam: hyperspectral imaging for
ubiquitous computing applications.
In Proceedings of the 2015 ACM International
Joint Conference on Pervasive and Ubiquitous
Computing, 2015, pp. 145-156.
[10] Gowen, A. A., O'Donnell, C. P., Cullen, P. J.,
Downey, G., & Frias, J. M., Hyperspectral
imagingan emerging process analytical tool
for food quality and safety control, Trends in
food science & technology, 2007, Vol.18, No.
12, pp. 590-598.
[11] Huang, W., Li, J., Wang, Q., & Chen, L.,
Development of a multispectral imaging
system for online detection of bruises on
apples. Journal of Food Engineering, 2015,
Vol.146, pp.62-71.
[12] Jamwal, R., Kumari, S., Dhaulaniya, A. S.,
Balan, B., & Singh, D. K. (2020). Application
of ATR-FTIR spectroscopy along with
regression modeling for the detection of
adulteration of virgin coconut oil with paraffin
oil. Lwt, 2020, Vol.118.
[13] Kamruzzaman, M., Makino, Y., & Oshita, S.,
Hyperspectral imaging for real-time
monitoring of water holding capacity in red
meat. LWT-Food Science and Technology,
2016, Vol.66, pp. 685-691.
[14] Ma, F., Yao, J., Xie, T., Liu, C., Chen, W.,
Chen, C., & Zheng, L., Multispectral imaging
for rapid and non-destructive determination of
aerobic plate count (APC) in cooked pork
WSEAS TRANSACTIONS on SIGNAL PROCESSING
DOI: 10.37394/232014.2023.19.21
S. A. Arunmozhi, S. Rengalaxmi
E-ISSN: 2224-3488
203
Volume 19, 2023
sausages. Food Research International, 2014,
Vol.62, pp. 902-908.
[15] Ma, J., Cheng, J. H., Sun, D. W., & Liu, D.,
Mapping changes in sarcoplasmatic and
myofibrillar proteins in boiled pork using
hyperspectral imaging with spectral
processing methods. Lwt, 2019, Vol.110, pp.
338-345.
[16] MacQueen, J., Some methods for
classification and analysis of multivariate
observations. In Proceedings of the fifth
Berkeley Symposium on mathematical
statistics and probability. 1967, Vol. 1, No.
14, pp. 281-297.
[17] Manaf, M. A., Man, Y. B. C., Hamid, N. S.
A., Ismail, A., & Abidin, S. Z., Analysis of
adulteration of virgin coconut oil by palm
kernel olein using Fourier transform infrared
spectroscopy. Journal of Food Lipids, 2007,
Vol.14, No. 2, pp. 111-121.
[18] Mika, S., Ratsch, G., Weston, J., Scholkopf,
B., & Mullers, K. R. (1999, August). Fisher
discriminant analysis with kernels. In Neural
networks for signal processing IX:
Proceedings of the 1999 IEEE signal
processing society workshop (cat. no.
98th8468), 1999, pp. 41-48.
[19] Ng, A., Jordan, M., & Weiss, Y., On spectral
clustering: Analysis and an
algorithm. Advances in neural information
processing systems, 2001, pp.14.
[20] Nunes, C. A., Vibrational spectroscopy and
chemometrics to assess authenticity,
adulteration and intrinsic quality parameters
of edible oils and fats. Food Research
International, 2014, Vol.60, pp. 255-261.
Contribution of Individual Authors to the
Creation of a Scientific Article (Ghostwriting
Policy)
The authors equally contributed in the present
research, at all stages from the formulation of the
problem to the final findings and solution.
Sources of Funding for Research Presented in a
Scientific Article or Scientific Article Itself
No funding was received for conducting this study.
Conflict of Interest
The authors have no conflicts of interest to declare.
Creative Commons Attribution License 4.0
(Attribution 4.0 International, CC BY 4.0)
This article is published under the terms of the
Creative Commons Attribution License 4.0
https://creativecommons.org/licenses/by/4.0/deed.en
_US
WSEAS TRANSACTIONS on SIGNAL PROCESSING
DOI: 10.37394/232014.2023.19.21
S. A. Arunmozhi, S. Rengalaxmi
E-ISSN: 2224-3488
204
Volume 19, 2023