*2.2. Definition of Disease Severity (DS)*

The DS of wheat PM is defined as the percentage of the disease pustules portion relative to the total leaf area, which was recorded by visual assessment according to a protocol by Graeff et al. [30]. Because this method is subjective, the assessment was carried out by just one investigator to eliminate any bias due to individual differences. Apart from using DS to quantify the incidence of PM, the leaves are also classified into the categories of healthy leaves (DS less than 1%) and diseased leaves (DS more than 1%) for detection of wheat PM (Figure 1).

**Figure 1.** Images of wheat leaves with different DS.

### *2.3. Acquisition and Pre-Processing of Hyperspectral Images*

In this study, we used the GaiaField portable HI system, consisting of an imaging lens coupled with an imaging spectrometer (V10E; Specim, Oulu, Finland) and a CCD camera (C8484-05; Hamamatsu Photonics, Osaka, Japan) (Figure 2). The HI system also included two light sources of 150 W halogen lamps (Oriel Instruments, Stratford, CT, USA) angled at 45◦, a computer, a dark box, and a tripod. The spectral data were recorded in the VIS-NIR range of 400–1000 nm with a spectral resolution of 2.8 nm. The specification of each hyperspectral image was 1392 × 1040 (spatial dimensions) × 256 (spectral bands). The distance between the leaves and the camera was set as 300 mm and the exposure time was set as 0.13 s to obtain clear and non-deformable images. The data were processed and analyzed using the ENVI 5.2 (Exelis Visual Information Solutions, Boulder, CO, USA) and MATLAB R2014a (The MathWorks Inc., Natick, MA, USA) software packages.

**Figure 2.** Test scenario of the hyperspectral imaging system.

The HI preprocessing steps included reflectance conversion, noise removal, and reflectance extraction. Because of the dark current and physical configuration of the imaging

system, some bands with weaker light intensity contain excessive noise. Therefore, a raw hyperspectral image was calibrated to reduce the noise according to the following equation:

$$I\_{\mathbb{C}} = \frac{I\_{\Gamma} - I\_{d}}{I\_{w} - I\_{d}} \tag{1}$$

where *Ic* is the calibrated reflectance image, *Ir* is the raw hyperspectral image, *Id* is the dark current image, and *Iw* is the white reference image; *Id* is obtained by covering the camera lens with an opaque cap and turning off the light source, and *Iw* is acquired by imaging a polytetrafluoroethylene white panel with spectral reflectance of 99%.

After obtaining the calibrated spectral reflectance, to smooth and minimize the noise signals in the images, the noise of the hyperspectral image data was reduced by using the minimum noise fraction [31]. The average hyperspectral reflectance of the whole leaf was directly extracted from an image of a single leaf.
