*2.3. Equipment Used for Experiments*

The HIS-VSNIR scanning hyperspectral measurement system (Shanghai Wuling Optoelectronic Technology Co., Ltd.) was used in the experiment. The system is composed of a near-infrared camera (NIR, 871.6–1766.3 nm), ImpectorN17E spectrometer, OLES30 lens, DC adjustable light source, glass fiber symmetrical line light source, stage, self-propelled displacement stage, stepping motor controller, computer, and display. The structure of this hyperspectral imaging system is illustrated in Figure 3.

**Figure 3.** Structure of hyperspectral imaging system. (1) Light box, (2) near-infrared camera, (3) lens, (4) light conduction device, (5) sample, (6) load bearing platform, (7) industrial control machine, (8) displacement control box, (9) light source.

Conducting pre-sampling tests on tomato leaves is required prior to NIR hyperspectral data acquisition. In order to ensure good clarity and no distortion of the imaging data, the initial exposure scanning time of the hyperspectral imaging system was set to 15 ms, the scanning speed was set to 1.32 mm/s, and the maximum peak reflection imaging intensity of the leaf pre-sampled image data was set to 3000. The dark current generated in the measured sample was required to be calibrated in a black-and-white field in advance, and the reflection intensity range was set to 0–4096. In the sample test, the sample was placed on a full black background separately, and the whole image acquisition and test process was completed in a dark room. The original hyperspectral imaging of the sample was corrected in black and white. The correction formula is as follows:

$$R = \frac{R\_r - R\_d}{R\_w - R\_d} \tag{1}$$

where *R* is the corrected sample image; *Rr* is the original image of the sample; *Rd* is the dark field fixed image; and *Rw* is the standard whiteboard calibration image.

In this experiment, the TS7400 THz time-domain spectral measurement system (Advantest Corporation of Japan) was used to collect the THz information of samples, which was specially customized for the detection of agricultural biological information. A structure introduction diagram of the THz time-domain spectrum measurement system is shown in Figure 4.

The measurement range of the TS7400 THz time-domain spectral measurement system was 0.1–4.0 THz and the frequency sampling interval selected for testing was 0.0038 THz, which can be used to detect 225 cm<sup>2</sup> samples. This meets the detection requirements of tomato leaves. In order to improve the accuracy of the acquired data and reduce the effect of moisture on the THz time-domain spectrum, before scanning the tomato samples, the tomato leaves were first freeze-dried using a vacuum freeze-dryer set to −65◦C and then left for 36 h to reduce their moisture content to less than 3%. Additionally, the THz timedomain spectral scanning cabinet was filled with nitrogen to keep the maximum relative humidity below 5%.

**Figure 4.** Composition of the measuring system. (1) THz transmitter, (2) optical fiber, (3) operation/analysis computer, (4) ethernet, (5) low-temperature thermostat transmission module, (6) analysis unit, (7) measuring unit, (8) sample stage, (9) THz detector, (10) movable support.

In order to obtain the best response information for tomato leaf mildew samples, this study used the power spectrum and absorbance information for sample analysis. 'Power spectrum' is an abbreviation for the power spectrum density function, which is defined as the signal power within the unit frequency band. It represents the variation of the signal power with frequency, i.e., the distribution of the signal power in the frequency domain. Absorbance is used to express the degree of light absorption by substances. Samples of different grades of tomato leaf mildew have different absorbances.
