Field experiment
The images of wheat grains were selected from an archive of a two-year field experiment conducted with the aim of studying the responses of cultivar mixtures with various ripening patterns to normal and post-anthesis water stress conditions (see [17]). The experiment was conducted during 2014-15 and 2015-16 growing seasons at the research field of the School of Agriculture, Shiraz University, Iran (29°73´ N latitude and 52°59´ E longitude at an altitude of 1,810 masl). Mixture treatments were 15 mixing ratios of four early- to middle-ripening wheat cultivars (Chamran, Sirvan, Pishtaz, and Shiraz, respectively) including the 4 monocultures and their every 11 possible mixtures, which were grown with 3 replicates under two well-irrigation and post-anthesis deficit-irrigation conditions. The experimental design was RCBD (Randomized Complete Block Design) in which all the 90 (2×2 meter) plots were arranged in a lattice configuration with 1 meter distances. Plant density was 450 plants/m2 and seeds were mixed in each year with equal ratios (i.e. 1:1, 1:1:1, and 1:1:1:1 for the 2-, 3-, and 4-component blends, respectively), considering their 1000-grain weights and germination percentages. The planting date in the first and second growing seasons were November 20 and November 5, respectively, and based on the soil test, 150 kg nitrogen/ha was applied (as urea) in three equal splits i.e. at planting, early tillering, and anthesis. No pesticide was used and weeding was done by hand once at stem elongation.
Irrigation interval was 10 days based on local practices, and the amount of irrigation water was estimated using the Fao-56 Penman-Monteith model with local corrected coefficients which was reduced to 50% of evapo-transpirational demand from the first irrigation after anthesis. Late in the season, plants were harvested from the center of plots and yield components were estimated using a laboratory thresher and weighing.
Imaging
Images were taken from the archive of an exclusively designed laboratory system (Visual Grain Analyzer, VGA), which was equipped with a Logitech HD Pro Webcam C920 mounted on an adjustable arm, a glass table with a 60×60 cm flicker-free white LED panel beneath it as the light source, and a professional software written in C# for real-time screening of the grains. Imaging was carried out for other purposes, so the properties were not necessarily designed for the present study. Accordingly, images were taken under ambient light from 40 cm above the samples, and the image dimensions were 960×720 pixels (i.e. the original resolution was ≈ 7 MP). For each experimental plot, more than 400 grains were sampled randomly and arranged on the imaging table using a Vacuum Seed Counter, so that there was no contact between the grains. Therefore, the total dataset (including 90 images for each year) was consisted of the data of more than 72000 single grains. Immediately after imaging, the grains of each image were weighed using a A&D EK-610i (d=0.01 g) weighing balance. Mean grain weights were calculated by dividing the sample weight by the number of grains.
Image processing
Since the VGA system has not been commercialized or released yet, and also the analyses had to be kept reproducible, only the data of grain size (for conversion of pixel to mm) was taken from this system, and all of the image analyses were carried out using ImageJ version. 2.1.0/1.53c [18]. First, the grains were segmented from the background using the Color thresholding tool (Image > Adjust > Color thresholding). The thresholding method and color space were set as “Default” and HSB, respectively. Thereafter, size and shape features of grains were calculated using the Analyze particles tool. For this purpose, the attended features were selected in the Set Measurements menu (Analyze > Set Measurement), and Analyze Particles was run. Before running, the “Show Ellipses” option was selected, and no size or circularity filtering was applied on the sample. The output tables were saved as .csv files and used for next analysis. As will be described later in the Results section, it was found out that enhancing the image resolution could improve the estimations. Therefore, in another analyses, before running the “Analyze Particles”, the resolution of images was enhanced using the Bicubic algorithm and by factor of 10 (i.e. both image dimensions were multiplied by 10, so the image resolution was increased 100 times). Resizing the images was carried out using the Batch processing tool (Process > Batch > Convert, and interpolation and scale factor were set to Bicubic & 10, respectively).
Using the output of image processing, the averaged values of basic features of size and shape were calculated for each image, and the correlation of these visual indices with MGW were evaluated. The examples of basic indices included area, perimeter, the major and minor axes of the best fitted ellipses to the grains (Major & Minor, also see [4]), minimum (MinFeret) and maximum (Feret) caliper diameter, Circularity (a value between 0 to 1 for an infinitely elongated shape to a perfect circle), solidity (the ratio of area to the convex hull area), etc. Besides the basic features, the correlation of MGW with several synthesized indices were also tested, which were the products or ratios of the basic indices. A1 and A2 were among the instances of synthesized indices which are the products of the 5 most efficient basic indices. The full list of the evaluated indices is represented in Table 1. Also for more detail of the definitions and formulae, see https://imagej.nih.gov/ij/docs/guide/146-30.html. Linear correlations of MGW with the visual indices were compared with those of the two control criteria i.e. and Kim index ( , taken from the paper of Kim et al. [16]), and the indices with a higher correlations than the controls were selected as the final indicators of MGW. Using each selected index, a linear model for prediction of MGW was developed and evaluated. Although the analyses were based on the number of pixels (as the unit of dimension), in order to generalize the model parameters, outputs were also converted into mm using the data of VGA system. Moreover, ten-fold cross-validation (K = 10) was used in Rapidminer (Version 9.9) to validate the results of datamining models, in which the default values and settings of the software were chosen. All other analyses, including correlating, Principal Component Analysis (PCA), and fitting the linear models were carried out using XLSTAT (Version 2016.02.28451, Addinsoft).