ArticlePDF Available

Grading detection of “Red Fuji” apple in Luochuan based on machine vision and near-infrared spectroscopy

PLOS
PLOS ONE
Authors:

Abstract and Figures

A quality detection system for the “Red Fuji” apple in Luochuan was designed for automatic grading. According to the Chinese national standard, the grading principles of apple appearance quality and Brix detection were determined. Based on machine vision and image processing, the classifier models of apple defect, contour, and size were constructed. And then, the grading thresholds were set to detect the defective pixel ratio t , aspect ratio λ, and the cross-sectional diameter W p in the image of the apple. Spectral information of apples in the wavelength range of 400 nm~1000 nm was collected and the multiple scattering correction (MSC) and standard normal variable (SNV) transformation methods were used to preprocess spectral reflectance data. The competitive adaptive reweighted sampling (CARS) algorithm and the successive projections algorithm (SPA) were used to extract characteristic wavelength points containing Brix information, and the CARS-PLS (partial least squares) algorithm was used to establish a Brix prediction model. Apple defect, contour, size, and Brix were combined as grading indicators. The apple quality online grading detection platform was built, and apple’s comprehensive grading detection algorithm and upper computer software were designed. The experiments showed that the average accuracy of apple defect, contour, and size grading detection was 96.67%, 95.00%, and 94.67% respectively, and the correlation coefficient R p of the Brix prediction set was 0.9469. The total accuracy of apple defect, contour, size, and Brix grading was 96.67%, indicating that the detection system designed in this paper is feasible to classify “Red Fuji” apple in Luochuan.
Content may be subject to copyright.
RESEARCH ARTICLE
Grading detection of “Red Fuji” apple in
Luochuan based on machine vision and near-
infrared spectroscopy
Jin WangID, Yujia Huo, Yutong Wang, Haoyu Zhao, Kai Li, Li LiuID*, Yinggang ShiID
College of Mechanical and Electronic Engineering, Northwest A&F University, Yangling, Shaanxi, 712100,
China
*liuli_ren_79@nwafu.edu.cn
Abstract
A quality detection system for the “Red Fuji” apple in Luochuan was designed for automatic
grading. According to the Chinese national standard, the grading principles of apple appear-
ance quality and Brix detection were determined. Based on machine vision and image pro-
cessing, the classifier models of apple defect, contour, and size were constructed. And
then, the grading thresholds were set to detect the defective pixel ratio t, aspect ratio λ, and
the cross-sectional diameter W
p
in the image of the apple. Spectral information of apples in
the wavelength range of 400 nm~1000 nm was collected and the multiple scattering correc-
tion (MSC) and standard normal variable (SNV) transformation methods were used to pre-
process spectral reflectance data. The competitive adaptive reweighted sampling (CARS)
algorithm and the successive projections algorithm (SPA) were used to extract characteris-
tic wavelength points containing Brix information, and the CARS-PLS (partial least squares)
algorithm was used to establish a Brix prediction model. Apple defect, contour, size, and
Brix were combined as grading indicators. The apple quality online grading detection plat-
form was built, and apple’s comprehensive grading detection algorithm and upper computer
software were designed. The experiments showed that the average accuracy of apple
defect, contour, and size grading detection was 96.67%, 95.00%, and 94.67% respectively,
and the correlation coefficient R
p
of the Brix prediction set was 0.9469. The total accuracy of
apple defect, contour, size, and Brix grading was 96.67%, indicating that the detection sys-
tem designed in this paper is feasible to classify “Red Fuji” apple in Luochuan.
1 Introduction
Grading for sales is strongly needed to commercialize agricultural products and boost eco-
nomic benefits [1]. Automated apple grading can reduce manual work intensity and improve
the repeatability and accuracy of results. The external quality parameters for assessing apple
grades include surface defects, color, texture, size, and shape. The internal quality parameters
for assessing apple grades include degrees Brix, acidity, vitamins, water content, soluble solids,
internal quality defects, etc [2,3]. Based on these indicators, many experts and scholars have
PLOS ONE
PLOS ONE | https://doi.org/10.1371/journal.pone.0271352 August 4, 2022 1 / 25
a1111111111
a1111111111
a1111111111
a1111111111
a1111111111
OPEN ACCESS
Citation: Wang J, Huo Y, Wang Y, Zhao H, Li K, Liu
L, et al. (2022) Grading detection of “Red Fuji”
apple in Luochuan based on machine vision and
near-infrared spectroscopy. PLoS ONE 17(8):
e0271352. https://doi.org/10.1371/journal.
pone.0271352
Editor: Felix Yao Huemabu Kutsanedzie, Accra
Technical University, GHANA
Received: February 8, 2022
Accepted: June 28, 2022
Published: August 4, 2022
Copyright: ©2022 Wang et al. This is an open
access article distributed under the terms of the
Creative Commons Attribution License, which
permits unrestricted use, distribution, and
reproduction in any medium, provided the original
author and source are credited.
Data Availability Statement: All relevant data are
within the paper and its Supporting Information
files.
Funding: Shaanxi Province Key Research and
Development Projects of China (2020NY-144,
2019NY-171, 2019ZDLNY02-04), Innovative
Training Program for College Students of
Northwest A&F University (202110712136),
National Natural Science Foundation of China
(31971805), And National Key Research and
carried out relevant research on automatic apple grading. Among them, there are a relatively
large number of studies on automatic apple grading algorithms based on machine vision [4
6]. Additionally, in terms of injury-free detection technology for agricultural products, spec-
troscopy technology has undergone rapid development [79]. Zhao Miao et al. developed a
robotic system for the automatic detection and classification of internal quality attributes of
apples using near-infrared spectroscopy [10]; Liu Penghui et al. used machine vision and spec-
troscopy for the non-destructive detection of apple crispness with accurate and reliable results
[11]. Tan Wenyi et al. used hyperspectral imaging to propose an accurate algorithm for apple
abrasion identification, which provided a new method for non-destructive detection [12]. Ker-
esztes et al. used shortwave infrared hyperspectral imaging combined with calibration and
glare correction techniques, on a real-time pixel basis for contusion detection of early apples
[13].
In 2020, China produced 44.066 million tons of apples, exceeding the global average pro-
duction by more than 50%, among which, approximately 1812106.13 acres of apples were
planted in Shaanxi Province, producing 11.8521 million tons [14], showing great demand for
automated apple grading machines. To carry out automatic grading of apples comprehensively
and accurately, this study designed a set of grading detection algorithms for Red Fuji apple in
Luochuan, mainly including four single quality detection algorithms and a comprehensive
grading algorithm. Firstly, three classifier models of defect, contour, and size were designed by
using machine vision, and the defect, contour, and size of the apple’s appearance were detected
successively. Secondly, near-infrared spectroscopy was used to collect the spectral information
of apples. And CARS-PLS algorithm was adopted to predict the sugar content of apples.
Finally, according to the National Standard of the People’s Republic of China for grading fresh
apples, combined with the defect, contour, size, and Brix of the detected apple, the comprehen-
sive grading algorithm of Red Fuji apples in Luochuan was designed. With the algorithm,
upper computer software was designed to display the grading detection results in real-time.
An online grading detection platform for apple quality was built to verify the effectiveness and
accuracy of the grading algorithm. Experimental results show that the accuracy of the designed
algorithm is 96.67%, which met the requirements of automatic grading of the Red Fuji apple in
Luochuan.
2 Experimental materials
The apples selected in this study are Red Fuji varieties in Luochuan, Shaanxi Province, which
were purchased from Shenggu Industrial Co Ltd in Yan’an, Shaanxi Province. Before experi-
ments, each sample was numbered, and the serial number label was attached to the bottom of
the sample. Their appearance is shown in Fig 1.
3 Principle of apple quality detection classifier
3.1 Principle of apple appearance quality grading detection
According to the National Standard of the People’s Republic of China for grading fresh apples
[15], apples are classified according to their size characteristics based on their cross-sectional
diameters, i.e., the diameter at the largest point in the cross-section, as follows: the apple with a
cross-sectional diameter >7 cm is graded large (L), the apple with a cross-sectional diameter
>6.5 cm and <7 cm is graded medium (M), and the apple with a cross-sectional diameter
<6.5 cm is graded small (S).
Similarly, the national standard for apple grading is based on varietal characteristics, shape
characteristics (fruit shape index), color, red coloring rate, pests, or other damages, and the
test indicators are as follows:
PLOS ONE
Grading Detection of “Red Fuji” Apple in Luochuan
PLOS ONE | https://doi.org/10.1371/journal.pone.0271352 August 4, 2022 2 / 25
Development Program of China
(2019YFD1002401).
Competing interests: The authors have declared
that no competing interests exist.
Excellent fruit: uniform in appearance, round and free of ribs, square, round or nearly
round, without skew, with a fruit shape index of 0.85 or more; evenly distributed color, high
brightness; smooth and delicate, evenly distributed texture, not rough, without damages,
cracks or scars.
First-class fruit: undifferentiated in appearance, nearly round or oblate, slightly deformed
but not more than 30% of the total, with a fruit shape index of 0.8 to 0.85; ripe or slightly
underripe, evenly distributed color, evenly distributed texture, not rough; without damages,
cracks or scars.
Fig 1. Red Fuji apple appearance.
https://doi.org/10.1371/journal.pone.0271352.g001
PLOS ONE
Grading Detection of “Red Fuji” Apple in Luochuan
PLOS ONE | https://doi.org/10.1371/journal.pone.0271352 August 4, 2022 3 / 25
Second-class fruit: basic fruit shape, subrounded, slightly deformed, with defects in fruit
shape but still having basic features, no malformation, with a fruit shape index of 0.75 to 0.8;
slightly under- or overripe, slightly rough; slightly damaged, no cracks, slight scars on the skin,
but unaffected fruit merchantability.
Substandard fruit: variable appearance in shapes, oval-shaped fruit with large deformation,
with a fruit shape index of 0.75 or less; less evenly distributed texture, slightly under- or over-
ripe, slightly rough; with damage cracks and obvious scars on the skin.
Most of the factors affecting apple grading are sensory factors. According to the National
Standard for grading fresh apples, the defect, contour, and size of the Red Fuji apple in Luo-
chuan were selected as external quality detection indexes in this study. In general, apple surface
defects are usually judged by the human eye. Contour is generally evaluated by fruit shape
coefficient, which is usually the ratio of transverse diameter to longitudinal diameter. The
closer the fruit shape coefficient is to 1, the rounder the apple appearance. And the apple size is
generally evaluated by measuring the maximum cross diameter with a vernier caliper. The
above measurement methods of apple defect, contour, and size are physical detection methods,
which need to be completed manually. They are not efficient and automatic enough to meet
the requirements of real-time apple grading detection. Therefore, this study proposed methods
of processing apple images by machine vision to complete the real-time detection of the apple
defect area, aspect ratio, and maximum transverse diameter. Then, each external quality was
graded according to the national standards.
3.2 Principle and method of apple Brix detection
Currently, China’s national standard for apple internal quality only gives a reference index of
7% or more for fruit hardness and 13% or more for soluble solids in mature Fuji apples. The
unclear national standard for the internal quality of apples has resulted in a lack of scientific,
systematic, and operable indicators of grading evaluation based on this standard.
Customers pay attention to taste when buying apples. The most important factor affecting
the taste of apples is their sugar-acid ratio, of which the apple Brix value plays a leading role.
Current chemical methods for measuring the apple Brix value include 3, 5-dinitrosalicylic acid
colorimetric method, anthrone colorimetric method, Fehling reagent thermal titration, and so
on [16]. All the above determination methods need to use acid to hydrolyze disaccharides and
polysaccharides into reductive monosaccharides and use the reductive sugar determination
method to measure the sugar content of apples. In addition, gas chromatography and high-
performance liquid chromatography can not only measure sugar content but also determine
the composition of sugar. Generally, recovery and precision experiments are used to evaluate
the above chemical methods, and the accuracy of measured sugar content is evaluated by cal-
culating the total sugar recovery, standard deviation, and coefficient of variation. The more the
total sugar recovery is close to 100%, the smaller the standard deviation and coefficient of vari-
ation are, and the more accurate and reliable the measured sugar content is. These methods,
however, generally require the apple to be mashed and macerated into a solution for measure-
ment, which causes damage to the fruit and takes a long time with low efficiency, thus they are
not suitable for non-destructive apple grading.
When near-infrared light is directed at a suitable angle to the apple, the chemical groups
within the apple absorb the spectral energy and produce a diffuse reflection on the surface, the
intensity of which varies according to the degree of light absorption within the apple. Apple
sugars contain mainly C-H and O-H groups, which are located at different energy levels and
absorb different energies from different wavelengths of the spectrum. Additionally, these are
selective in their absorption of light, with the spectrum being absorbed only at specific
PLOS ONE
Grading Detection of “Red Fuji” Apple in Luochuan
PLOS ONE | https://doi.org/10.1371/journal.pone.0271352 August 4, 2022 4 / 25
frequencies. Therefore, apple sugars can produce characteristic absorption of near-infrared
(NIR) radiation, and the difference in absorption at different wavelengths also affects the
reflected energy of diffuse reflection [17]. Therefore, in this study, near-infrared spectroscopy
technology was used to collect the spectral reflectance data from apple samples within the 400
nm~1000 nm wavelength region. And three chemometrics methods, PLS algorithm,
CARS-PLS algorithm, and SPA-PLS algorithm, were used to build the mapping relationship
between the spectral reflectance data and the apple Brix. Three methods were compared and
analyzed to select the optimal method to measure the apple Brix.
3.2.1 PLS. PLS algorithm is a linear regression algorithm, not affected by the dimension,
and suitable for complex near-infrared spectral analysis. PLS algorithm can effectively elimi-
nate the collinearity of wavelengths. If the model contains a large number of useless informa-
tion variables, the prediction ability of PLS will also be affected [18]. In this study, the PLS
algorithm was used to establish a prediction model between the spectral data of the whole
band and apple Brix.
3.2.2 CARS-PLS. CARS algorithm is a feature variable selection method combining
Monte Carlo sampling and PLS model regression coefficient, imitating the principle of "sur-
vival of the fittest" in Darwin’s theory. Each time, wavelength points with the large absolute
weight of regression coefficients in the PLS model were retained as new subsets through adap-
tive weighted sampling, and then the PLS model was established based on the new subsets.
After multiple iterative calculations, the subset with the minimum root mean square error of
cross-validation (RMSECV) was selected as characteristic variables [19]. In this study, charac-
teristic variables selected by the CARS algorithm and actual Brix of apples were used to estab-
lish a PLS linear regression model.
3.2.3 SPA-PLS. SPA is an algorithm that uses a forward cycle to screen variables, and the
extracted feature bands have low collinearity, which effectively avoids information overlap and
reduces the amount of calculation [20]. The SPA algorithm was also adopted to screen charac-
teristic variables to optimize the effect of the PLS algorithm on predicting apple Brix in this
study.
4 Classifier construction for apple appearance quality detection
4.1 Apple image capture
The vision-based apple appearance detection device, shown in Fig 2, consists of a ring light
source (2835–120, Transcend, Shenzhen), two cameras (HF899, Jereh Microcom, Shenzhen),
a photoelectric switch (E3F-DS30C4, Hutron, Shanghai), and a dark box housing made of
polymethyl methacrylate (PMMA). Among them, the ring light source is adhered to the upper
panel of the housing to provide a light environment, and the top camera is mounted right in
the middle of the ring light source and connected to the universal serial bus (USB) port of an
external personal computer (PC) (HUAWEI MateBook 14, Huawei Technologies Co Ltd,
Shenzhen) through a predetermined external hole. The side-mounted photoelectric switch is
used to detect the passage of fruits on the conveyor belt, and two cameras take pictures when
apples are passed.
4.2 Image preprocessing
Acquiring and processing images of Red Fuji apples in Luochuan, Shaanxi Province, and
extracting and analyzing surface feature data such as the defects, size, and shape of the apples
are types of image preprocessing, and this algorithm flow is shown in Fig 3. First, the camera
was used to directly acquire the original image of the apple; then, preprocessing methods such
as image enhancement, filtering, and morphological processing were used to eliminate
PLOS ONE
Grading Detection of “Red Fuji” Apple in Luochuan
PLOS ONE | https://doi.org/10.1371/journal.pone.0271352 August 4, 2022 5 / 25
background interference and improve the accuracy of segmentation; next, the apple surface
color was selected as the distinguishing feature for segmentation of the apple fruit from the
background.
The apple image preprocessing process is shown in Fig 4. The grey level of the original image
shown in Fig 4(A) is corrected using standard color plates and the contrast of the image is
enhanced using the gamma transform [21], as shown in Fig 4(B). Then, the image noise is sup-
pressed by using Gaussian filtering [22], preserving important information such as image con-
tours and edges, as shown in Fig 4(C). Next, the red, green, and blue (RGB) image is transformed
into the hue, saturation, and value (HSV) image shown in Fig 4(D), and the grey level trans-
formed and threshold segmentation [23] were performed to distinguish the white background
from the fruit area, as shown in Fig 4(E). Morphological processing was used to eliminate the tiny
discrete closed area and boundary interference [24] in the white background, as shown in Fig 4
(F). The interior of the highlighted area, where the fruit is located, may also be mistaken for the
black area due to the fruit tip as well as surface reflections. Multiple contours can be found by
finding the boundary pixel mutation points between the highlighted area and the black area. The
Fig 2. Sketch of the structure of the vision-based detection device. 1-ring light source 2-camera 3-photoelectric
switch 4-dark box housing.
https://doi.org/10.1371/journal.pone.0271352.g002
PLOS ONE
Grading Detection of “Red Fuji” Apple in Luochuan
PLOS ONE | https://doi.org/10.1371/journal.pone.0271352 August 4, 2022 6 / 25
largest contour is extracted as the apple contour, as shown in Fig 4(G). The pixel points at the
edge of the contour are selected to draw the apple contour, as shown in Fig 4(H).
4.3 Defect determination
Apple surface defect types mainly include rot, scars, wormholes, and crush injuries. The defec-
tive area can be extracted by grey level transformation and threshold segmentation of the
Fig 3. Image processing flow.
https://doi.org/10.1371/journal.pone.0271352.g003
PLOS ONE
Grading Detection of “Red Fuji” Apple in Luochuan
PLOS ONE | https://doi.org/10.1371/journal.pone.0271352 August 4, 2022 7 / 25
preprocessed apple image. However, the national standard does not give a clear definition. To
obtain the size of the area threshold for defect determination, based on the sensory judgment
and the market research, the minimum diameter of the defective area for the apple with a 70
mm medium diameter is 3 mm, and the critical defect ratio for the apple surface defect is
defined t
0
t0¼pd2
0
pd2
1100%¼32
702¼0:18%ð1Þ
If the defective pixel ratio tis greater than or equal to t
0
, the apple is evaluated to be defec-
tive; otherwise, it is evaluated to be normal, and the classifier for detecting apple defects is
t¼00:0018;Normal apples
0:0018;Defective apples ð2Þ
(
Fig 5 shows the image processing process of defect determination. Forty apples were col-
lected, half of them were defective and the other half were not, and the experiment was con-
ducted in triplicate with the use of the defect classifier. The results are shown in Table 1, and
the average accuracy of the defect classifier was 96.67%, indicating that this model can be used
in the grading detection of apple defects.
Fig 4. Image preprocessing process. (a) Original image (b) Gamma transform (c) Gaussian filtering (d) HSV transform (e) Grey level transform (f)
Morphological processing (g) Find contours (h) Drawing contours.
https://doi.org/10.1371/journal.pone.0271352.g004
PLOS ONE
Grading Detection of “Red Fuji” Apple in Luochuan
PLOS ONE | https://doi.org/10.1371/journal.pone.0271352 August 4, 2022 8 / 25
4.4 Shape determination
From the top view, the shape of the apple was roughly classified into round and oval, as shown
in Fig 6, where (a) to (c) are the contours of nearly round apples and (d) to (f) are those of
nearly oval apples. Customers usually have a higher preference for round apples than for mis-
shapen apples. According to the national standard for grading apples and the consumption
habits, the apple images were preprocessed to extract the maximum contours and calculate the
maximum distance ratio between their horizontal and vertical directions, that is, the aspect
ratio λ[25], to construct the basic parameters of the apple contour classifier. The near round
contours in Fig 6(A) to 6(C) have aspect ratios λranging from 0.98 to 1.05, while the nearly
oval contours in Fig 6(D) to 6(F) have aspect ratios λgreater than or equal to 1.05 or less than
0.98. The apple aspect ratio λcan be used to evaluate the apple shape and judge its general con-
tour. The classifier to detect the apple contour is
l¼0:98 1:05;nearly round apples
0:98or 1:05;nearly oval apples ð3Þ
(
Forty apples were collected, half of them were nearly round and the other half were nearly
oval, and the experiment was conducted in triplicate with the use of the shape classifier. The
results are shown in Table 2, and the average accuracy of the shape classifier was 95%, indicat-
ing that the model can be used in the grading detection of apple fruit shape.
4.5 Size determination
The size of an apple is related to the maximum cross-sectional diameter of the fruit, so the
actual cross-sectional diameter of the apple and the maximum cross-sectional diameter in the
Fig 5. Process of extracting defective area of the apple. (a) Original image (b) Grey level transform (c) Defective apple area (d) Whole apple area.
https://doi.org/10.1371/journal.pone.0271352.g005
Table 1. Results of detection for apple defects.
Testing index Detection number First Second Third
Defective apples 20 20 20 18
Non-defective apples 20 20 19 19
Error 0 1 3
Accuracy 100% 97.5% 92.5%
https://doi.org/10.1371/journal.pone.0271352.t001
PLOS ONE
Grading Detection of “Red Fuji” Apple in Luochuan
PLOS ONE | https://doi.org/10.1371/journal.pone.0271352 August 4, 2022 9 / 25
image were measured to construct a mapping relationship between the image size and the
actual size of the fruit. Then, the grading system measured the maximum cross-sectional diam-
eter in the image of the apple to be graded, and based on the mapping relationship between the
actual size and the image size, the maximum cross-sectional diameter of the apple was approxi-
mated and used to distinguish among extra-large, large, medium and small apples to aid in the
system to grading.
In this research, we used a vernier caliper to measure and record the maximum cross-sec-
tional diameter W
r
of a sample of apples, and Hu moments to measure the cross-sectional
Fig 6. Typical contours of apples. (a)~(c) Nearly round contour (d)~(f) Nearly oval contour.
https://doi.org/10.1371/journal.pone.0271352.g006
Table 2. Results of detection for apple shape.
Testing index Detection number First Second Third
Nearly round apples 20 19 18 19
Nearly oval apples 20 20 19 19
Error 1 3 2
Accuracy 97.5% 92.5% 95.0%
https://doi.org/10.1371/journal.pone.0271352.t002
PLOS ONE
Grading Detection of “Red Fuji” Apple in Luochuan
PLOS ONE | https://doi.org/10.1371/journal.pone.0271352 August 4, 2022 10 / 25
diameter W
p
in the image. To measure the cross-sectional diameter of an apple in its image, it
is important to find the center of the apple profile (x
c
,y
c
) and the boundary point of the profile
(x
k
,y
k
) in the image.
Hu moments are geometric moments that characterize an image [26]. When the image
function is f(x,y) and the resolution is U×V, the p+qorder moments of the image is
mpq ¼X
V
y¼1X
U
x¼1
xpyqfðx;yÞ ð4Þ
The 0th order moments of a binary image m
00
represent the area of the contour’s connected
domain. Using the 0th and 1st order moments, the coordinates of the apple contour center
point [27]
xc¼m10
m00
yc¼m01
m00
ð5Þ
8
>
>
<
>
>
:
The radius sequence of (x
c
,y
c
) to that of the boundary point (x
k
,y
k
) in the image is
rk¼ ½ðxkxcÞ2þ ðykycÞ21
2ð6Þ
For the extracted fruit contour in Fig 4(G), the coordinates of its geometric center can be
obtained using Eq (5), and the radius sequence from the geometric center to the boundary
point of the apple contour in the image can be calculated using Eq (6). By using the method of
the least convex package, the maximum R
max
in the radius sequence from (x
c
,y
c
) to (x
k
,y
k
)
was filtered out [28], and the maximum cross-sectional diameter of the apple in the image was
W
p
= 2R
max
.
We selected 150 apple samples and used a vernier caliper to measure and record their maxi-
mum cross-sectional diameter W
r
. Then, we took photos and carried out the image processing
shown in Fig 7. The maximum outer circle diameter of the apple image was obtained based on
the minimum convex hull method, and it was taken as the maximum cross-sectional diameter
W
p
of the apple image. Thus, a linear regression model between W
r
and W
p
was constructed.
The results are shown in Fig 8, and the regression equation is
Wr¼0:4052Wpþ13:5015 ð7Þ
where the correlation coefficient R
2
= 0.8462, the residual variance S= 3.9806, and the test of
significance of variance p<0.001, demonstrating that the linear regression model has a high
degree of accuracy and can meet the experimental requirements.
According to the national standard of the People’s Republic of China, the thresholds of
cross-sectional diameter Wr for distinguishing among extra-large, large, medium, and small
apples are 8 cm, 7 cm, and 6.5 cm respectively. Substituting these values into Eq (7), it can be
seen that the thresholds for apple size grading according to the maximum cross-sectional
diameter Wp of the apple image are 164, 139, and 127 pixels respectively, based on which the
classifier for apple size grading was constructed, as shown in Eq (8).
Wp¼
164;extra large apples
139 Wp;164;large apples
127 Wp;139;medium apples
<127;small apples
ð8Þ
8
>
>
>
>
<
>
>
>
>
:
PLOS ONE
Grading Detection of “Red Fuji” Apple in Luochuan
PLOS ONE | https://doi.org/10.1371/journal.pone.0271352 August 4, 2022 11 / 25
Fig 7. The extraction process of contours of apples with different sizes. (a) The large apple (b) HSV transform of the large apple (c) Contour
extraction of the large apple (d) The medium apple (e) HSV transform of the medium apple (f) Contour extraction of the medium apple (g) The small
apple (h) HSV transform of the small apple (i) Contour extraction of the small apple.
https://doi.org/10.1371/journal.pone.0271352.g007
PLOS ONE
Grading Detection of “Red Fuji” Apple in Luochuan
PLOS ONE | https://doi.org/10.1371/journal.pone.0271352 August 4, 2022 12 / 25
Fifty extra-large apples, 50 large apples, 50 medium apples, and 50 small apples were
obtained, photographed, and after image processing, the cross-sectional diameter W
p
values of
these apples in images were calculated separately and substituted into the classifier for apple
size grading. The experiment was conducted in triplicate, and the results are shown in Table 3.
Statistics show that the average accuracy of grading apples for extra-large, large, medium, and
Fig 8. Linear regression plot of the apple size characteristic.
https://doi.org/10.1371/journal.pone.0271352.g008
Table 3. Results of detection for apple sizes.
Testing index Detection number First Second Third
Extra-large apples 50 48 47 48
Large apples 50 46 48 49
Medium apples 50 46 49 47
Small apples 50 48 46 46
Error 12 10 10
Accuracy 94.00% 95.00% 95.00%
https://doi.org/10.1371/journal.pone.0271352.t003
PLOS ONE
Grading Detection of “Red Fuji” Apple in Luochuan
PLOS ONE | https://doi.org/10.1371/journal.pone.0271352 August 4, 2022 13 / 25
small apples according to this classifier was 94.67%, indicating that the model can be used for
the grading detection of apple size feature extraction.
5 Apple Brix prediction model construction
5.1 Near-infrared spectral image acquisition device
A near-infrared spectroscopy-based apple Brix detection device was constructed, as shown in
Fig 9, mainly consisting of a spectrometer (USB2000+, Ocean Optics, USA), a tungsten-halo-
gen light source (CH-20001, Changhui Electronic Technology Co., Ltd., Guangzhou), a fiber
optic probe and probe holder (Changhui Electronic Technology Co., Ltd., Guangzhou), a
focusing lens (Changhui Electronic Technology Co., Ltd., Guangzhou) and a dark
box housing (PMMA). The acquisition device consists of two layers of the dark box structure.
The upper layer was used to house the instrument and power supply and the lower layer
detected the internal quality of the apples. The tungsten-halogen light source was arranged
symmetrically at 45˚ on the bottom plate of the lower layer, and a 24V lithium battery (Laiyue
Fig 9. Sketch of the structure of the apple internal quality detection device. 1- Spectrometer 2- Fiber optic probe 3-
Tungsten-halogen light source 4- Focusing lens 5- Dark box housing.
https://doi.org/10.1371/journal.pone.0271352.g009
PLOS ONE
Grading Detection of “Red Fuji” Apple in Luochuan
PLOS ONE | https://doi.org/10.1371/journal.pone.0271352 August 4, 2022 14 / 25
Electronic Technology Co., Ltd., Guangzhou) was used to supply power to the tungsten-halo-
gen light source.
5.2 Spectral curve acquisition and preprocessing
The surfaces of 168 apple samples were cleaned, and then the spectral curves of the apples were
acquired by connecting the near-infrared spectrometer to a computer through a USB port and
using spectral image acquisition software (Spectra Suite, 2020). The integration time of the
fiber optic spectrometer was adjusted to 4 ms, the averaging time to 30, and the smoothing
degree to 5. In this way, the final spectral reflectance curves of apple samples in the wavelength
range of 400 nm~1000 nm were acquired. The black and white corrections were then carried
out on the acquired curves according to Eq (9) to reduce the influence of the experimental
environment on the results [29].
R¼IId
IwIdð9Þ
Where: R—the spectral reflectance of the sample, %;
I—the intensity of the reflection spectrum of the sample, cd;
I
w
the reflected spectral intensity of a standard whiteboard (reflectance of approximately
95%), cd; and
I
d
Reflected spectral intensity in the dark, cd.
A total of 1771 points were collected in the wavelength range between 400 nm and 1000
nm. To avoid additional noise interference, one wavelength point was selected every two
points, and 591 wavelength points were finally selected. The spectral reflectance data of 591
wavelength points of the apple samples were used as the final data for the next step of process-
ing. The multiple scattering correction (MSC) and standard normal variable (SNV) transfor-
mation methods were used to preprocess [30] spectral reflectance data of 168 samples to
reduce the influence exerted by extraneous factors such as noise, equipment, and the experi-
mental environment. The results are shown in Fig 10.
5.3 Apple Brix measurement
After obtaining the spectral data of the apples, the true value of apple Brix was measured using
a handheld digital sugar meter (PAL-1 digital sugar meter, ATAGO, Japan). Each apple was
peeled, diced, and mashed, and the juice was extracted to measure the apple Brix value. After
each use of the sugar meter, the sampling tank was cleaned, rezeroed, and calibrated with
water and then wiped clean with a dry paper towel, followed by the next measurement. The
degree Brix values of 168 apple samples, as shown in Table 4, ranged from 8.9% to 14.6%, with
a sample mean of 11.7%. Analysis of the experimental statistics showed that 90% of the apple
samples had a Brix of 10% and above, and 15% of the apple samples had a Brix of 13% and
above. Therefore, Brix values of 10% and 13% were selected as the thresholds for grading and
dividing the Red Fuji apples in Luochuan, Shaanxi Province, into high, medium, and low
grades based on their Brix values, with the grading criteria shown in Eq (10).
Apple Brix ¼13%;high
10%Brix <13%;medium
<10%;low
ð10Þ
8
>
<
>
:
PLOS ONE
Grading Detection of “Red Fuji” Apple in Luochuan
PLOS ONE | https://doi.org/10.1371/journal.pone.0271352 August 4, 2022 15 / 25
5.4 Characteristic wavelengths extraction
The competitive adaptive reweighted sampling (CARS) algorithm and the successive projec-
tions algorithm (SPA) were used to filter the characteristic wavelength points related to the
Brix to eliminate the irrelevant spectral data, reduce the computational effort and reduce the
modeling time [3133]. Fig 11 shows the results of the characteristic wavelengths selection
using CARS, (a) the variation in the number of variables when different sampling times were
selected, (b) the variation in the root mean square of cross-validation with the number of sam-
pling times, and (c) a graph of the selection results of characteristic wavelengths using CARS.
When the number of sampling times is 49 and the number of retained wavelength variables is
37, RMSECV reached a minimum value of 0.4869.
Fig 10. Spectral curves of samples after preprocessing.
https://doi.org/10.1371/journal.pone.0271352.g010
Table 4. Statistics on apple Brix.
Sample Number Minimum Maximum Average Standard Deviation
168 8.9 14.6 11.7 1.1
https://doi.org/10.1371/journal.pone.0271352.t004
PLOS ONE
Grading Detection of “Red Fuji” Apple in Luochuan
PLOS ONE | https://doi.org/10.1371/journal.pone.0271352 August 4, 2022 16 / 25
The range of the number of characteristic wavelengths was set from 30 to 50, the SPA algo-
rithm was used to extract the characteristic wavelengths, and the number of wavelengths corre-
sponding to the smallest RMSE was analyzed and calculated to obtain the optimal number of
wavelengths, as shown in Fig 12, a graph of the number of characteristic wavelengths extracted
by SPA and the RMSE. When the SPA algorithm extracted 32 characteristic wavelengths, as
shown in Fig 13, the RMSE reached a minimum value of 0.5562.
5.5 Brix prediction model construction
Using the sample set partitioning based on joint x-y distance (SPXY) algorithm, 168 samples
were divided into a validation set and a prediction set at a ratio of 3:1, with 126 samples in the
former and 42 in the latter. The SPXY algorithm can achieve a uniform distribution space to
ensure the validation set of samples [34], as shown in Eq (11)
dxyðp;qÞ ¼ dxðp;qÞ
maxp;q1;Ndxðp;qÞþdyðp;qÞ
maxp;q1;Ndyðp;qÞp;q2 ½1;N ð11Þ
The performances of the three models were compared and analyzed as shown in Table 5,
using the PLS algorithm [35] on the raw spectra, the spectra extracted by the SPA algorithm,
and those extracted by the CARS algorithm. The comparative analysis of performances is
shown in Table 5. After modeling with the PLS algorithm, the correlation coefficient of the
prediction set R
p
= 0.6543 for the original spectral data, and the root mean square error
RMSEP = 0.7976, which indicated a large deviation. For the prediction model by extracting
characteristic wavelengths using the SPA algorithm, the correlation coefficient of the predic-
tion set R
p
increased by 0.1787, and the RMSEP decreased by 0.2503. The correlation coeffi-
cient R
p
of the prediction set obtained by extracting characteristic wavelengths using the
CARS algorithm increased by 0.2926, and RMSEP decreased by 0.4461. The scatter plot of the
predicted Brix results for the prediction set is shown in Fig 14, with the horizontal coordinates
representing the true Brix values and the vertical coordinates representing the predicted Brix
Fig 11. Graph of CARS characteristic wavelengths selection results.
https://doi.org/10.1371/journal.pone.0271352.g011
PLOS ONE
Grading Detection of “Red Fuji” Apple in Luochuan
PLOS ONE | https://doi.org/10.1371/journal.pone.0271352 August 4, 2022 17 / 25
values. The better the fit of the scatter plot to the straight line y=x, the more reliable the pre-
dictions are and the closer the predicted values are to the real values.
Comparing the four model evaluation index parameters, namely the correction set correla-
tion coefficient R
c
, the correction set root mean square error RMSEC, the prediction set corre-
lation coefficient R
p
and the prediction set root mean square error RMSEP, it can be
concluded that the Brix prediction model built using the CARS-PLS algorithm has optimal val-
idation and prediction performance. A comparison of the three scatter plots of the Brix predic-
tion results of the prediction set also yielded the same conclusion.
6 Experimental validation
6.1 Integrated apple grader design
Based on the above analysis, the apple grade was determined comprehensively based on differ-
ent characteristics in terms of defects, shape, size, and Brix of the apple fruit. The algorithm
flow of the apple grading is shown in Fig 15. First, the defects and shape of the apples are
extracted to evaluate whether they meet the requirements. As long as defects exist, the apples
are evaluated as substandard fruits. Among the apples meeting the requirements, those with
high Brix values are evaluated as excellent fruits, those with medium Brix values are the first-
class fruits, and those with low Brix values are second-class fruits; those with no defects but
Fig 12. Number of SPA extracted characteristic wavelengths vs. RMSE curve.
https://doi.org/10.1371/journal.pone.0271352.g012
PLOS ONE
Grading Detection of “Red Fuji” Apple in Luochuan
PLOS ONE | https://doi.org/10.1371/journal.pone.0271352 August 4, 2022 18 / 25
average shape are directly evaluated as the second-class fruits. Finally, the size features of the
apple images are extracted to achieve the grading of extra-large, large, medium, and small
apples.
6.2 Setting up the experimental platform
To verify the feasibility of the grading algorithm, the prototype apple quality detection system
shown in Fig 16 was set up. When an apple passes on the conveyor mechanism, a position
detection photoelectric sensor in the vision-based detection box sends a low level to the PC
device, which triggers the camera to capture the apple image. The device mainly realizes the
detection of the parameters of defects, contour, and size of the apples. After the detection of
appearance quality, the apples are sent to the internal quality detection system, and the col-
lected spectral information is brought into the Brix prediction model to obtain the predicted
values of the Brix. Finally, the developed upper computer software reflects the internal and
external quality information and the corresponding parameters on the interface and inputs the
detected parameters into the classifier models to assess the comprehensive grading of the
apples and display it on the interface.
Fig 13. Map of SPA extracted characteristic wavelengths.
https://doi.org/10.1371/journal.pone.0271352.g013
Table 5. Comparative analysis of PLS model performances.
Algorithm Characteristic wavelength number Optimum PCs R
c
RMSEC R
p
RMSEP
Original-PLS 591 15 0.9227 0.4486 0.6543 0.7976
SPA-PLS 32 10 0.8680 0.5779 0.8330 0.5473
CARS-PLS 37 14 0.9563 0.3403 0.9469 0.3515
https://doi.org/10.1371/journal.pone.0271352.t005
PLOS ONE
Grading Detection of “Red Fuji” Apple in Luochuan
PLOS ONE | https://doi.org/10.1371/journal.pone.0271352 August 4, 2022 19 / 25
PyCharm Community Edition 2020 software was used to write the upper computer soft-
ware under Windows, and PyQt5, a module of Python, was used to create the interface for
apple grading detection. The interface for running this software is shown in Fig 17.
6.3 Experimental results
A total of 120 apples were randomly selected to validate the grading system and the results of
the apple grading were output on the interface of the upper computer software. To allow for
optimal image acquisition with the camera, the calyx side of the apple was uniformly placed
towards the conveyor belt, and the stalk side was placed towards the camera on top of the
detection box. The experiment was conducted in triplicate, and the grading results are shown
in Table 6. The accuracy of apple grading detection was 95.83%, 97.50%, and 96.67%, respec-
tively, with an average accuracy of 96.67%.
7 Summary and discussion
This paper analysed the principles of apple defects, shape, size, and Brix detection and grading
based on China’s current national standard. In this research, Red Fuji apples in Luochuan,
Shaanxi Province, were used as the research object, the appearance quality classifier models of
apple defects, shape, and size characteristics were established based on machine vision, and the
prediction model of apple Brix value was constructed based on near-infrared spectroscopy.
The results showed that the average accuracy of apple defects, shape, and size characteristics
Fig 14. Scatter plots of the prediction results (in ˚ Brix). a. Original-PLS b. SPA-PLS c. CARS-PLS.
https://doi.org/10.1371/journal.pone.0271352.g014
PLOS ONE
Grading Detection of “Red Fuji” Apple in Luochuan
PLOS ONE | https://doi.org/10.1371/journal.pone.0271352 August 4, 2022 20 / 25
grading detection was 96.67%, 95.00%, and 94.67%, respectively. Among the three Brix predic-
tion models, Original-PLS, SPA-PLS, and CARS-PLS, the CARS-PLS model had the best pre-
diction performance, achieving the following performance merits: R
c
= 0.9563,
RMSEC = 0.3403, R
p
= 0.9469 and RMSEP = 0.3515. The validation experiment of the grading
detection platform showed that the average accuracy of the grading detection was 96.67%,
indicating that the apple grading system designed in this paper was feasible to some extent.
Fig 15. Flow chart of the apple quality grading algorithm.
https://doi.org/10.1371/journal.pone.0271352.g015
Fig 16. The prototype of the apple quality detection system.
https://doi.org/10.1371/journal.pone.0271352.g016
PLOS ONE
Grading Detection of “Red Fuji” Apple in Luochuan
PLOS ONE | https://doi.org/10.1371/journal.pone.0271352 August 4, 2022 21 / 25
The accuracy of apple grading with this method can be further improved by improving the
sensitivity of the photoelectric sensor and the operational stability of the transmission plat-
form, both of which can reduce the position shift when the image is taken so that the apple is
Fig 17. The interface of the apple quality grading software.
https://doi.org/10.1371/journal.pone.0271352.g017
Table 6. The results of apple quality grading according to the national standard.
Grade Detection number First Second Third
Excellent apples 21 19 19 20
First-class apples 35 33 35 34
Second-class apples 49 48 49 47
Substandard apples 15 15 14 15
Error 5 3 4
Accuracy 95.83% 97.50% 96.67%
https://doi.org/10.1371/journal.pone.0271352.t006
PLOS ONE
Grading Detection of “Red Fuji” Apple in Luochuan
PLOS ONE | https://doi.org/10.1371/journal.pone.0271352 August 4, 2022 22 / 25
centered in the middle of the photo and the defects, shape and size characteristics can be
extracted more accurately. If the distance between the fibre optic probe and the apple can be
automatically adjusted according to the apple size, or the sealing of the near-infrared spectros-
copy inspection device can be improved to reduce the interference of natural light on the spec-
tral data acquisition, the accuracy of the Brix prediction of the system can be further enhanced.
According to the research ideas in this paper, with improvements in some algorithms, the
apple grading detection system constructed can also be applied to the internal and external
quality detection and grading of other nearly round fruits and vegetables such as pears,
peaches, and tomatoes.
Supporting information
S1 File. The list of the grading detection device.
(DOCX)
S2 File. Original data.
(XLSX)
S3 File. Funding information.
(TXT)
Acknowledgments
The authors are grateful to the editors and reviewers for their helpful comments and recom-
mendations, which make the presentation better.
Author Contributions
Conceptualization: Li Liu, Yinggang Shi.
Data curation: Jin Wang.
Funding acquisition: Li Liu, Yinggang Shi.
Investigation: Jin Wang, Yujia Huo, Yutong Wang, Haoyu Zhao.
Methodology: Jin Wang, Li Liu, Yinggang Shi.
Software: Jin Wang, Yujia Huo.
Validation: Jin Wang, Yujia Huo, Yutong Wang, Haoyu Zhao.
Writing original draft: Jin Wang.
Writing review & editing: Kai Li, Yinggang Shi.
References
1. Hu G, Zhang E, Zhou J, Zhao J, Gao Z, Sugirbay A, et al. Infield Apple Detection and Grading Based on
Multi-Feature Fusion. Horticulturae. 2021; 7(9). https://doi.org/10.3390/horticulturae7090276
2. Goncalves MW, Argenta LC, De Martin MS. Maturity and Quality of Apple Fruit Durinig the Harvest
Period at Apple Industry. Rev Bras Frutic. 2017; 39(5). WOS:000418604100001.
3. Tian X, Li J, Wang Q, Fan S, Huang W, Zhao C. A multi-region combined model for non-destructive pre-
diction of soluble solids content in apple, based on brightness grade segmentation of hyperspectral
imaging. Biosystems Engineering. 2019; 183:110–20. https://doi.org/10.1016/j.biosystemseng.2019.
04.012
4. Baneh NM, Navid H, Kafashan J. Mechatronic components in apple sorting machines with computer
vision. J Food Meas Charact. 2018; 12(2):1135–55. https://doi.org/10.1007/s11694-018-9728-1
WOS:000431327000049.
PLOS ONE
Grading Detection of “Red Fuji” Apple in Luochuan
PLOS ONE | https://doi.org/10.1371/journal.pone.0271352 August 4, 2022 23 / 25
5. Chopra H, Singh H, Bamrah MS, Mahbubani F, Verma A, Hooda N, et al. Efficient Fruit Grading System
Using Spectrophotometry and Machine Learning Approaches. IEEE Sens J. 2021; 21(14):16162–9.
https://doi.org/10.1109/jsen.2021.3075465 WOS:000673632700069.
6. Sofu MM, Er O, Kayacan MC, Cetisli B. Design of an automatic apple sorting system using machine
vision. Comput Electron Agric. 2016; 127:395–405. https://doi.org/10.1016/j.compag.2016.06.030
WOS:000383527100038.
7. Chen H, Qiao H, Feng Q, Xu L, Lin Q, Cai K. Rapid Detection of Pomelo Fruit Quality Using Near-Infra-
red Hyperspectral Imaging Combined With Chemometric Methods. Frontiers in bioengineering and bio-
technology. 2020; 8:616943. https://doi.org/10.3389/fbioe.2020.616943 MEDLINE:33511105.
8. Ma T, Tsuchikawa S, Inagaki T. Rapid and non-destructive seed viability prediction using near-infrared
hyperspectral imaging coupled with a deep learning approach. Comput Electron Agric. 2020; 177:9.
https://doi.org/10.1016/j.compag.2020.105683 WOS:000571756100001.
9. Rady AM, Guyer DE, Watson NJ. Near-infrared Spectroscopy and Hyperspectral Imaging for Sugar
Content Evaluation in Potatoes over Multiple Growing Seasons. Food Anal Meth. 2021; 14(3):581–95.
https://doi.org/10.1007/s12161-020-01886-1 WOS:000584915300001.
10. Zhao M, Peng YK, Li L. A robot system for the autodetection and classification of apple internal quality
attributes. Postharvest Biol Technol. 2021; 180:8. https://doi.org/10.1016/j.postharvbio.2021.111615
WOS:000681140700003.
11. Liu PH, Zhang P, Ni FP, Hu YH. Feasibility of nondestructive detection of apple crispness based on
spectroscopy and machine vision. J Food Process Eng. 2021; 44(10):10. https://doi.org/10.1111/jfpe.
13802 WOS:000670320300001.
12. Tan WY, Sun LJ, Yang F, Che WK, Ye DD, Zhang D, et al. The feasibility of early detection and grading
of apple bruises using hyperspectral imaging. J Chemometr. 2018; 32(10):14. https://doi.org/10.1002/
cem.3067 WOS:000447552300007.
13. Keresztes JC, Goodarzi M, Saeys W. Real-time pixel based early apple bruise detection using short
wave infrared hyperspectral imaging in combination with calibration and glare correction techniques.
Food Control. 2016; 66:215–26. https://doi.org/10.1016/j.foodcont.2016.02.007
WOS:000375163700027.
14. Li MR, Guo JP, He JQ, Xu CD, Li JK, Mi CR, et al. Possible impact of climate change on apple yield in
Northwest China. Theor Appl Climatol. 2020; 139(1–2):191–203. https://doi.org/10.1007/s00704-019-
02965-y WOS:000511515200013.
15. down.foodmate.net [Internet]. GB/T 10651–2008 Fresh apple; c2008 [cited 2022 Jun 25]. Available
from: http://down.foodmate.net/standard/sort/3/16154.html.
16. Nleya KM, Minnaar A, de Kock HL. Relating physico-chemical properties of frozen green peas (Pisum
sativum L.) to sensory quality. J Sci Food Agric. 2014; 94(5):857–65. https://doi.org/10.1002/jsfa.6315
WOS:000332520600006. PMID: 23893794
17. Zhisheng W, Guoqing O, Xinyuan S, Qun M, Guang W, Yanjiang Q. ABSORPTION AND QUANTITA-
TIVE CHARACTERISTICS OF C-H BOND AND O-H BOND OF NIR. Optika i spektroskopiya. 2014;
117(5):724–. https://doi.org/10.7868/s0030403414110233 RSCI:22267757.
18. Kutsanedzie FYH, Chen Q, Hassan MM, Yang M, Sun H, Rahman MH. Near infrared system coupled
chemometric algorithms for enumeration of total fungi count in cocoa beans neat solution. Food Chem.
2018; 240:231–8. Epub 2017/09/28. https://doi.org/10.1016/j.foodchem.2017.07.117 PMID: 28946266.
19. Hassan MM, He PH, Zareef M, Li HH, Chen QS. Rapid detection and prediction of chloramphenicol in
food employing label-free HAu/Ag NFs-SERS sensor coupled multivariate calibration. Food Chemistry.
2022; 374. https://doi.org/10.1016/j.foodchem.2021.131765 WOS:000734130600007. PMID:
34896956
20. Li XP, Jiang HZ, Jiang XS, Shi MH. Identification of Geographical Origin of Chinese Chestnuts Using
Hyperspectral Imaging with 1D-CNN Algorithm. Agriculture-Basel. 2021; 11(12). https://doi.org/10.
3390/agriculture11121274 WOS:000735302300001.
21. Lv JD, Wang YJ, Xu LM, Gu YW, Zou L, Yang B, et al. A method to obtain the near-large fruit from apple
image in orchard for single-arm apple harvesting robot. Sci Hortic. 2019; 257:6. https://doi.org/10.1016/
j.scienta.2019.108758 WOS:000486103700068.
22. Bhargava A, Bansal A, Goyal V. Machine Learning-Based Detection and Sorting of Multiple Vegetables
and Fruits. Food Anal Meth. 2022; 15(1):228–42. https://doi.org/10.1007/s12161-021-02086-1
WOS:000691158500001.
23. Zhang CL, Zhang SW, Yang JC, Shi YC, Chen J. Apple leaf disease identification using genetic algo-
rithm and correlation based feature selection method. Int J Agric Biol Eng. 2017; 10(2):74–83. https://
doi.org/10.3965/j.ijabe.20171002.2166 WOS:000399207000008.
PLOS ONE
Grading Detection of “Red Fuji” Apple in Luochuan
PLOS ONE | https://doi.org/10.1371/journal.pone.0271352 August 4, 2022 24 / 25
24. Li L, Peng YK, Yang C, Li YY. Optical sensing system for detection of the internal and external quality
attributes of apples. Postharvest Biol Technol. 2020; 162:10. https://doi.org/10.1016/j.postharvbio.
2019.111101 WOS:000508903600009.
25. Demir B, Eski I, Gurbuz F, Kus ZA, Sesli Y, Ercisli S. Prediction of Walnut Mass Based on Physical Attri-
butes by Artificial Neural Network (ANN). Erwerbs-Obstbau. 2020; 62(1):47–56. https://doi.org/10.
1007/s10341-019-00468-8 WOS:000513347600006.
26. Ji W, Chen GY, Xu B, Meng XL, Zhao D. Recognition Method of Green Pepper in Greenhouse Based
on Least-Squares Support Vector Machine Optimized by the Improved Particle Swarm Optimization.
IEEE Access. 2019; 7:119742–54. https://doi.org/10.1109/access.2019.2937326
WOS:000498558400004.
27. Zunic D, Zunic J. Shape ellipticity from Hu moment invariants. Appl Math Comput. 2014; 226:406–14.
https://doi.org/10.1016/j.amc.2013.10.062 WOS:000331496200037.
28. Xu KR, Lu X, Wang QH, Ma MH. Online automatic grading of salted eggs based on machine vision. Int
J Agric Biol Eng. 2015; 8(1):35–41. https://doi.org/10.3965/j.ijabe.20150801.005
WOS:000351105500005.
29. Ma T, Li XZ, Inagaki T, Yang HY, Tsuchikawa S. Noncontact evaluation of soluble solids content in
apples by near-infrared hyperspectral imaging. J Food Eng. 2018; 224:53–61. https://doi.org/10.1016/j.
jfoodeng.2017.12.028 WOS:000424718600006.
30. Xia Y, Fan SX, Tian X, Huang WQ, Li JB. Multi-factor fusion models for soluble solid content detection
in pear (Pyrus bretschneideri ’Ya’) using Vis/NIR online half-transmittance technique. Infrared Phys
Technol. 2020; 110:9. https://doi.org/10.1016/j.infrared.2020.103443 WOS:000579527000006.
31. Fan SX, Huang WQ, Guo ZM, Zhang BH, Zhao CJ, Qian M. Assessment of Influence of Origin Variabil-
ity on Robustness of Near Infrared Models for Soluble Solid Content of Apples. ChinJ Anal Chem.
2015; 43(2):239–44. WOS:000354900800007.
32. Shao YY, Liu Y, Xuan GT, Wang YX, Gao ZM, Hu ZC, et al. Application of hyperspectral imaging for
spatial prediction of soluble solid content in sweet potato. RSC Adv. 2020; 10(55):33148–54. https://doi.
org/10.1039/c9ra10630h WOS:000568227200016. PMID: 35515022
33. Zhang HL, Zhan BS, Pan F, Luo W. Determination of soluble solids content in oranges using visible and
near infrared full transmittance hyperspectral imaging with comparative analysis of models. Postharvest
Biol Technol. 2020; 163:9. https://doi.org/10.1016/j.postharvbio.2020.111148
WOS:000528876400017.
34. Wei X, He JC, Zheng SH, Ye DP. Modeling for SSC and firmness detection of persimmon based on NIR
hyperspectral imaging by sample partitioning and variables selection. Infrared Phys Technol. 2020;
105:7. https://doi.org/10.1016/j.infrared.2019.103099 WOS:000526110800002.
35. Fan SX, Huang WQ, Li JB, Guo ZM, Zhao CJ. Application of Characteristic NIR Variables Selection in
Portable Detection of Soluble Solids Content of Apple by Near Infrared Spectroscopy. Spectrosc Spectr
Anal. 2014; 34(10):2707–12. https://doi.org/10.3964/j.issn.1000-0593(2014)10-2707-06
WOS:000343189200021. PMID: 25739212
PLOS ONE
Grading Detection of “Red Fuji” Apple in Luochuan
PLOS ONE | https://doi.org/10.1371/journal.pone.0271352 August 4, 2022 25 / 25
... Recently, Wang et al. [268] focused on analyzing the principles of apple defects, shape, size, and Brix detection and grading based on China's national standard. The study established appearance quality classifier models based on machine vision ( Figure 13) and constructed a Brix value prediction model based on NIR spectroscopy. ...
... (a) Original image (b) gamma transform (c) Gaussian filtering (d) HSV transform (e) grey level transform (f) morphological processing (g) find contours (h) drawing contours. Reprinted with permission from Ref.[268]. 2022, Public Library of Science (CC BY 4.0). ...
Article
Full-text available
Spectroscopic methods deliver a valuable non-destructive analytical tool that provides simultaneous qualitative and quantitative characterization of various samples. Apples belong to the world's most consumed crops and with the current challenges of climate change and human impacts on the environment, maintaining high-quality apple production has become critical. This review comprehensively analyzes the application of spectroscopy in near-infrared (NIR) and visible (Vis) regions, which not only show particular potential in evaluating the quality parameters of apples but also in optimizing their production and supply routines. This includes the assessment of the external and internal characteristics such as color, size, shape, surface defects, soluble solids content (SSC), total titratable acidity (TA), firmness, starch pattern index (SPI), total dry matter concentration (DM), and nutritional value. The review also summarizes various techniques and approaches used in Vis/NIR studies of apples, such as authenticity, origin, identification, adulteration, and quality control. Optical sensors and associated methods offer a wide suite of solutions readily addressing the main needs of the industry in practical routines as well, e.g., efficient sorting and grading of apples based on sweetness and other quality parameters, facilitating quality control throughout the production and supply chain. This review also evaluates ongoing development trends in the application of handheld and portable instruments operating in the Vis/NIR and NIR spectral regions for apple quality control. The use of these technologies can enhance apple crop quality, maintain competitiveness, and meet the demands of consumers, making them a crucial topic in the apple industry. The focal point of this review is placed on the literature published in the last five years, with the exceptions of seminal works that have played a critical role in shaping the field or representative studies that highlight the progress made in specific areas.
... Despite their cost-effectiveness, challenges include sensitivity to ambient light and limitations in detecting specific internal defects. NIR cameras (700-1000 nm) offer insights into internal fruit quality, including sugar content, acidity, firmness, ripeness, and water content [70]. They excel in detecting imperceptible internal defects but pose challenges such as increased costs and operational complexity. ...
... Furthermore, there are differences in the quality of different varieties of rice in different producing areas, and the model established by the same index cannot be fully applied to different rice products, resulting in poor universality. Compared with NIR spectroscopy, machine vision technology can extract information such as color features and texture features of sample images [41]. By preprocessing images, detailed features in the images can be highlighted to realize effective detection of appearance features of samples, thus improving the classification accuracy of models. ...
Article
Full-text available
Rice is susceptible to mold and mildew during storage. Metabolites such as aflatoxin produced during mildew have great harm to the health of consumers. A rapid identification approach of contaminated rice was developed based on data fusion of near-infrared spectroscopy and machine vision to satisfy the need for rapid detection of normal rice adulterated with moldy rice. The successive projection algorithm (SPA) was merged with principal component analysis (PCA) and support vector classification (SVC) to create the SPA-PCA-SVC method, which was based on variable selection, feature extraction, and nonlinear modeling methodologies. K-fold cross-validation and the sum of predicted residual squares were used to find the optimal number of main components. The model parameters were tuned using a genetic algorithm. Identification models of adulterated rice was established based on NIR spectroscopy, machine vision, and their fusion data using this method. The identification accuracy of the training set was 92.81%, 86.27%, and 99.35%, and the identification accuracy of the test set was 69.23%, 82.69%, and 96.15%, respectively. Compared to near-infrared spectroscopy and machine vision alone, the identification performance of the model built by fusion data is significantly improved. The findings demonstrate the viability of the near-infrared spectroscopy and machine vision data fusion method for the detection of contaminated rice, providing a theoretical foundation for the creation of online adulterated rice identification tools.
... However, excessive smoothing can result in the loss of fne details and important spectral information, particularly in regions of interest with sharp peaks or rapid changes. Selecting an Discrete Dynamics in Nature and Society appropriate smoothing algorithm and adjusting the smoothing parameters are crucial to strike a balance between noise reduction and preservation of important spectral characteristics [38]. Trend correction plays a critical role in removing systematic variations or baseline drift from spectra. ...
Article
Full-text available
Near-infrared spectrum technology is extensively employed in assessing the quality of tobacco blending modules, which serve as the fundamental units of cigarette production. This technology provides valuable technical support for the scientific evaluation of these modules. In this study, we selected near-infrared spectral data from 238 tobacco blending module samples collected between 2017 and 2019. Combining the power of XGBoost and deep learning, we constructed a flavor prediction model based on feature variables. The XGBoost model was utilized to extract essential information from the high-dimensional near-infrared spectra, while a convolutional neural network with an attention mechanism was employed to predict the flavor type of the modules. The experimental results demonstrate that our model exhibits excellent learning and prediction capabilities, achieving an impressive 95.54% accuracy in flavor category recognition. Therefore, the proposed method of predicting flavor types based on near-infrared spectral features plays a valuable role in facilitating rapid positioning, scientific evaluation, and cigarette formulation design for tobacco blending modules, thereby assisting decision-making processes in the tobacco industry.
... Fathizadeh et al. (2020) measured the firmness of Royal Gala apples using acoustic vibration response method under two storage conditions. Nondestructive techniques using machine vision has been used for detecting ripeness level in Red Delicious apple and also, for detection of defect, contour and size of Red Fuji apples (Wang et al., 2022). ...
Article
Full-text available
Acoustic system and machine vision were used to evaluate the effects of different harvest dates on the quality and sensory attributes of exotic apple varieties of North Western Himalayan. Gala Redlum (V1) was harvested at 110 (H1), 120 (H2) and 130 (H3) Days from Full Bloom (DFFB); Red Velox (V2) and Super Chief (V3) were harvested at 130 (H1), 140 (H2) and 150 (H3) DFFB. Highest acoustic coefficient (21.13) and firmness (20.72 lbs) recorded at first harvest date (H1) decreased significantly (p ≤0.05) (19.86 to 17.90 lbs) at second harvest (H2) and (17.77 to 16.80 lbs) at third harvest date. Highest starch iodine rating (3.72); anthocyanin content (24.81 mg/100 g); total soluble solids (12.10 %); total sugars (8.75 %) were recorded at H3 in all the varieties. For Gala Redlum (V1) 130 DFFB and for Red Velox (V2) and Super Chief (V3) 150 DFFB were predicted as suitable harvesting dates for table consumption.
... While Figure 3c shows the values of the • Brix observed, which remained constant for the first 3 days (14 • Brix) and then decreased, on day 7, where the voltage and electric current values were at their maximum, 11 • Brix were observed in the substrates of the MFCs, but on day 26, the values decreased to 0. It has been reported that fruits rich in galactose, glucose, sucrose, and organic acids (such as ascorbic and citric acid) are one of the main sources of energy that yeasts use for their growth [50,51]. These values serve to observe the amount of dry material in the waste, in this case, specifically the number of sugars, which were consumed by the microorganisms in the electricity generation process [52]. In Figure 4a, the internal resistance (Rint.) of the fuel cells is shown, for which Ohm's Law (V = IR) was used, where the voltage values were placed on the "Y" axis and those of the electric current on the "X" axis; in this way, the slope of the linear adjustment is the internal resistance of the MFCs. ...
Article
Full-text available
Pollution generated by the misuse of large amounts of fruit and vegetable waste has become a major environmental and social problem for developing countries due to the absence of specialized collection centers for this type of waste. This research aims to generate electricity in an eco-friendly way using red dragon fruit (pitahaya) waste as the fuel in single-chamber microbial fuel cells on a laboratory scale using zinc and copper electrodes. It was possible to generate voltage and current peaks of 0.46 ± 0.03 V and 2.86 ± 0.07 mA, respectively, with an optimum operating pH of 4.22 ± 0.09 and an electrical conductivity of 175.86 ± 4.72 mS/cm at 8 °Brix until the tenth day of monitoring. An internal resistance of 75.58 ± 5.89 Ω was also calculated with a maximum power density of 304.33 ± 16.51 mW/cm2 at a current density of 5.06 A/cm2, while the FTIR spectra showed a decrease in the initial compounds and endings, especially at the 3331 cm−1 peaks of the O–H bonds. Finally, the yeast-like fungus Geotrichum candidum was molecularly identified (99.59%). This research will provide great opportunities for the generation of renewable energy using biomass as fuel through electronic devices with great potential to generate electricity.
... To reduce or eliminate useless information in the raw spectral data like noise, absorption peak overlap, baseline drift, and non-uniformity in samples and surfaces [26,27], three preprocessing methods were employed in this study, including standard normalized variate (SNV), multiplicative scatter correction (MSC), and auto scale. These methods could also enhance the effective spectral information and improve the accuracy and stability of the model. ...
Article
Full-text available
In this work, the potential of a hyperspectral imaging (HSI) system for the detection of black spot disease on winter jujubes infected by Alternaria alternata during postharvest storage was investigated. The HSI images were acquired using two systems in the visible and near-infrared (Vis-NIR, 400 –1000 nm) and short-wave infrared (SWIR, 1000–2000 nm) spectral regions. Meanwhile, the change of physical (peel color, weight loss) and chemical parameters (soluble solids content, chlorophyll) and the microstructure of winter jujubes during the pathogenic process were measured. The results showed the spectral reflectance of jujubes in both the Vis-NIR and SWIR wavelength ranges presented an overall downtrend during the infection. Partial least squares discriminant models (PLS-DA) based on the HSI spectra in Vis-NIR and SWIR regions of jujubes both gave satisfactory discrimination accuracy for the disease detection, with classification rates of over 92.31% and 91.03%, respectively. Principal component analysis (PCA) was carried out on the HSI images of jujubes to visualize their infected areas during the pathogenic process. The first principal component of the HSI spectra in the Vis-NIR region could highlight the diseased areas of the infected jujubes. Consequently, Vis-NIR HSI and NIR HSI techniques had the potential to detect the black spot disease on winter jujubes during the postharvest storage, and the Vis-NIR HSI spectral information could visualize the diseased areas of jujubes during the pathogenic process.
Article
Food plays a significant role in human existence. It is necessary to reduce food wastage, and enhance both food management and safety protocols. The growing prevalence and advanced nature of computational networks have empowered modern industrial and logistical frameworks. These networks continuously generate data from sensors, systems, intelligent devices, machines, and human interactions that undergoes deep analysis. These advancements have spurred a transformation, giving rise to a technology called Artificial Intelligence (AI). The current review aims to offer valuable insights into the latest AI technologies, providing assistance to agricultural farmers and food processing endeavors. The countless scenarios and use cases pertaining to AI, with the lenses of product development, sorting and grading, enhancing quality and safety, supply chain management, and waste management, are explored herein. Finally, discussion about the pivotal role of AI in fostering sustainable food production is also involved in this review.
Article
Full-text available
The adulteration in Chinese chestnuts affects the quality, taste, and brand value. The objective of this study was to explore the feasibility of the hyperspectral imaging (HSI) technique to determine the geographical origin of Chinese chestnuts. An HSI system in spectral range of 400–1000 nm was applied to identify a total of 417 Chinese chestnuts from three different geographical origins. Principal component analysis (PCA) was preliminarily used to investigate the differences of average spectra of the samples from different geographical origins. A deep-learning-based model (1D-CNN, one-dimensional convolutional neural network) was developed first, and then the model based on full spectra and optimal wavelengths were established for various machine learning methods, including partial least squares-discriminant analysis (PLS-DA) and particle swarm optimization-support vector machine (PSO-SVM). The optimal results based on full spectra for 1D-CNN, PLS-DA, and PSO-SVM models were 97.12%, 97.12%, and 95.68%, respectively. Competitive adaptive reweighted sampling (CARS) and a successive projections algorithm (SPA) were individually utilized for wavelengths selection, and the results of simplified models generally improved. The contrasting results demonstrated that the prediction accuracies of SPA-PLS-DA and 1D-CNN both reached 97.12%, but 1D-CNN presented a higher Kappa coefficient value than SPA-PLS-DA. Meanwhile, the sensitivities and specificities of SPA-PLS-DA and 1D-CNN models were both above 90% for the samples from each geographical origin. These results indicated that both SPA-PLS-DA and 1D-CNN models combined with HSI have great potential for the geographical origin identification of Chinese chestnuts.
Article
Full-text available
Abstract: A field-based apple detection and grading device was developed and used to detect and grade apples in the field using a deep learning framework. Four features were selected for apple grading, namely, size, color, shape, and surface defects, and detection algorithms were designed to discriminate between the four features using machine vision and other methods. Then, the four apple features were fused, and a support vector machine (SVM) was used for infield apple grading into three grades: first-grade fruit, second-grade fruit, and other-grade fruit. The results showed that for a single index, the accuracy of detecting the apple size, the fruit shape, the color, and the surface defects, were 99.04%, 97.71%, 98%, and 95.85%. The grading accuracies for the first-grade fruit, second-grade fruit, other-grade fruit, and the average grading accuracy based on multiple features were 94.55%, 95.71%, 100%, and 95.49%, respectively. The field experiment showed that the average grading accuracy was 94.12% when the feeding interval of the apples was less than 1.5 s and the walking speed did not exceed 0.5 m/s, meeting the accuracy requirements of field-based apple grading.
Article
Full-text available
Vegetable and fruit security plays a crucial role in the Indian economy. In the recent past, it has been noted that vegetables and fruits are affected by different diseases. This leads to the failure of the economy in the agriculture field. The identification of type and grading of vegetables and fruit is onerous due to the heavy production of products. The manual investigation is expensive, laborious, and inconsistent. Thus, an automated machine learning–based algorithm is proposed for the detection of type and quality grading of five different (jalapeno, lemon, sweet potato, cabbage, and tomato) vegetables and four different (apple, avocado, banana, and orange) varieties of fruits. Firstly, images are preprocessed by Gaussian filtering to enhance the quality of the image and removing of noise. Secondly, segmentation of images is done by fuzzy c-means clustering and grab-cut. Then, various features, namely, statistical, color, textural, geometrical, Laws’ texture energy, the histogram of gradients, and discrete wavelet transform, are extracted (114) and selected from feature vector by PCA. The detection of vegetable and fruit types is done by color and geometrical features while all other features are considered for grading. Lastly, LR, SRC, ANN, and SVM are used to make decisions for sorting and grading. The performance of the system has been validated by the k (10) fold cross-validation technique. The proposed algorithm achieves 85.49% (LR), 87.63% (SRC), 92.64% (ANN), and 97.63% (SVM) for detection of type. Also, the system achieves 83.91% (LR), 85.00% (SRC), 89.54% (ANN), and 96.59% (SVM) for grading. The proper feature selection shows the enhanced performance of the system. Among four different classifiers, SVM shows more efficient results that are promising and comparable with the literature.
Article
Full-text available
Texture is an important attribute affecting apple quality and consumer preferences. In general, apple texture is evaluated by such parameters as crispness and hardness. To explore the feasibility of nondestructive detection of apple crispness based on spectroscopy and machine vision, a calibration model based on optical fiber spectroscopy (in the range of 500–1,000 nm) was developed using the partial least squares. A compensation model based on appearance images was established to improve the prediction performance, and a quantitative prediction model based on the fusion of spectra and appearance images was subsequently obtained. The results showed that the determination coefficient of prediction () and root mean square error (RMSE) of prediction (RMSEP) of the calibration model were 0.8921 and 0.1226 N, respectively. The determination coefficients (R²) of the compensation model for positive derivation and negative derivation were 0.9310 and 0.9051, respectively, with a RMSE of 0.0515 N and 0.0420 N, respectively. The mean value and standard deviation that occurred in relative errors both decreased from 8.52 to 6.44% and 6.22 to 5.30% before and after positive derivation compensation and decreased from 8.29 to 5.55% and 5.62 to 4.49% before and after negative derivation compensation using the appearance images. This result indicated that the prediction of apple crispness was more accurate and reliable after the fusion of spectra and appearance images. Therefore, it is feasible to nondestructively detect apple crispness based on spectroscopy and machine vision. Practical Applications This study provides a method for nondestructively and accurately detecting apple crispness via spectroscopy and machine vision. According to the crispness of apples, enterprises can not only sell apples to different consumer groups, but also distribute apples in different levels to improve their benefits.
Article
Full-text available
Physical Classification of ripe fruits is an expensive affair in the agriculture industry and human error can lead to inaccurate results. This paper introduces the concept of an intelligent AI-based system using spectrophotometry and computer vision for automated fruit segregation based on their grade. When the fruit is fed into the proposed system, the fruit is identified with 95% accuracy, using a cloud-computing platform provided by Microsoft Azure. After that, using spectroscopy and ensemble machine learning approaches, fruit grade is predicted. This ensemble model is trained using 1366 apple readings taken from Unitec’s Apple Sorting and Grading Machine from an industrial plant. With the help of H2O’s Driverless.AI, the proposed ensemble provides an overall approximate validation accuracy of 82%. The model is also tested on an unseen test dataset containing real-life spectral values and the accuracy of fruit segregation into different classes peaked at 72%.
Article
Full-text available
Pomelo is an important agricultural product in southern China. Near-infrared hyperspectral imaging (NIRHI) technology is applied to the rapid detection of pomelo fruit quality. Advanced chemometric methods have been investigated for the optimization of the NIRHI spectral calibration model. The partial least squares (PLS) method is improved for non-linear regression by combining it with the kernel Gaussian radial basis function (RBF). In this study, the core parameters of the PLS latent variables and the RBF kernel width were designed for grid search selection to observe the minimum prediction error and a relatively high correlation coefficient. A deep learning architecture was proposed for the parametric scaling optimization of the RBF-PLS modeling process for NIRHI data in the spectral dimension. The RBF-PLS models were established for the quantitative prediction of the sugar (SU), vitamin C (VC), and organic acid (OA) contents in pomelo samples. Experimental results showed that the proposed RBF-PLS method performed well in the parameter deep search progress for the prediction of the target contents. The predictive errors for model training were 1.076% for SU, 41.381 mg/kg for VC, and 1.136 g/kg for OA, which were under 15% of their reference chemical measurements. The corresponding model testing results were acceptably good. Therefore, the NIRHI technology combined with the study of chemometric methods is applicable for the rapid quantitative detection of pomelo fruit quality, and the proposed algorithmic framework may be promoted for the detection of other agricultural products.
Article
Full-text available
Sugar content is one of the most important properties of potato tubers as it directly affects their processing and the final product quality, especially for fried products. In this study, data obtained from spectroscopic (interactance and reflectance) and hyperspectral imaging systems were used individually or fused to develop non-cultivar nor growing season-specific regression and classification models for potato tubers based on glucose and sucrose concentration. Data was acquired over three growing seasons for two potato cultivars. The most influential wavelengths were selected from the imaging systems using interval partial least squares for regression and sequential forward selection for classification. Hyperspectral imaging showed the highest regression performance for glucose with a correlation coefficient (ratio of performance to deviation) or r(RPD) of 91.8(2.41) which increased to 94%(2.91) when the data was fused with the interactance data. The sucrose regression results had the highest accuracy using data obtained from the interactance system with r(RPD) values of 74.5%(1.40) that increased to 84.4%(1.82) when the data was fused with the reflectance data. Classification was performed to identify tubers with either high or low sugar content. Classification performance showed accuracy values as high as 95% for glucose and 80.1% for sucrose using hyperspectral imaging, with no noticeable improvement when data was fused from the other spectroscopic systems. When testing the robustness of the developed models over different seasons, it was found that the regression models had r(RPD) values of 55(1.19)–90.3%(2.34) for glucose and 35.8(1.07)–82.2%(1.29) for sucrose. Results obtained in this study demonstrate the feasibility of developing a rapid monitoring system using multispectral imaging and data fusion methods for online evaluation of potato sugar content.
Article
Full-text available
Visible and near infrared (Vis-NIR) hyperspectral imaging was used for fast detection and visualization of soluble solid content (SSC) in ‘Beijing 553’ and ‘Red Banana’ sweet potatoes. Hyperspectral images were acquired from 420 ROIs of each cultivar of sliced sweet potatoes. There were 8 and 10 outliers removed from ‘Beijing 553’ and ‘Red Banana’ sweet potatoes by Monte Carlo partial least squares (MCPLS). The optimal spectral pretreatments were determined to enhance the performance of the prediction model. Successive projections algorithm (SPA) and competitive adaptive reweighted sampling (CARS) were employed to select characteristic wavelengths. SSC prediction models were developed using partial least squares regression (PLSR), support vector regression (SVR) and multivariate linear regression (MLR). The more effective prediction performances emerged from the SPA–SVR model with Rp² of 0.8581, RMSEP of 0.2951 and RPDp of 2.56 for ‘Beijing 553’ sweet potato, and the CARS–MLR model with Rp² of 0.8153, RMSEP of 0.2744 and RPDp of 2.09 for ‘Red Banana’ sweet potato. Spatial distribution maps of SSC were obtained in a pixel-wise manner using SPA–SVR and CARS–MLR models for quantifying the SSC level in a simple way. The overall results illustrated that Vis-NIR hyperspectral imaging was a powerful tool for spatial prediction of SSC in sweet potatoes.
Article
Considering growing food safety issues, hollow Au/Ag nano-flower (HAu/Ag NFs) nanosensor has been synthesized for label-free and ultrasensitive detection of chloramphenicol (CP) via integrating the surface-enhanced Raman scattering (SERS) and multivariate calibration. As the anisotropic plasmonic nanomaterials, HAu/Ag NFs had numerous nano-chink on their surface, which offered huge hotspots for analytes. CP generated a strong SERS signal while adsorbed on the surface of HAu/Ag NFs and noted excellent linearity with 1st derivative-competitive adaptive reweighted sampling-partial least squares (CARS-PLS) in the range of 0.0001 - 1000 µg/mL among the four applied multivariate calibrations. Additionally, CARS-PLS generated the lowest prediction error (RMSEP) of 0.089 and 0.123 µg/mL for milk and water samples, respectively, and any CARS-PLS model could be used for both samples according to T-test results (P < 0.5). The intra- and interday recovery for both samples were in the range of 92.62 - 96.74% with CV < 10%, suggested the proposed method has excellent accuracy and precision.
Article
Soluble solids content (SSC) is an important index of apple internal quality. To invent a more flexible and efficient method of apple internal quality detection and classification, a robot system for the autodetection and classification of apple internal quality attributes was developed. Visible and near infrared (Vis/NIR) spectroscopy is a promising technology for the nondestructive detection of the internal quality attributes of apples. The end effector of the robot system mainly carried the Vis/NIR spectra collection module and gripping mechanism. The Vis/NIR spectrum was collected when the end effector gripped the apple. Single shot multibox detector (SSD) target detection algorithm was applied to process the images and calculate the position of the apple, which greatly reduced the low accuracy of apple identification caused by light intensity and complex backgrounds, and the speed was approximately 0.055 s per frame. In comparing different modeling results, the normalized spectral ratio (NSR) pretreatment combined with the competitive adaptive reweighted sampling algorithm (CARS) obtained the best modeling result, with Rc and Rcv values of 0.979 and 0.969 and RMSEC and RMSECV values of 0.335 % and 0.385 %, respectively. The classification accuracy of independent validation was 90.0 % with Rp and RMSEP values of 0.952 and 0.393 %. The robot system required approximately 5.200 s to complete a classification for each sample. The results showed feasibility of the robot system to detect the internal quality attributes of apples.