You are on page 1of 9

Food Packaging and Shelf Life 28 (2021) 100638

Contents lists available at ScienceDirect

Food Packaging and Shelf Life


journal homepage: www.elsevier.com/locate/fpsl

Optimizing QR code readability for curved agro-food packages using


response surface methodology to improve mobile phone-based traceability
Jianping Qian a, *, Bin Xing b, Baohui Zhang a, Han Yang a
a
Key Laboratory of Agricultural Remote Sensing (AGRIRS), Ministry of Agriculture and Rural Affairs/Institute of Agricultural Resources and Regional Planning, Chinese
Academy of Agricultural Sciences, 100081 Beijing, China
b
National Engineering Research Center for Information Technology in Agriculture, Beijing Academy of Agriculture and Forestry Science, Beijing 100097, China

A R T I C L E I N F O A B S T R A C T

Keywords: Quick response (QR) codes are two-dimensional (2D) barcodes that are widely used in food packaging. Moreover,
QR code scanning QR codes with mobile phones has become a convenient method to ensure product traceability. How­
Traceability ever, attaching QR codes to curved agro-food products to improve traceability effects and increase customer
Response surface methodology
satisfaction presents a significant challenge. This paper reports an optimization method developed for curved
Food packaging
surfaces that uses response surface methodology (RSM) analysis. The value ranges of the following four factors
affecting QR readability were selected and analyzed: reading distance, ball diameter, code size, and coded
characters. A central composite inscribed experiment using four factors with five levels was designed using RSM
to obtain the optimal reading parameters, and experimental equipment was designed in-house. The results
indicate the primary factors that significantly affect QR code readability are reading distance, ball diameter, the
interactions between reading distance and code size, and the interactions between ball diameter and code size.
Optimal parameters were obtained with the established model by using apples and melons. For actual experi­
mental testing, two solutions for apples and one solution for melon were selected to determine the requisite
average values for the parameters. Tests were performed using different mobile phones, including both iOS and
Android platforms. An analysis of the results reveals only slight differences between simulated readability and
actual readability for different fruits and mobile phone platforms.

1. Introduction traceability. Identification technologies, including barcodes and radio


frequency identification (RFID), can be integrated into a supply chain
Several paradigm-shifting events, including the bovine spongiform system as traceable unit identification methods (Fan et al., 2019;
encephalopathy (BSE) case in the early to mid-1990s (Wales, Harvey, & Jedermann, Praeger, & Lang, 2017; Ruiz-Garcia & Lunadei, 2011).
Warde, 2006) and the dioxin contamination of chicken feed in Belgium Because of their low cost and ease of use, barcodes have become widely
in 1999 (Bernard et al., 2002), have drawn attention on food safety over used in retail over the last 30 years and now facilitate inventory control,
the past decades (Bertolini, Bevilacqua, & Massini, 2006). At the same stock recording, and checkout (Ghaani, Cozzolino, Castelli, & Farris,
time, consumer demand for fresh-like, safe, and nutritious food is 2016). A barcode is a one-dimensional pattern of parallel spaces and
increasing (Ramesh, Nayak, Amirbahman, Tripp, & Mukhopadhyay, bars arranged to represent 10 digits. The information encoded in the
2016). The ISO 22005:2007 food traceability standard requires each barcode can be read by an optical barcode scanner that sends the in­
company to identify both its suppliers and customers, a concept based on formation to a system where it is stored and processed. Two-dimensional
the principle of one-up, one-down (International Organization for (2D) barcodes store more information than one-dimensional barcodes
Standardization, 2007). Driven by food safety, quality, regulatory, so­ because they consist of a combination of dots and spaces arranged in a
cial, economic, and technological concerns, voluntary and mandatory 2D array or matrix in lieu of bars and spaces (Qian et al., 2012).
traceability systems are now being enforced worldwide (Boys & Fraser, Quick response (QR) codes are typical 2D barcodes and are defined
2018; Jin & Zhou, 2014; Kim & Woo, 2016). by the industrial ISO/IEC 18004:2006 standard (Jiao, Zou, & Li, 2017).
Traceable unit identification is very important for achieving Recently, some tamper-proof barcode indicators that provide time and

* Corresponding author.
E-mail address: qianjianping@caas.cn (J. Qian).

https://doi.org/10.1016/j.fpsl.2021.100638
Received 24 July 2020; Received in revised form 18 January 2021; Accepted 19 January 2021
Available online 1 February 2021
2214-2894/© 2021 Elsevier Ltd. All rights reserved.
J. Qian et al. Food Packaging and Shelf Life 28 (2021) 100638

Fig. 1. Schematic of traceability procedure for circular agro-food.

