1. Introduction
The grain number of wheat spikes is counted by breeders, farmers, and agronomists before wheat harvesting in order to predict crop yield and analyze the phenotype [
1]. Crop yield can be obtained quickly and correctly according to the grain number of wheat spikes, the wheat spike number in a unit area, and the 1000-grain weight. Counting the grain number of wheat spikes is one of the most important and difficult steps for obtaining the theoretical wheat crop yield. The grain number of wheat spikes is obtained manually, and then crop yield is calculated from the counted grain number. Counting the grain number of wheat spikes manually is exhaustive and time-consuming, and is particularly unable to avoid definite errors. Limitations of the manual counting method are many; for example, results acquired from different operators may vary subjectively. It is necessary to develop a method or equipment that can quickly and correctly count the grain number of wheat spikes.
There have been a number of reports on the development of digital image processing technologies for phenotyping wheat grain traits. With the aid of this technology, classification of a wheat variety and its source growing region can be made with reference to the characteristic parameters of wheat grain morphology [
2,
3]; color [
2,
4,
5]; texture [
6]; and combined morphology, color, and texture [
7]. However, the overall reports on phenotyping the characteristic parameters of wheat spikes using digital image processing technology are few and limited in precision. Image processing tools have been applied to phenotype the wheat spike awn number [
8,
9], the average awn length [
8,
9], spike shape and morphometric characteristics [
8,
10], and spike length [
8,
9,
11]. Wheat spike length and spikelet number were measured synchronously from spike profile images, and the zero-error rate for detecting the spikelet number was only 16.0% [
12]. Du Shiwei et al. [
13] counted the spikelet number and grain number with the spikelet method by separating each spikelet from front-view images of wheat spikes. The zero-error rate for the counted spikelet number was 68.16%, the mean absolute error was 0.46, and the mean relative error was 2.99%. The grain number of wheat spikes was also measured from the total grain number of spikelets; the mean absolute error for the total grain number of spikelets was 2.11 and the mean relative error was 5.62%. In another alternative of image processing, Gong and Ji [
14] established the relationship between the weight of wheat spikes and the image texture features of wheat spikes.
Many studies focusing on counting the number of unit-area wheat spikes in the field have been based on traditional digital image processing methods, such as color–texture image analysis [
15]; color features, texture features, and a corner detection algorithm [
16]; the Laplacian frequency filter, median filter, and finding maxima to segment local peaks [
17]; and convolutional neural networks [
18,
19]. A neural network-based method with Laws’ texture energy was used to detect wheat spikes, achieving an identification accuracy higher than 80%. The final grain yield per spike was found to be highly correlated with the spike area, and the correlation R
2 between the average grain yield per spike and the spike area was 0.7889 [
20].
Studies on counting the grain number of wheat spikes and predicting crop yield by recognizing the characteristic parameters of wheat spike images are even more scarce. The architecture of wheat spikes is composed of many spikelets distributed alternately on both sides of the spike axis, with each spikelet composed of a few grains. X-ray computed tomography was used for imaging the 3D architecture of wheat spikes to determine the number of grains. The grain number per spike was significantly correlated with the manual counting method (r
2 = 0.989) [
21]. A deep learning method was also applied to count the number of spike grains using only one-sided and two-sided images of wheat spikes, and the counting precision for the two-sided images of wheat spikes was higher than that for the one-sided images of wheat spikes [
22]. The determination coefficients R
2 between the predicted spike grain number and the true spike grain number for images of five different varieties of wheat using the one-sided and two-sided image methods were 0.81 and 0.91, respectively. The accuracy of counting the grain number of wheat spikes failed to fully satisfy practical requirements [
20,
22]. In comparison, the accuracy for counting the grain number of wheat spikes using X-ray computed tomography was better, yet the account imaging 3D architecture of wheat spikes was complex and time-consuming [
21].
Breeders, farmers, and agronomists believe that the morphology of wheat spikes can reflect the grain number of wheat spikes, and the morphology of wheat spikes is represented by the characteristic parameters of the wheat spikes.
The characteristic parameters of wheat spikes were acquired in this paper by processing front-view images of wheat spikes. In order to provide a theoretical basis for quickly and non-destructively predicting crop yield and obtaining the wheat phenotype, the relationships between the characteristic parameters acquired from the wheat spike images—the spike area and length of the spike axis—and the grain number of wheat spikes were established.
3. Results and Discussion
3.1. Establishing Mathematical Model
Scatter plots of the relationships between the image area of wheat spike and the grain number of wheat spike for each variety and all varieties are illustrated in
Figure 3. The image area increased linearly, and in a perfect manner, with respect to the grain number. It thus indicates that by using the image processing tool proposed in this paper, a linear relationship between the image area and grain number of wheat spikes could be found, which allows a precise prediction of wheat grain number from digital images.
The results of the regression analysis and the curve fittings using linear equations between the image area and the grain number of the wheat spikes are also shown in
Figure 3. The determination coefficients R
2 between the image area and grain number of the wheat spikes for the three varieties were 0.844, 0.9151, and 0.9336, respectively, showing apparent linear relationships between the area image and grain number of the wheat spikes. The regressive linear mathematical models were Y = 0.0014X − 0.6356, Y = 0.0015X − 4.2873, and Y = 0.0014X − 3.6968, respectively, for the three wheat varieties.
The determination coefficient R2 for all wheat spike varieties between the image area and grain number was 0.8571. The linear mathematical model was the regressive fitting line equation Y = 0.0013X − 1.5499.
Scatter plots of the length of the spike axis and the grain number of the wheat spike for each variety and all varieties are shown in
Figure 4. The length of the spike axis was also found to linearly increase with the increase in the grain number. It therefore indicates that the proposed image processing method facilitates a linear relationship between the length of the spike axis and the grain number, which is an aid for phenotyping purpose.
The regressively fitted linear equations and the determination coefficients between the spike axis length and wheat spike grain number are illustrated in
Figure 4. The determination coefficients R
2 between the spike axis length and wheat spike grain number were 0.7832, 0.8925, and 0.9023, respectively, for the three wheat varieties, indicating a significant linear relationship between the length of the spike axis and the grain number of the wheat spike. The linear mathematical models for the three wheat varieties were Y = 0.1259X − 12.943, Y = 0.1436X − 22.616, and Y = 0.1265X − 22.706, respectively.
The determination coefficient R2 of regression between the length of the spike axis and the grain number of the wheat spike for the all wheat varieties was 0.7495, and the resulting mathematical model was Y = 0.1039X − 6.5114.
The determination coefficient R2 between the wheat spike image area and grain number was larger than that between the length of the spike axis and the grain number of the wheat spike. The linear mathematical models between the image area and grain number of wheat spikes were superior to the linear mathematical models between the length of the spike axis and the grain number of wheat spikes.
3.2. Verifying the Mathematical Model
The linear mathematical models for each wheat spike variety between the image area and grain number and between the spike axis length and grain number were verified by using the remaining untreated 40 wheat spike samples from the same variety. All images of wheat spike samples for verifying the mathematical model were acquired and processed under the same conditions as the images of wheat spike samples for establishing the mathematical model.
For each variety, the grain number that was counted manually was used as the practical grain number, and the grain number that was calculated from the mathematical model after the wheat spike image was processed was used as the predicted grain number. The absolute error and relative error were used to determine the accuracy of the established mathematical model of the image area and the grain number of the wheat spike. Here, the mathematical models of the image area and grain number of the wheat spikes were used for the verification. The image area of the wheat spike (as x-value) was acquired and substituted into the previously established equations, and the result (as y-value) was calculated for the grain number of the wheat spike. The calculated y-value was the model predicted grain number. The correlative linear curve fitting and the equations between the practical grain number and the predicted grain number are shown in
Figure 5.
The determination coefficients R
2 between the practical grain number and predicted grain number of the three wheat varieties were 0.8632, 0.8824, and 0.9552, respectively (
Figure 5). This means that the established image-based mathematical model of the image area and grain number of wheat spikes predicted the grain number correctly.
Table 1 shows the average absolute error and average relative error for the mathematical model of the image area and grain number of wheat spikes. The average absolute error value of Yangmai 13 was the lowest at 2.3 grains, and the average absolute error value of Ningmai 16 was the highest at 2.6 grains. The average relative error value of Ningmai 13 was the lowest at 5.65%, and the average relative error value of Ningmai 16 was the highest, reaching 6.66%.
The mathematical model of wheat spike grain number versus image area was verified for all wheat varieties by using the same 120 wheat spike samples. The determination coefficient R
2 between the practical grain number and the predicted grain number was 0.8626 (
Figure 5). The average absolute error and average relative error for the mathematical model of the wheat spike image area and grain number were 3.1 grains and 8.12%, respectively.
The established linear mathematical models of the length of the spike axis of the wheat spike image and the grain number of the wheat spike were verified using the same method mentioned above.
Figure 6 shows the correlative linear curve fitting and the equations between the practical grain number and predicted grain number.
The determination coefficients R
2 between the practical grain number and predicted grain number for the three wheat varieties were 0.8122, 0.8352, and 0.9369, respectively (
Figure 6). This means that the established mathematical model of the length of the spike axis and the grain number of wheat spikes accurately predicted the grain number by using digital image processing.
The average absolute error and average relative error for the mathematical models of the length of the spike axis and the grain number of the wheat spike are shown in
Table 1. The average absolute error value of Yangmai 13 was 2.4 grains, which was the minimum, and the average absolute error value of Ningmai 13 and 16 was 2.8 grains, which was the maximum. The average relative error value of Yangmai 13 was 6.04% (the minimum), and the average relative error value of Ningmai 16 was 7.11% (the maximum).
The mathematical model for all varieties of wheat spike between the length of the spike axis and the grain number of the wheat spike was again verified using the same 120 wheat spike samples. The determination coefficient R
2 between the practical grain number and predicted grain number was 0.7182 (
Figure 6). The average absolute error and average relative error for this mathematical model were 4.0 and 10.56%, respectively.
The average absolute error and average relative error for the mathematical model of the spike axis length and the grain number were larger than those for the model of the image area of wheat spike and the grain number. This indicates that the accuracy of the established mathematical model of the image area of wheat spike and grain number was superior to that of the model of the spike axis length and the wheat spike grain number.
3.3. Discussion
Wheat spikes contain a large number of spikelets, with one to five grains housed in each spikelet. The higher the grain number is, the larger the spikelet’s area is, so the wheat spike’s area can be used to determine the grain number. On the other hand, the higher the grain number is, the higher the spikelet number is and the larger the length of the spike axis is, so the length of the spike axis could also represent the grain number. The results from this study indicate that the grain number of a wheat spike is related to the characteristics parameters of the wheat spike.
The total grain number of wheat spikes can be calculated quickly, conveniently and simply through collecting a one-sided image of the wheat spike. The high accuracy of the predicted grain number thus satisfies the requirement of counting the grain number of wheat spikes for yield prediction and phenotyping.
Wheat yield is governed by the number of wheat spikes per square meter, the grain number of wheat spikes, and the 1000-grain weight. Among them, counting the grain number of wheat spikes is the most time-consuming and tedious work, and also the most important step in measuring the crop yield. A number of researchers have studied counting methods of wheat spike number according to area in square meters and the 1000-grain weight, but reports counting the grain number of wheat spikes are scarce. In one study, the grain weight of wheat spikes was measured by testing the texture feature of wheat spike images [
14], and in another, the grain weight of wheat spikes was also measured by the image area of wheat spikes [
17]. Yet these approaches provided low measuring accuracy and were thus unable to predict the grain number of wheat spikes, an important parameter for breeders and researchers in analyzing the wheat phenotype.
In a more recent report, the grain number was obtained by using a one-sided image of a wheat spike that was detected based on deep learning; the determination coefficient (R
2) of 0.81 between the predicted grain number and the true grain number was lower than the minimum determination coefficient (R
2) of 0.86 in this study [
22]. The grain number of wheat spikes was also obtained using X-ray computed tomography imaging, and the determination coefficient (R
2) between the virtual grain number per spike and the manually counted grain number per spike was 0.989 [
21]. However, X-ray computed tomography scanning of the wheat spikes and reconstruction of the 3D architecture of the wheat spikes took 10 min. The grain number of wheat spikes amounted to each grain number of spikelets, the absolute and relative errors of wheat spike grain numbers from Du et al.’s study were roughly equal with this study, though the complexity of the image processing methods and the counting method of wheat spike grain numbers has limited applicability [
13].
The accuracy of the established mathematical models of the image area and grain number of wheat spikes and of the spike axis length and grain number of wheat spikes for each variety was different. The accuracy for Yangmai 13 was the highest, and the accuracy for Ningmai 13 was the lowest. The accuracy of the verified mathematical model for each variety was the same as the accuracy of the established mathematical model. The accuracy of the established mathematical model of the image area and grain number of wheat spikes for all varieties was also superior to the accuracy of the established mathematical model of the spike axis length and grain number of wheat spikes for all varieties.