temperature information have been designed (Schumann & Schmid,


2018). Each QR code is composed of dark (logical “1′′ ) and light (logical
“0′′ ) modules that are evenly distributed over a square net of fields,
wherein the size of a field is the size of a single module. According to the
ISO/IEC 18,004 standard (International Organization for Standardiza­
tion, 2006), the size of one module is 4 × 4 pixels with a print resolution
of 300 dots per inch. This size ensures readability by most optical
devices.
In addition, the information collected and searched using portable
devices, including mobile phones, has become an effective means for
improving management effects (So-In, Poolsanguan, & Rujirakul, 2014;
Tseng et al., 2006). Steinberger, Rothmund, and Auernhammer (2009)
developed mobile farming information collection equipment that
transmitted information to the server via the internet. Li, Qian, Yang,
Sun, and Ji (2010) developed for cucumber traceability a farming
information-acquisition technique and a record-keeping and
decision-support system based on a personal digital assistant, which was
Fig. 2. Experimental set-up.a. Relationship between reading distance and QR
produced in two production companies in Beijing and helped improved
code readability (ball diameter:12.5 cm, code size:15 mm, coded characters: 60
production efficiency. Qian, Xing, Wu, Chen, and Wang (2018) incor­ bytes). b. relationship between reading distance and QR code readability
porated image processing technology in a smartphone to develop a (reading distance: 20 cm, code size: 15 mm, coded characters: 60 bytes).
simple, inexpensive, and rapidly accessible system to estimate apple
yield.
2. Materials and methods
Recently, scanning QR codes attached to agro-food using mobile
phones has become a convenient traceability method. Improving QR
2.1. Tracing systems
code readability for different conditions is important for information
acquisition and to ensure a satisfactory customer experience. Tarjan,
Tracing systems are fundamentally based on the following three
Senk, Tegeltija, Stankovski, and Ostojic (2014) used an Android
factors: a product identification system, a supply chain management
smartphone to analyze the readability of QR codes with variable con­
system, and a central database (Olsen & Borit, 2018). Two-dimensional
tent, sizes, and data error correction levels. The results show that the
barcodes have become an effective approach for product identification.
readability of the QR code is not directly affected by the number of
In most applications, product labels containing 2D barcodes are printed
coded characters or by the error correction level. However, the read­
by a barcode printer linked with a supply chain management system.
ability of the QR code is affected by the size of the modules comprising
The 2D barcode contains product information, including the production
the code.
batch ID, enterprise name, and verification results, and is attached to the
Existing studies and applications provide solid evidence for using QR
surface of the product. For agro-food, irregular surfaces are very com­
code labels attached to regular surfaces. However, many types of agro-
mon. A typical example includes fruits with curved surfaces, such as
food have curved surfaces, including tomatoes, apples, melons, and
tomatoes, peaches, apples, oranges, and watermelons. Upon delivery of
watermelons. Compared with reading QR codes on regular surfaces,
these fruits, customers can scan the 2D barcodes on the fruits with a
reading QR codes attached to curved surfaces is challenging in terms of
mobile phone to obtain relevant product information. A schematic of
efficiency. The following parameters require further study: (1) how
this procedure is outlined in Fig. 1.
different conditions affect readability results, (2) whether a measurable
model can be developed for ensuring that reading conditions correspond
with results, and (3) determination of the optimal reading conditions for 2.2. Experimental setup
different agro-food types with varying degrees of curvature. To examine
these parameters, we apply in this study a response surface methodology To test readability in a consistent manner, an experimental setup was
(RSM) to obtain the optimal reading parameters for curved agro-food. In designed as shown in Fig. 2. The experimental setup included a flexible
addition, QR code readability is tested experimentally by using two support, ruler, mobile phone holder, and ball fixture. A flexible support
typical fruits with curved surfaces. with a ruler was used to adjust the reading distance. A ball fixture was
adopted to keep the ball stationary and in place. A mobile phone holder
was used to support and stabilize the mobile phone. Two mobile phones
were used in this experiment. Table 1 shows the brand and performance
parameters of these phones. The phones use the two primary types of
operating platforms, Android OS and iOS. Both phones used the

2
J. Qian et al. Food Packaging and Shelf Life 28 (2021) 100638

Table 1
Mobile phone types and technical parameters.
Manufacturer and model Camera resolution CPU Operation system Scanning app Stage I Stage II

Motorola Moto Z Play 16 MP Qualcomm snapdragon 625, 2 GHz Android 6.0 WeChat 7.0.0 + +
Apple iPhone 6 s Plus 12 MP Apple A9 + M9 motion coprocessor, 1.85 GHz iOS 9 WeChat 7.0.0 – +

Table 2
Levels of coding factors.
Factors
Level Reading distance (cm) Ball diameter (cm) Code size Coded characters (bytes)
(mm)

Upper cube point (-1) 5 5 5 20


Upper axial point (-0.5) 12.5 7 10 40
Center point (0) 20 10 15 60
Lower axial point (+0.5) 27.5 14 20 80
Lower cube point (+1) 35 20 25 100

application (app) WeChat to scan QR codes. WeChat is a Chinese multi- phone cameras have different reading distances. According to the
purpose messaging, social media, and mobile payment app developed by experience of mobile phone users, the majority of scanning distances
Tencent. WeChat was first released in 2011, and by 2018 it had become span from 10 to 20 cm. When the reading distance is less than 5 cm or
one of the world’s largest standalone mobile apps in terms of the number more than 35 cm, readability using a mobile phone is significantly less
of monthly active users, which was over one billion (Lien & Cao, 2014). than that between 10 and 20 cm. Therefore, in this study, the reading
During the readability modeling stage (Stage I), only the Motorola Moto distance range was set to 5–35 cm, with a median value of 20 cm.
Z Play was tested. During the actual fruit readability experiment (Stage
II), Motorola Moto Z Play and Apple iPhone 6 s Plus were both used to 2.3.2. Ball diameter
analyze QR code readability. Because reading QR codes on curved surfaces differs from reading
them on flat surfaces, QR codes of the same size were pasted on balls of
2.3. Selection of reading factors and value ranges varying diameters to determine how diameter affects readability. Ac­
cording to survey results, fruits with small diameters, such as cherries,
QR codes consist of black modules (square dots) arranged in a square rarely use 2D barcodes because of their low production price and
grid on a white background that can be read by an imaging device (such inconvenience of labeling. The diameter of most fruit ranges from 6 to 9
as a camera or scanner, among other devices) and processed using a cm. A larger fruit, such as watermelon, is about 20 cm in diameter. For
Reed–Solomon error correction until the image is interpreted appro­ the initial experiments, the balls served as substitutes for fruits 5, 7, 10,
priately. The required data are then extracted from both horizontal and 14, and 20 cm in diameter.
vertical patterns in the image. The amount of data that can be stored in
the QR code depends on the encoding mode (numeric, alphanumeric, or 2.3.3. Code size
byte-binary), version (1...40, indicative of the overall dimensions of the A suitable code size requires a label that is easily read and that ad­
symbol), and error-correction level (L, M, Q, or H) used. According to heres well to the product. Exception for the very small fruit such as
steady-state test results obtained by Tarjan et al. (2014) at a fixed dis­ cherry and very big fruit such as watermelon, the diameters of most fruit
tance (15 cm) with different mobile phones, QR code readability is not ranges from 6 to 9 cm. Considering these fruits as circles, the circum­
directly affected by the number of coded characters or by the ference is from 188.4 mm and 282.6 mm. In general, the radians with 20
error-correction level. However, QR code readability is affected by the deg is adaptive as the scope of attaching the code label. According the
size of modules. Because neither the data storage nor the ratio of the radians in the circle, the appropriate range of code size is
error-correction level for traceable encoding requirements are very large approximately 10–15 mm. This size was used to provide a sufficient
for QR codes, a fixed version value of seven and an error-correction level surface area for the code and a satisfactory aesthetic appearance.
of L were suitable for use in this research. However, because various other ball diameters were analyzed in this
To test readability at different distances, reading distance was study, we used code sizes of 5, 10, 15, 20, and 25 mm.
analyzed. In addition, code size was used as a test factor because it
corresponds to module size at a set printing resolution. Although the 2.3.4. Coded characters
coded characters do not directly affect the reading rate at a fixed dis­ QR codes have a larger character capacity than one-dimensional
tance, the effects of coded characters were also analyzed at variable barcodes. For traceability, important information, including the trace­
distances and for different curved surfaces in this research. In contrast ability ID, manufacturer, date, and verification result, are encoded in the
with flat surfaces, a radius is required to characterize a curved surface. QR code. Other information can be queried from the connected database
Four factors were selected for analysis, and a preliminary laboratory after loading the traceability ID from the scanned QR code. In general,
trial was designed to obtain ranges of value for the four factors. Each the encoded information ranges from approximately 20–100 characters.
factor was assigned five levels for the upper cube point, upper axial
point, center point, lower axial point, and lower cube point, which were 2.4. Optimization experiments using RSM
respectively encoded with − 1, − 0.5, 0, +0.5, and +1. Table 2 gives their
range of values. 2.4.1. RSM
RSM is a statistical tool originally described by Box and Wilson that
2.3.1. Reading distance analyzes the effects of independent variables, either alone or in combi­
Reading distance is an important parameter because different mobile nation, and their interactions with response variables in a process to

3
J. Qian et al. Food Packaging and Shelf Life 28 (2021) 100638

Table 3 Table 4
Matrix designed using RSM and corresponding response values. Variance analysis of regression equation for determining QR code readability.
Run X1: Reading X2: Ball X3: X4: Coded Y: Source Sum of Degrees of Mean F- P-value
order distance diameter Code characters Readability squares freedom (DOF) square value
(cm) (cm) size (bytes) (%)
Model 42750.76 14 3053.63 119.47 <
(mm)
0.0001
1 35 20.5 5 100 10 X1 2245.83 1 2245.83 87.86 <
2 5 4.5 25 100 0 0.0001
3 20 12.5 15 60 95 X2 6013.64 1 6013.64 235.27 <
4 27.5 12.5 15 60 80 0.0001
5 35 4.5 5 20 0 X3 64.02 1 64.02 2.50 0.1344
6 20 12.5 15 40 100 X4 18.56 1 18.56 0.73 0.4075
7 35 20.5 5 20 20 X1X2 689.06 1 689.06 26.96 0.0001
8 5 20.5 5 100 55 X1 X3 4389.06 1 4389.06 171.71 <
9 5 4.5 5 100 75 0.0001
10 35 4.5 25 100 0 X1X4 1.56 1 1.56 0.061 0.8081
11 20 8.5 15 60 90 X2X3 5814.06 1 5814.06 227.46 <
12 35 20.5 25 20 90 0.0001
13 20 12.5 20 60 85 X2X4 39.06 1 39.06 1.53 0.2354
14 20 12.5 15 60 100 X3X4 1.56 1 1.56 0.061 0.8081
15 20 12.5 10 60 90 X21 121.15 1 121.15 4.74 0.0459
16 5 20.5 5 20 60 X22 47.99 1 47.99 1.88 0.1908
17 12.5 12.5 15 60 95 X23 121.15 1 121.15 4.74 0.0459
18 20 12.5 15 60 95 X24 28.21 1 28.21 1.10 0.3101
19 35 4.5 5 100 0 Residual 383.41 15 25.56
20 20 12.5 15 60 100 Lack of 345.91 10 34.59 4.61 0.0527
21 20 12.5 15 60 95 fit
22 20 12.5 15 60 100 Pure 37.50 5 7.50
23 20 12.5 15 80 95 error
24 5 20.5 25 20 70 Cor total 43134.17 29
25 20 16.5 15 60 90
26 5 20.5 25 100 65
27 35 4.5 25 20 0
28 5 4.5 5 20 65 ∑
k ∑
k k− 1 ∑
∑ k

29 35 20.5 25 100 90 Y = β0 + βi χ i + βii χ i χ i + βij χ i χ j + εij , (1)


30 5 4.5 25 20 5 i=1 i=1 i=1 j=j+1

where Y is the response; β0 , βi , βii , and βij are the regression coefficients
develop, improve, and optimize the process (Bas & Boyaci, 2007). for the intercept and the linear, quadratic, and interaction coefficients,
Moreover, RSM determines how independent variables affect the pro­ respectively; χ i and χ j are the independent variables; and k is the number
cess and generates a mathematical model that accurately describes the of factors.
process (Wang, Wang, Liu, & Huang, 2016). RSM can be helpful in The data were statistically analyzed by using Design Expert 8.06
quantitatively and routinely adjusting parameters that affect QR code (Stat-Ease, Inc., Minneapolis, Minnesota) and the reading parameters
readability. Box-Behnken design and central composite design are two were optimized. The significant effects of independent variables on each
primary design modules used in RSM. The three types of central com­ response were determined by using an analysis of variance (ANOVA).
posite design used in RSM include central composite circumscribed The multiple linear regression analysis of the experimental data yields
design, central composite inscribed (CCI) design, and central composite second-order polynomial models for predicting QR code readability.
face-centered design.
Generally, RSM is a three-step process. The first step determines an 3. Results
approximate range that includes the optimal conditions needed. The
second step establishes the relationship model between a set of inde­ 3.1. Readability modeling
pendent factors and the system response. The third step optimizes the
process by using the established model. The choice of design depends on Experiments were done according to the design matrix presented in
the properties required (or desired). Some of the design properties Table 3. The statistical test factor (F-value) served to evaluate the sig­
considered are orthogonality, rotatability, and uniform precision (Khuri nificance of the model at a 95 % confidence level. The quadratic-model
& Mukhopadhyay, 2010). results from the ANOVA are presented in Table 4. The sum of squares is
42 750.76 and there are 14 degrees of freedom. The F-value, 119.47, and
2.4.2. Experimental design a P-value less than 0.0001 indicates that the model results are signifi­
The preliminary trial results were used to develop a CCI design for cant. The lack-of-fit F-value of 0.0527, which exceeds 0.05, indicates
four numerical factors (reading distance, ball diameter, code size, and that the lack of fit is not significant relative to the pure error present in
coded characters) at five levels. Six repetitions at the center point, the system. The nonsignificant lack of fit indicates that the model pro­
sixteen at the cubic point, and eight at the axial point are used in this duces a good fit to the results. Upon applying a regression to test data,
study and are necessary criteria for CCI design. We use α = 0.5 in this the quadratic model in terms of coded factors can be expressed as
study, and the factors and their levels are presented in Table 2. Y = +95.69–11.67X1+19.09X2+1.97X3− 1.06X4+6.56X1X2+16.56X
2
1X3− 0.31X1X4+19.06X2X3− 1.56X2X4− 0.31X3X4− 26.98X1− 16.98X2
2.4.3. Data analysis 2
− 26.98X23+13.02X24. (2)
Every experimental point was repeated 20 times, and the average QR The coefficient of determination R2 describes the relationship be­
code readability served as response value. The CCI experimental results tween the data: a high R2 indicates that the predicted model produces a
were fit with a second-order polynomial by using a multiple regression. good fit. The R2 for this model is calculated to be 0.9595; thus, this
The quadratic model for predicting the optimal point is model produces a good fit to the data.

4
J. Qian et al. Food Packaging and Shelf Life 28 (2021) 100638

Fig. 3. Relationships between significant single factors and QR code readability.a. Response surface obtained for interactions between reading distance, code
size, and QR code readability (ball diameter:12.5 cm, coded characters: 60 bytes). b. Contour figure obtained for interactions between reading distance, code size,
and QR code readability (ball diameter:12.5 cm, coded characters: 60 bytes). d. Contour figure obtained for interactions between ball diameter, code size, and QR
code readability (reading distance: 20 cm, coded characters: 60 bytes). c. Response surface obtained for interactions between ball diameter, code size, and QR code
readability (reading distance: 20 cm, coded characters: 60 bytes).

3.2. Single-factor analysis Fig. 4a shows the strong interaction between reading distance and
code size. The variation of QR code readability with reading distance
Table 4 and Eq. (2) show that the effects of the different factors may initially increases and then decreases when one-factor analysis is used.
be ranked as follows: ball diameter > reading distance > code size > As code size increases, the QR code readability first increases and then
coded characters. Thus, ball diameter and reading distance most decreases. The relationship between code size and reading distance is
significantly affect the response of the system. Fig. 3 shows diagrams of further analyzed in Fig. 4b, which shows several contours with read­
the relationship between the primary single factors and QR code read­ ability values of 20 %, 40 %, 60 %, 80 %, 90 %, and 95 %. At a 95 %
ability while holding other factors constant at median values. readability, 60 optimized combinations of reading distance and code
Fig. 3a shows the relationship between reading distance and QR code size are possible when the ball diameter is 12.5 cm and 60 bytes of coded
readability for a ball diameter of 12.5 cm, a code size of 15 mm, and 60 characters are used. For these combinations, the reading distance ranges
bytes of coded characters. The results indicate that QR code readability from 12.34 to 20.87 cm, and the code size ranges from 11.83 to 17.52
increases as reading distance increases from 5 to 16.5 cm. However, mm.
further increases in reading distance leads to a strong decline in QR code Fig. 4c shows the strong interaction between ball diameter and code
readability, demonstrating that distances that are too small or too large size. As the ball diameter and code size increases, QR code readability
are not suitable for reading QR codes. declines slightly after a smooth increase. Fig. 4d further analyzes the
Fig. 3b shows the relationship between ball diameter and QR code relationship between ball diameter and code size by showing several
readability by holding other factors constant at their median values: QR contours with readability values of 20 %, 40 %, 60 %, 80 %, 90 %, and
code readability increases as ball diameter increases. For a ball diameter 95 %. At a 95 % readability, 75 optimized combinations of ball diameter
of 15 cm, the readability is nearly 100 %. When the ball diameter ex­ and code size are possible when the reading distance is 20 cm and 60
ceeds 15 cm, the readability is slightly less. When the ball diameter is bytes of coded characters are used. For these combinations, the ball
maximal, 20.5 cm, the QR code readability exceeds 97 %. In this study, diameter ranges from 12.21 to 20.24 cm, and the code size ranges from
balls with larger diameters produce better readability than those with 11.88 to 23.90 mm.
smaller diameters.

3.4. Results of simulation of optimized readability parameters


3.3. Analysis of interaction effects
To test the readability model, actual fruits, apples, and melons were
Table 4 shows a very significant interaction between reading dis­ selected for optimization. After considering most of the fruits involved in
tance and code size, which is important for QR code readability. Table 4 customer operations, the reading distance range used for the mobile
also shows a significant interaction between ball diameter and code size phones in this study was set to 15–25 cm. For the best customer expe­
with regard to QR code readability. The relationship between the pri­ rience, the median reading distance was set to 20 cm. The fruits used in
mary factors and response is visualized with plots produced by using the this study were chosen according to survey results from a large fruit
model graph tool of Design Expert software. The results are presented in company and included 10 Fuji apples and 10 melons that were selected
Fig. 4. at random. The diameters of the apples ranged from 7.8 to 8.5 cm, and

5
J. Qian et al. Food Packaging and Shelf Life 28 (2021) 100638

Fig. 4. Factors involved in interaction effects.

the diameters of the melons ranged from 14.2–16.9 cm. A code size chosen coded characters ranged from 20–100 for the optimization plan
between 5 and 10 mm was determined to be suitable for apples, and a designed for these two fruits. The reading parameters for reading dis­
code size of less than 20 mm was determined to be suitable for the tance, fruit diameter, code size, and coded characters are set as given in
packaged melons. These sizes were considered pleasing to the eye and Table 5.
could be used for easy operation of the QR code scanning system. The Maximization of QR readability is a subordinate goal of this study. To
QR code used in this study was used to encode the following traceability achieve this goal, 11 optimization simulation solutions for apples and
information (62 bytes): 20 bytes of traceability code, 20 bytes of en­ 100 optimization simulation solutions for melons were obtained by
terprise code, 6 bytes of harvesting date code, 10 bytes of authentication using the model calculation function in Design Expert (version 10.04).
type code and 6 bytes of verification result code. The top 27 optimization solutions obtained for the melons, which
Two issues should be discussed with regard to the enterprise exhibit a readability greater than 99 %, and all the optimization solu­
requirement. The maximum amount of information was contained in the tions obtained for the apples are listed in Table 6. For the apple simu­
QR codes to provide the maximum amount of information to customers. lation results, the readability of the top five solutions exceeds 90 %.
However, to further improve readability, all encoded data can be Upon comparison of Nos. 1 and 2, No. 2 was selected as a solution
reduced, except for the 20 bytes of traceability code, because the in­ because of its small readability difference and larger capacity for coded
formation can be stored in a searchable database that is accessed upon characters. For Nos. 3–5, the code size and coded characters show little
scanning the traceability code. Therefore, in this study, the bytes of the difference upon comparison with those of Nos. 1 and 2. Therefore, the

6
J. Qian et al. Food Packaging and Shelf Life 28 (2021) 100638

Table 5
Reading parameters used in the optimization plan for apples and melons.
Fruit diameter (cm) Code size (mm) Coded characters
Fruits Reading distance (cm) (bytes)

Minimum Maximum Minimum Maximum Minimum Maximum

Apple 20 7.8 8.5 5 10 20 100


Melon 20 14.2 16.9 5 20 20 100

solutions show a readability of 99 %. Except for the fixed reading dis­


Table 6
tance, the other reading parameters are varied. Considering the high
QR readability optimization simulation solutions for apples and melons. readability and the various parameters tested, the average code size and
coded character values are calculated to determine the testing condi­
Fruit No. Reading Fruit Code Coded Readability
distance diameter size characters
tions for actual readability experiments.
(cm) (cm) (mm) (bytes)
3.5. Analysis of readability results
1 20 8.50 10.00 20.00 92.08
2 20 8.50 10.00 100.00 91.83
3 20 8.50 10.00 20.48 91.77 Based on the optimization conditions, five tests for every fruit and
4 20 8.50 9.68 100.00 91.18 every solution were performed. In total, 50 tests were conducted for 10
5 20 8.50 9.18 20.00 90.27 fruits using one solution. To fit the requirements of a larger number of
Apple 6 20 8.50 10.00 96.60 89.72
7 20 8.50 8.88 20.00 89.52
customers, both Android OS and iOS mobile phones were used to read
8 20 7.96 9.55 20.00 89.23 the QR codes. The test results with different mobile phone platforms are
9 20 8.50 8.72 100.00 88.93 presented in Table 7. The average QR code readability values using the
10 20 8.50 10.00 58.03 78.97 Android platform with apples are 89.5 % for No. 1 and 84.0 % for No. 2.
11 20 8.50 10.00 59.77 78.94
Using the iOS platform, No. 1 exhibits the same readability value as that
1 20 16.18 19.64 64.09 100.00
2 20 15.02 15.02 62.49 99.99 obtained by using the Android platform and No. 2 exhibits a slightly
3 20 16.04 19.91 54.25 99.97 higher readability value than that obtained by using the Android plat­
4 20 16.23 19.75 60.06 99.96 form. Upon comparison with the simulation readability results, the
5 20 15.57 12.21 39.88 99.90 actual readability is less for both the Android and iOS platforms. The
6 20 16.39 12.41 41.39 99.87
7 20 15.39 11.75 87.75 99.85
lower actual values is most likely caused by the use of a ball diameter of
8 20 14.95 18.69 72.06 99.84 8.50 cm in the simulation versus a diameter of 7.8–8.5 cm for the actual
9 20 14.34 13.73 47.04 99.75 testing. According to the melon-testing results, the difference between
10 20 16.11 19.82 65.87 99.67 the simulation and actual readability is small.
11 20 16.66 12.46 42.11 99.66
The analysis of the readability comparison results shows that,
12 20 14.55 17.16 61.75 99.65
13 20 15.70 13.44 74.72 99.61 although the actual readability is less than the simulated readability, the
Melon 14 20 14.93 14.61 64.67 99.58 difference is not significantly larger for apples. Furthermore, melons
15 20 16.38 13.94 59.05 99.52 exhibit high readability during actual testing. Therefore, the optimiza­
16 20 16.33 13.27 49.80 99.51 tion method using RSM is considered an efficient and reliable method for
17 20 16.03 13.49 73.31 99.50
18 20 15.03 18.76 57.45 99.38
optimizing QR code readability.
19 20 14.26 14.45 52.61 99.35
20 20 16.54 11.79 38.13 99.35 4. Discussion
21 20 15.73 19.67 59.63 99.27
22 20 15.97 19.96 60.44 99.20
4.1. Applications
23 20 14.42 12.38 41.43 99.16
24 20 14.64 14.42 58.95 99.13
25 20 14.41 14.56 56.92 99.13 The results support the tracing of curved-surface agro-food. Specif­
26 20 14.91 11.08 34.16 99.07 ically, the optimized barcode-scanning results reveal a significant
27 20 16.09 13.74 62.28 99.03 improvement in readability. With nonoptimized parameters, the read­
ability success rate is not high, which degrades the tracing experience
for customers, and customer experience plays a vital role in the success
differences in the reading parameters were ignored due to inconve­ of applications of tracing systems. Therefore, the application of the
nience and insignificance. Solutions 1 and 2, which contain different present results should help to extend tracing systems by enhancing
coded characters for apples, were selected for actual readability exper­ customer experience.
imental testing. The optimization method and procedure used herein can also be
QR code readability rate for melons exceeds that for apples: 27 applied in the other areas. For example, Qian, Du, Zhang, Fan, and Yang
(2017) used the RSM to obtain the optimal reading parameters for

Table 7
Test results from mobile phones with different platforms.
Actual test readability (%)
Fruit Solution number Code size (mm) Coded characters (bytes) Simulation readability (%)
Android platform iOS platform

1 10 20 92.08 89.5 89.5


Apple
2 10 100 91.83 84.0 84.5
Melon Average value 13 58 97.89 95.5 96.5

7
J. Qian et al. Food Packaging and Shelf Life 28 (2021) 100638

continuous chain traceability in non-static situations (i.e., systems in Declaration of Competing Interest
motion). The results show that reading distance, belt speed, and the
interaction between reading distance and code size significantly affect The authors declare that they have no known competing financial
QR code readability. interests or personal relationships that could have appeared to influence
the work reported in this paper.

4.2. Comparison with existing research Acknowledgments

Two-dimensional barcodes are widely used for food tracing, and 2D The authors would like to thank the referees for their suggestions,
barcodes attached to regular surfaces are highly readable. However, which improved the content and presentation of this paper. This work
reading 2D codes attached to curved surfaces is challenging in terms of was funded by the National Natural Science Foundation of China
efficiency. Research is limited on how to optimize the readability of 2D (31971808) and the “Science and technology innovation project” of the
barcodes on curved surfaces. Fröschle, Gonzales-Barron, McDonnell, Chinese Academy of Agriculture Sciences(2060302-05-962-3).
and Ward (2009) used the irregular surface of chicken beaks and legs to
investigate the use of e-tracking and tracing of poultry using linear and References
data matrix barcodes. Their experiment estimated the readability of
barcodes imprinted on chicken beaks and legs, which was intended to Bas, D., & Boyaci, I. H. (2007). Modeling and optimization I: Usability of response surface
methodology. Journal of Food Engineering, 78, 836–845.
serve as a basis for sample-size calculation for an ongoing live trial. Bernard, A., Broeckaert, F., Poorter, G. D., Cock, A. D., Hermans, C., Saegerman, C., et al.
The QR code is more popular for tracing than the data matrix bar­ (2002). The Belgian PCB/dioxin incident: Analysis of the food chain contamination
code. Tarjan et al. (2014) analyzed the readability of QR codes with and health risk evaluation. Environmental Research, 88(1), 1–18.
Bertolini, M., Bevilacqua, M., & Massini, R. (2006). FMECA approach to product
variable content, size, and data-error-correction levels using Android
traceability in the food industry. Food Control, 17(2), 0–145.
smartphones. The results show that QR code readability is not directly Boys, K. A., & Fraser, A. M. (2018). Linking small fruit and vegetable farmers and
affected by the number of coded characters or by the error-correction institutional foodservice operations: Marketing challenges and considerations.
Renewable Agriculture and Food Systems, 1–13.
level. However, QR code readability is affected by the size of the mod­
Fan, B., Qian, J., Wu, X., Du, X., Li, W., Ji, Z., et al. (2019). Improving continuous
ules comprising the code. Based on single-factor analyzes of readability traceability of food stuff by using barcode-RFID bidirectional transformation
tests by Tarjan et al. (2014), we propose herein an optimization method equipment: Two field experiments. Food Control, 98, 449–456.
using the RSM. The present results show that the interactions between Fröschle, H.-K., Gonzales-Barron, U., McDonnell, K., & Ward, S. (2009). Investigation of
the potential use of e-tracking and tracing of poultry using linear and 2D barcodes.
reading distance and code size and between ball diameter and code size Computers and Electronics in Agriculture, 11, 126–132.
significantly affect QR code readability. Ghaani, M., Cozzolino, C. A., Castelli, G., & Farris, S. (2016). An overview of the
intelligent packaging technologies in the food sector. Trends in Food Science &
Technology, 51, 1–11.
International Organization for Standardization. (2006). Information technology –
4.3. Future research Automatic identification and data capture techniques – QR Code 2005 bar code
symbology specification. ISO/IEC18004:2006.
International Organization for Standardization. (2007). Traceability in the feed and food
The aim of this study was to optimize reading parameters for curved
chain: General principles and basic requirements for system design and implementation.
surfaces. Although the RSM is an effective method for obtaining optimal ISO 22005:2007.
values, it has several limitations that must be considered in any future Jedermann, R., Praeger, U., & Lang, W. (2017). Challenges and opportunities in remote
research: monitoring of perishable products. Food Packaging and Shelf Life, 14, 18–25.
Jiao, S., Zou, W., & Li, X. (2017). QR code based nose-free optical encryption and
(1) Irregular shapes are common in agro-food and other types of decryption of a gray scale image. Optics Communications, 387, 235–240.
food. The present study considered only curved or nearly curved shapes. Jin, S., & Zhou, L. (2014). Consumer interest in information provided by food traceability
The readability of QR codes attached to products with various shapes for systems in Japan. Food Quality and Preference, 36, 144–152.
Khuri, A. I., & Mukhopadhyay, S. (2010). Response surface methodology. WIREs
different conditions therefore requires further in-depth study. Computational Statistics, 2, 128–149.
(2) Artificial neural networks are mathematical models used to Kim, Y. G., & Woo, E. (2016). Consumer acceptance of a quick response (QR) code for the
predict a result based on input data that do not exhibit a clear rela­ food traceability system: Application of an extended technology acceptance model
(TAM). Food Research International, 85, 266–272.
tionship. In future work, RSM and ANNs should be combined to better Li, M., Qian, J. P., Yang, X. T., Sun, C. H., & Ji, Z. T. (2010). A PDA-based record-keeping
optimize QR code readability. and decision-support system for traceability in cucumber production. Computers and
Electronics in Agriculture, 70(1), 69–77.
Lien, C. H., & Cao, Y. (2014). Examining WeChat users’ motivations, trust, attitudes, and
5. Conclusions positive word-of-mouth: Evidence from China. Computers in Human Behavior, 41,
104–111.
Improving readability QR code fixed to irregular surfaces poses a Olsen, P., & Borit, M. (2018). The components of a food traceability system. Trends in
Food Science & Technology, 77, 143–149.
significant challenge, especially when using mobile phones for scanning Qian, J. P., Du, X. W., Zhang, B. Y., Fan, B. L., & Yang, X. T. (2017). Optimization of QR
QR codes. We therefore use a RSM analysis to develop an optimization code readability in movement state using response surface methodology for
method for products with curved surfaces. The primary factors that implementing continuous chain traceability. Food Control, 139, 56–64.
Qian, J. P., Xing, B., Wu, X. M., Chen, M. X., & Wang, Y. A. (2018). A smartphone-based
significantly affect QR code readability include reading distance, ball apple yield estimation application using imaging features and the ANN method in
diameter, the interaction between reading distance and code size, and mature period. Scientia Agricola, 75(4), 273–280.
the interaction between ball diameter and code size. We investigate the Qian, J. P., Yang, X. T., Wu, X. M., Zhao, L., Fan, B. L., & Xing, B. (2012). A traceability
system incorporating 2D barcode and RFID technology for wheat flour mills.
code readability through experimentation with apples and melons and Computers and Electronics in Agriculture, 89(3), 76–85.
through simulations. The simulation results indicate that, for apples, a Ramesh, T., Nayak, B., Amirbahman, A., Tripp, C. P., & Mukhopadhyay, S. (2016).
reading distance of 20 cm, a diameter of 7.8–8.5 mm, a code size of 10 Application of ultraviolet light assisted titanium dioxide photocatalysis for food
safety: A review. Innovative Food Science & Emerging Technologies, 38, 105–115.
mm, and 20–100 bytes of coded characters produce optimal results with Ruiz-Garcia, L., & Lunadei, L. (2011). The role of RFID in agriculture: Applications,
high readability. For melons, the simulation results indicate a high limitations and challenges. Computers and Electronics in Agriculture, 79(1), 42–50.
readability rate with the maximum of 100 % and minimum of 99.03 %, Schumann, B., & Schmid, B. (2018). Packaging concepts for fresh and processed meat –
Recent progresses. Innovative Food Science & Emerging Technologies, 47, 88–100.
which is greater than 99 % for 27 solutions. A comparison of different
So-In, C., Poolsanguan, S., & Rujirakul, K. (2014). A hybrid mobile environmental and
fruits and mobile phone platforms using the optimal parameters shows population density management system for smart poultry farms. Computers and
that the simulated readability is similar to the actual readability. These Electronics in Agriculture, 109, 287–301.
results should also help to extend the applicability of tracing systems by
enhancing customer experience.

8
J. Qian et al. Food Packaging and Shelf Life 28 (2021) 100638

Steinberger, G., Rothmund, M., & Auernhammer, H. (2009). Mobile farm equipment as a Wales, C., Harvey, M., & Warde, A. (2006). Recuperating from BSE: The shifting UK
data source in an agricultural service architecture. Computers and Electronics in institutional basis for trust in food. Appetite, 47(2), 187–195.
Agriculture, 65, 238–246. Wang, C., Wang, H., Liu, Y., & Huang, L. (2016). Optimization of surface treatment for
Tarjan, L., Senk, I., Tegeltija, S., Stankovski, S., & Ostojic, G. (2014). A readability flotation separation of polyvinyl chloride and polyethylene terephthalate waste
analysis for QR code application in a traceability system. Computers and Electronics in plastics using response surface methodology. Journal of Cleaner Production, 139(15),
Agriculture, 109, 1–11. 866–872.
Tseng, C. L., Jiang, J. A., Lee, R. G., Lu, F. M., Ouyang, C. S., Chen, Y. S., et al. (2006).
Feasibility study on application of GSM–SMS technology to field data acquisition.
Computers and Electronics in Agriculture, 53(1), 45–59.

You might also like