Automated Detection of Tetranychus urticae Koch in Citrus Leaves Based on Colour and VIS/NIR Hyperspectral Imaging

: Tetranychus urticae Koch is an important citrus pest that produces chlorotic spots on the leaves and scars on the fruit of affected trees. It is detected by visual inspection of the leaves. This work studies the potential of colour and hyperspectral imaging (400–1000 nm) under laboratory conditions as a fast and automatic method to detect the damage caused by this pest. The ability of a traditional vision system to differentiate this pest from others, such as Phyllocnistis citrella , and other leaf problems such as those caused by nutritional deﬁciencies, has been studied and compared with a more advanced hyperspectral system. To analyse the colour images, discriminant analysis has been used to classify the pixels as belonging to either a damaged or healthy leaves. In contrast, the hyperspectral images have been analysed using PLS DA. The rate of detection of the damage caused by T. urticae with colour images reached 92.5%, while leaves that did not present any damage were all correctly identiﬁed. Other problems such as damage by P. citrella were also correctly discriminated from T. urticae . Moreover, hyperspectral imaging allowed damage caused by T. urticae to be discriminated from healthy leaves and to distinguish between recent and mature leaves, which indicates whether it is a recent or an older infestation. Furthermore, good results were achieved in the discrimination between damage caused by T. urticae, P. citrella , and nutritional deﬁciencies.


Introduction
Spain is the world's sixth largest producer of citrus and the first exporter of fruit for the fresh market [1].Therefore, the external quality of fruits is a key factor in the purchase decision, and the pests that cause direct damage to these fruits are of crucial importance [2,3].Among pests, mites are one of the major problems of citrus, including the citrus rust mite and the citrus red mite.Tetranychus urticae Koch (Acari: Tetranychidae), also called the two-spotted spider mite, is one of the economically most important pests in a wide range of outdoor and protected crops worldwide [4].In Spain, T. urticae is a key pest of citrus [5][6][7] and affects especially clementine mandarin trees [8][9][10] because they are susceptible to outbreaks of this mite [11].
In summer, under Mediterranean conditions, T. urticae colonies are preferably located on the underside of the citrus leaves, where they are protected with silk threads.The mite feeds on the content of the epidermal and parenchyma cells of the leaves [12].As a result of their feeding, they cause discolouration and desiccation, which in most cases is manifested by chlorotic (yellowish and rarely brown) spots and bulges on the upper side of the leaves [13].Two-spotted spider mite damage also produces webbing and fine stippling.However, where it is most damaging is on the fruit because it causes rusty spots that spread throughout the fruit [6].These injuries result in significant reductions in the quality of clementine tangerines, which downgrades the fruit and severely lowers the fresh market prices [14,15].
Under the integrated pest management (IPM) strategy, producers assess the presence of this pest on a weekly or biweekly basis between July and September, depending on the incidence of the pest [10].This evaluation is carried out manually by placing two rings, 56 cm in diameter, in the crown of the tree and counting the number of rings with more than two symptomatic leaves (yellowish spots).This technique makes these evaluations an expensive, time-consuming, and labour-intensive task.
Remote sensing, specifically proximal sensing, can provide an effective alternative in pest monitoring [16,17].The use of proximal sensors has advantages over manual methods because it allows the vegetation conditions to be inferred in a suitable, faster, and more agile way, while it is also a non-invasive and non-destructive technique.Some studies have been carried out in other non-citrus crops for the detection of T. urticae using a spectrometer.Martin and Latheef [18] used a ground-based multispectral optical sensor as a remote sensing tool to evaluate foliar damage caused by this pest on greenhouse-grown cotton, and they distinguished various levels of infestation at the beginning of the season.Herrmann et al. [19] used multispectral images of pepper leaves in a greenhouse to calculate vegetation indices, which allowed the early detection of damage caused by this pest.In lab-based strawberry leaves, Fraulo et al. [20] employed diffuse reflectance spectroscopy in the visible and near-infrared portions of the spectrum to identify spectral regions altered by the presence of T. urticae.Crockett et al. [21] used spectroscopy and visible and near infrared (VNIR) imaging on the leaves of different strawberry cultivars to characterise the reflectance patterns of the damage, which revealed the existence of differences in varietal susceptibility.In spectral methods based on cameras, Nieuwenhuizen et al. [22] studied the images obtained by an RGB camera and three multispectral cameras to detect red spider mite damage in greenhouse tomato leaves; the results showed discriminant spectral bands between healthy and damaged leaves.Moreover, Uygun et al. [23] developed an innovative image processing technique to determine the level of damage in greenhouse cucumber plants infected by this pest.
Red spider mite causes discolouration and desiccation when they feed the leaf, which, in most cases, results in yellowish spots and/or bulges in the upper side of the leaves [24].The larva of Phyllocnistis citrella Stainton (Lepidoptera: Gracillariidae) feeds on the leaf in the area between the parenchyma and the cuticle.It traces a winding gallery that grows as the larva grows.The cuticle of the affected leaves breaks, causing water loss in the cells; consequently, the leaf coils dry and break [24].Nutritional deficiencies in citrus leaves, when severe, are also manifested in symptoms that can be recognised visually [25].Some symptoms can be similar in colour to the chlorotic spots caused by T. urticae.Nitrogen deficiency occurs in old leaves first and causes a significant yellowing in the veins.In contrast, iron deficiency occurs in recent leaves and produces a loss of their deep green colour that evolves into shades ranging from light green to pale yellow, depending on the intensity of the condition.However, the veins of the leaves characteristically remain dark green and appear marked on a lighter background, resembling a kind of mesh or lattice [26].Manganese deficiency leads to chlorosis in the interveinal tissue of the leaves, but the veins remain dark green.Sometimes, Mn deficiency can be confused with Fe and Zn deficiency.Recent leaves usually show a reticulate pattern on a lighter green background that is less marked than in Zn or Fe deficiencies.The pattern becomes a green band along the midrib and the principal lateral veins in mature leaves, with light green areas between the veins [27].
Leaf characteristics can be linked to spectral features statistically.In hyperspectral remote sensing, spectral data are typically high-dimensional, fine spectral bands that are highly correlated with each other [28].Hyperspectral imaging generates a massive amount of redundant and frequently highly correlated data that needs to be processed [29].This fact may lead to multicollinearity problems and overfitting when using conventional multivariate regression for empirical modelling [30,31].To handle such a large amount of data and extract useful information, computational statistical methods are needed.These methods connect original variables with the essential spectral information to classify and/or quantify important characteristics [32,33].Partial Least Squares (PLS) is one of the most popular methods for constructing predictive models.This method is commonly used in hyperspectral imaging to extract and summarise spectral information from hyperspectral images, reduce the high dimensionality of the spectral data, and overcome the problem of multicollinearity [34].PLS discriminant analysis (PLS-DA) is a variant of PLS regression in which the independent variable is categorical, expressing the class membership of the samples.It is performed to sharpen the separation between groups by maximising the covariance between the spectra and the independent variable, so that a maximum separation among classes is obtained.
This work aims to investigate the potential use of both colour and hyperspectral imaging as a practical tool to detect the presence and the age of the damage caused by T. urticae in tangerine leaves.Another goal is to discriminate this damage from that caused by other pests and from nutritional deficiencies.

Leaf Samples
A total of 142 tangerine (cv.'Clemenules') leaves were collected from two commercial orchards located in El Puig de Santa María and Chiva (Valencia, Spain) in September 2019.After collecting the leaves, they were stored in a cool chamber at 5 • C. The selection of the leaves was established as follows (Table 1).Sixty leaves with visible damage caused by T. urticae and 60 leaves with no external symptoms of any damage were chosen to evaluate the ability of an automated system to detect the presence of damage caused by this pest in the leaves.Since recent damage occurs typically in recent leaves [24], to determine whether the damage corresponded to an active pest or an old one, half of the selected leaves, with damage or without, were recent, while the other half were old.
Twenty-two leaves were selected to test the ability to discriminate between T. urticae and other problems, 10 of which were affected by P. citrella and the remaining 12 were affected by various nutritional deficiencies whose aspect was compatible with N (6 leaves) and Fe, Mn, or Zn deficiencies (6 leaves) [35].These leaves presented a discoloured appearance similar to the damage caused by T. urticae but with different geometrical patterns.
Another 20 leaves were selected, 10 with T. urticae damage and 10 with various deficiencies, to determine the geometric characteristics of the patterns caused by the damage and the deficiencies in the leaves and to tune the algorithm used to process the colour images.
The damage observed in the leaves had well-defined characteristics, such as colour and shape, which made it possible to draw a visual distinction among them.Figure 1 shows images of the leaf samples on both sides for each subset.

Detection of T. urticae Damage Using Colour Imaging 2.2.1. Colour Image Acquisition and Segmentation
Colour images with a resolution of 0.03 mm/pixel were captured using a digital camera (EOS 700D, Canon Inc, Tokio, Japan) arranged inside a square inspection chamber that included a calibrated and uniform illumination system composed of eight fluorescent tubes (BIOLUX 18 W/965, 6500 K, Osram GmbH, Germany).The angle between the lens axis and the illumination sources was approximately 45 • [36], and cross-polarisation was used [37] to avoid direct reflections towards the camera.Images were captured on the day after leaf collection, and the samples were kept at room temperature (22-25 • C) for 30 min before acquiring the images.Images of the leaves were captured from both the upper side and the underside over a uniform white background.
The images were processed using customised software developed by our group at IVIA (FooColor-Inspector v4.0, available at http://www.cofilab.com).The processing consisted in performing an image segmentation based on colour features.However, the damage caused by T. urticae and the colour changes caused by the nutritional deficiencies cannot be differentiated by using the colour feature alone.Thus, a second step was carried out to classify the leaves according to some geometric features of the objects found, as the two types of damage have a very different appearance.Moreover, using only colour information, it is impossible to determine whether the damage caused by T. urticae is new or old, and therefore, the sets G2.1 and G.2.2 were joined together to form group G2.
In the segmentation based on colour features, four classes were predefined as follows: background, green area (which corresponds to the healthy part of the leaf), yellow area (which corresponds to T. urticae or deficiency spots), and brown area (which corresponds to P. citrella spots).Prior to the segmentation, a supervised training process was necessary.For this purpose, another set of 20 leaves, different from those described in Table 1, was used.The training consisted in manually selecting representative regions of interest (ROI) belonging to the predefined classes in the leaves used for this purpose.The colour values (RGB) of the pixels in each region were stored together with the class to which they belonged These values were later used as input to build a Bayesian linear discriminant analysis (LDA) [38].This type of LDA relies on the Bayes theorem shown in the Equation (1): where x was the three-dimensional observed vector (in our case, the average RGB values of an object), w i (i = 1, . . .,m) was one of the m different classes, m was the number of classes, P(x|w i ) was the probability that the observed x belonged to class w i , P(w i ) was the a priori probability of an object belonging to class w i (this probability was considered to be the same for each class), and p(x|w i ) was the conditional density function of the RGB values in class w i .The technique used for image segmentation was pixels-wise.Therefore, for each pixel in the image, the probability of belonging to each class was estimated, assigning the pixel to the class with the highest probability.After segmentation, all pixels found in the image were classified based on the predefined classes.

Definition of the Discrimination Parameters
As stated, the colour of the damage caused by the deficiencies and by T. urticae is similar.Therefore, the segmentation process could not separate them into different classes.However, the appearance and geometrical pattern of the damage were completely different.For these reasons, the decision was made to analyse some geometrical properties of the objects initially classified as T. urticae.In the analysis, a distinction was drawn between these objects from leaves damaged by T. urticae and leaves damaged by deficiencies.The purpose of this analysis was to determine the discriminative properties for identifying T. urticae damage, not the detection or identification of deficiencies.Taking into account that damage caused by T. urticae is generally detected as objects with an approximately round shape, the geometrical properties considered for the analysis were [39]:

•
The number of damaged areas detected per leaf.• The total damaged area (mm 2 ) of the leaf, as the sum of the areas of all the objects found.

•
The area (A), roundness (R), compactness (C), perimeter (P), and elongation (E) of each object found in the leaf.
Each of these properties was analysed through an analysis of variance (ANOVA) to know whether there were significant differences between those corresponding to the damage actually caused by T. urticae and the discolourations due to deficiencies.Discriminative properties were included in the discrimination algorithm to separate between T. urticae and deficiencies.

Detection of T. urticae Damage Using Hyperspectral Imaging 2.3.1. Hyperspectral Image Acquisition
The hyperspectral imaging system was composed of a camera (CoolSNAP ES, Photometrics, Tucson, AZ, USA) and a liquid crystal tuneable filter (Varispec NIR-07, Cambridge Research & Instrumentation, Inc., Hopkinton, MA, USA) that allowed images to be captured in the operating spectral range from 450 to 1000 nm.The camera was configured to acquire images with a size of 1392 × 1040 pixels and a spatial resolution of 0.14 mm/pixel.A total of 56 monochrome images were acquired for each side of the leaf in 10-nm intervals.To optimise the dynamic range of the camera, prevent saturated images, and correct the spectral sensitivity of the different elements of the system, a calibration of the integration time was performed for each band.This consisted in setting the individual integration time for each band required to obtain 90% of the reflectance of a white target reference (Spectralon 99%, Labsphere, Inc., NH, USA).
The scene was illuminated by twelve halogen spotlights (37 W) (Eurostar IR Halogen MR16.Ushio America, Inc., CA, USA) powered by direct current (12 V).The lamps were arranged equidistant from each other inside a hemispherical aluminium diffuser to illuminate the samples indirectly.Two images per leaf (upper and underside of the leaf) were acquired in reflectance mode using customised software developed at IVIA (Figure 2).
The reflectance captured was corrected to obtain the relative reflectance using a dark and the white reference through Equation ( 2) [40]: where ρ Ref (λ) is the standard reflectance of the white reference target (99% in this work), R (x, y, λ) is the reflectance of the fruit captured by the CCD sensor of the camera in the pixel located at (x, y) coordinates, R white (x, y, λ) is the reflectance captured by the CCD of the white reference target, and R black (x, y, λ) is the reflectance captured by the CCD while avoiding any light source so as to be able to quantify the electronic noise of the CCD.Therefore, a tagged database of 204 hyperspectral images was obtained (Table 2).Three ROIs with a size of 10 × 10 pixels were selected for each side of the leaf for the case of healthy leaves (G1), the leaves with P. citrella (G3), and the leaves with deficiencies (G4).In the leaves affected by T. urticae (G2), three ROIs were selected from the damaged area and another three were selected from the asymptomatic area for each side of the leaf.Thus, a total of 972 ROIs were obtained from both sides.These ROIs were considered to be the samples for the analysis.The average reflectance spectrum of all pixels in each ROI was extracted and organised in a table with 56 columns corresponding to the reflectance value of each band and the class to which they belong.The use of adequate object features leads to more stable classification models, as the mean spectrum decreases the amount of data [41].This approach prevents classification by pixels when objects from different classes contain many similar pixels and are easily wrongly assigned to the opposite class.

Multivariate Data Analysis
Three experiments were planned.The first one was conducted in order to know the ability of a model to discriminate between areas that are healthy and those damaged by T. urticae.Sets G1 and G2 were included in this experiment.The aim of the second experiment was to assess the ability of the model to discriminate between new and old damage, and therefore, subsets G2.1 and G2.2 were included.The third experiment explored the capability of the model to discriminate between T. urticae damage and damage caused by other problems in the leaves.Therefore, all the sets were used to build the models.
To perform the multivariate analysis, PLS-DA was used.In PLS-DA, the regression results are values of Y close to the values assigned to each class.In this analysis, the independent variables (X) were the spectrum of each sample, while the dependent variable Y was a categorical variable representing each class [42].Thus, a numerical value was assigned to the variable Y representing the class.For the first experiment, to detect the damage caused by T. urticae, a value of 0 was set for damaged leaves and 1 was set for healthy ones.In the second experiment, which was conducted to differentiate between leaves with recent T. urticae and leaves with mature T. urticae damages, a value of 0 was assigned for recent and a value of 1 was set for mature leaves.Finally, in the third experiment, aimed at discriminating among all the different types of damage, the response values were set as 1, 2, 3, 4, and 5 for G1, G2, G4.1, G4.2, and G3, respectively.
In this study, the method used to reduce the huge amount of redundant and correlated data captured by the hyperspectral systems between contiguous wavelengths [33] and to select the optimal wavelengths was based on the vector of the regression coefficients.It measures the association between each variable and the response and selects variables in two steps: (i) the PLS model is fitted to the data, and (ii) the selection of variables is based on a threshold [43].Variables with a high absolute value can be selected because they make the highest contribution to the classification, and those with a small absolute value can be ignored [44].In this work, the regression coefficients were obtained from the PLS models.
In all cases, 70% of the samples were used to train and validate the model using crossvalidation.The remaining 30% of the samples were used as an independent or prediction test set.Results are given for the test set.
The input spectra for the PLS-DA models were normalised using mean-centring [45].A single 10-fold Venetian blind cross-validation (i.e., splitting the data evenly into 10 sets and leaving each of the sets out in each iteration of the validation procedure) was used to choose the optimal number of latent variables (LVs) as well as to obtain an estimate of the error rate of the PLS models [46].Usually, the first latent variables explain most of the variance in the dependent variables, and thus, the dependent variables can be modelled by a reduced number of latent variables (LVs).In a PLS model, the explanatory power of the model increases as the number of PLS factors or variables increases.However, the prediction accuracy of the model may decrease with an increase in model complexity [47].The software used to construct these PLS models was The Unscrambler X 10.4 (CAMO Software, Oslo, Norway).

Model Performance Evaluation
When a regression method is used to build a classification model, one of the most important parameters to define is the cut-off value, that is, the acceptance interval in which a new sample is considered correctly classified in the class.Similar to [48,49], the PLS-DA cut-off value for the discrimination of samples based on the presence of damage caused by T. urticae was set at 0.5.If the predicted value of a sample was less than 0.5, the sample was classified as damaged; otherwise, it was considered healthy.Likewise, in the second experiment to discriminate the age of the damage, those with a predicted value of 0.5 were deemed to be recent leaves, while those with higher values were considered to be mature leaves and hence old damage.The third experiment contained a higher number of classes, and therefore, intervals were set for each of them.The interval [0.5-1.5]corresponded to healthy leaves, [1.5-2.5] was set for T. urticae, [2.5-3.5] was set for N deficiency, [3.5-4.5] was set for other deficiencies, and [4.5-5.5] was set for damage caused by P. citrella.
For all cases, the results of the PLS-DA models were expressed as a percentage of correct classification.The precision and the predictive capacity of the PLS-DA models were evaluated using the coefficient of determination (R 2 ).The root mean square error between the predicted and the measured values of the reference parameter in the test set (RMSEP) was used for calibration, cross-validation, and prediction.

Discrimination Parameters
In general, the defects caused by T. urticae and those found due to other problems, such as deficiencies, are very different (Figure 3).Although they could not be separated by colour, the geometrical properties allowed good discrimination to be achieved.Geometric properties were calculated for each defect found in the leaves.Furthermore, the total number of defects per leaf and the total damaged area were added together.One-factor analysis of variance [50] was used to know if these properties were significantly different in these two groups and could be used to separate true T. urticae from other damaged areas not caused by the pest.Table 3 shows that most properties were significantly different in the two groups (high F-score, p-value < 0.005).Hence, for the sake of simplicity, the amount of damage per leaf, the total area, and the individual area of the damage were considered in order to classify the leaf as affected by T. urticae or not.Therefore, if the area of the objects found, the amount of damage found in a leaf, and the total area of this damage were within the mean plus/minus the standard deviation of those corresponding to T. urticae, the leaf was considered to be affected by T. urticae.

Detection of the Damage
Table 4 shows the classification of the damage detected for each set and subset according to the side of the leaf.The method based on colour information correctly determined 100% of sound leaves in all cases, regardless of whether they were recent or old.The detection of T. urticae damage was also high in all cases, reaching an overall success rate of 92.5% (91.67% with the underside and 93.33% with the upper side of the leaf).Most errors were due to damage that went undetected, and only in two cases, in the underside of old leaves, were they confused with damage caused by P. citrella, which was probably due to browning caused by ageing of the T. urticae damage in the leaf.P. citrella was successfully discriminated in 100% of cases when the underside was examined, as this pest is located in this part of the leaves.Finally, the discrimination between damage due to deficiency was different depending on the nutrient.N deficiency could not be correctly discriminated as the main symptom was the lightening of the green colour, but it did not follow any particular pattern.The system was unable to establish a valid general threshold to determine when a leaf had N deficiency or was just light green.The case of other deficiencies performed better, but only in 50% of cases were they correctly discriminated from the damage caused by T. urticae.However, they were separated from T. urticae in 100% of the cases, despite the similarities in colour.4 shows the average reflectance spectra obtained from the upper side and the underside of healthy and damaged regions of sets G1 and G2 according to age.Both healthy and damaged spectra follow the typical pattern of the reflectance of healthy and stressed plants [51].Most differences between healthy and damaged areas were found in the visible region due to changes in the colouration of the plants, as the damage by T. urticae causes a chlorotic spot characterised by a yellow discolouration.This discolouration is caused by a loss of pigments due to the effect of the pest.Leaf pigments (mainly chlorophyll, carotene, and xanthophyll) are an essential factor in energy absorption by leaves in the 400-700 nm region [52].Specifically, for healthy areas, the absorption level in the 530-600 nm region was lower, and therefore, the reflectance was higher than in the adjacent blue and red regions, its highest point being around 550 nm [53].This fact is responsible for the perception of the green colour in the leaves.In contrast, the damaged regions did not show any peak around 550 nm due to discolouration on the leaf caused by the pest.In this case, the curve extended between the green and red regions in the visible spectrum, reaching its midpoint around 600 nm and showing the peak in different areas of this range of the spectrum.As of 700 nm, a transition was observed in the chlorophyll absorption zone with the progressive rise in the spectrum value to the 740-750 nm bands.This sharp rise in the curve between the red and the NIR region is known as red-edge.The slope and the red-edge position have been correlated with chlorophyll concentrations, and therefore, the position and slope of the red border also change in damaged leaves because healthy ones continue to have active photosynthesis [54].
Two classification models were built based on supervised PLS-DA using all of the 56 wavelengths in the spectral range 450-1000 nm and using only the selected wavelengths.Figure 5 shows the vector of regression coefficients on each side and for each age of the leaf.Those wavelengths with the highest absolute regression coefficients were selected as essential wavelengths.In the case of the upper side, apparent visual differences are observed between the green of the healthy regions (530 nm) and the yellow chlorotic spots of the damaged areas (600 nm).However, the most important wavelengths were three identified around the red and the red-edge regions (670, 700, and 740 nm).Variations in spectral variables (X) and categorical variables (Y) were described by only seven LVs.This relatively small number of LVs suggests a low correlation in the spectra of different classes but similarities in the spectra within classes.Furthermore, the low number of LVs indicated the excellent differentiation between the classes that were constructed.Moreover, for the use of all and the selected wavelengths, the values of RMSEP did not show a great difference for calibration and validation, respectively, which exhibited good agreement, thus indicating that the calibration error is a reasonable estimation of the standard error of prediction observed in the test set.Furthermore, the test set yielded results similar to those of the calibration set, with an R 2 greater than 0.87 in all cases, thus indicating the excellent performance of the model for the classification of damage.Indeed, the rate of successful classification achieved was 100% for all cases.The models could detect 100% of cases of damage by T. urticae in mature and recent leaves and on the upper and the undersides.

Detection of the Age of the T. urticae Damage
In order to determine whether the damage was caused by a recent or an old infestation of T. urticae, Figure 6 shows the mean spectral reflectance obtained from the damage caused by this pest for each side as a function of the age of the leaf.Some differences were observed between recent and mature leaves with damage on both sides of the leaves.The reflectance of the damage of the mature leaves is lower than the reflectance of recent leaves, especially in the visible part of the spectrum.This could be due to differences in the pigmentation.A low pigmentation content results in higher reflectance and vice versa.Therefore, in a recent leaf affected by T. urticae, the breaking down of chlorophylls causes the presence of carotenes and xanthophyll to be more evident, thus producing a sharp increase in the reflectance [55].Another possible reason could be the changes in the spectral properties of plant leaves during the growing season.The very recent folded, compact, and underdeveloped leaves exhibit a lack of chlorophyll that increases the reflectance, while leaves with a brown appearance diminish the near-infrared reflectance [55].Five wavelengths were obtained from the vector of regression coefficients per underside and seven per upper side of the leaf (Figure 7).The spectral bands selected as essential are mostly located behind the red-edge, the 850-nm spectral band being typical for both sides of the leaf.Table 5 shows the results obtained for PLS-DA classification according to the age of the damage.For both models, a high percentage of damage was correctly classified according to the age of the damage (>92% for all cases).It is noticeable that the success rate of 100% was achieved for the underside, since it is the part of the leaf where the mite feeds and the damage is quite apparent.For the underside, the RMSEP values obtained in the optimal wavelengths PLS model were higher compared to the model with all wavelengths.Both showed agreement between calibration and validation, also obtaining an R 2 higher than 0.87 in all cases.On the other hand, the upper side of the leaf showed a very low R 2 for prediction, with a value of 0.65 for the model based on all wavelengths.

Discrimination between T. urticae and Other Damage
The mean reflectance spectra of healthy leaves, damage by T. urticae and P. citrella, and leaves with different deficiencies were evaluated for each side of the leaf (Figure 8).In the spectral range from green to red, the differences could be observed between the various types of damage.The set G2 (T.urticae) and the subsets G4.1 (N deficiency) and G4.2 (damage due to other deficiencies) presented a peak at around 550-570 nm on both sides of the leaf, but with a level of a different intensity.On the other hand, the set G3 (P.citrella) presented a different behaviour depending on the side of the leaf, since the gallery created by the larva during its feeding is quite visible only on one side of the leaf.
The valley in the 670-690 nm region was marked in all cases, indicating the absorption of chlorophyll to a greater or lesser extent.In the 700 to 750 nm region, the spectrum value increased, but not with the same level of intensity for all cases.G3 obtained low reflectance values in the NIR for the other types of damage, which indicated that this vegetation was quite diseased or that it had a considerable lack of humidity.In this spectral region, valleys and peaks can be seen quite clearly in different spectral bands for each type of damage.On both sides of the leaf, the peak at 760 nm and the valley at 770 nm are typical for damage not caused by T. urticae.The same happened with the peak at 900 nm.
The wavelengths that made the biggest contribution to the classification were obtained through the regression coefficients from the PLS model (Figure 9).This vector of regression coefficients showed nine wavelengths on the underside and eleven on the upper side of the leaf.The RMSEP values for calibration and validation in the models with the full spectrum and the selected wavelengths were similar.The prediction R 2 for the two sides showed values of 0.85 and 0.84 using all the wavelengths and 0.80 and 0.86 using the selected wavelengths.
Table 6 shows the results obtained for the damage classification based on the groups of samples.All models, using all and the optimal wavelengths, showed a low percentage of correctly classified damage (<50%), with the lowest value for the damage caused by other deficiencies (0% on both models on each side of the leaf).It is worth noting the potential of the system to detect damage caused by P. citrella that is almost invisible from the upper side of the leaves, as can be seen in Figures 1 and 10a.Although this was not the aim of this research, which focused on damage caused by T. urticae, this finding is relevant.P. citrella is a severe and dangerous pest that is difficult for any automated surveillance system to detect, as the visible damage is caused in the underside.However, using a wavelength of 770 nm, which the PLS analysis identified as one of the most important for the problem, it was possible to see the damage that could not be detected using the colour vision system.Figure 10a shows the comparison between the upper side of a leaf photographed with a colour camera and in the 770 nm band.In general, as shown in Figure 10b, the damaged area presents a lower reflectance in the NIR region, which is in agreement with most scientific works on the reflectance of stressed plants.

Conclusions
Colour and VIS/NIR hyperspectral imaging were evaluated under laboratory conditions to detect the damage caused by T. urticae and if it is recent or old.Likewise, they were tested to determine their capacity to discriminate it from other damage, as the caused by P. citrella, and other nutritional deficiencies on tangerine leaves.
In colour imaging, a success rate of 100% was obtained to identify leaves without damages while the leaves with the presence of T. urticae were correctly identified in 92.5% of cases.Most errors were caused by confusion with some deficiencies.However, this method was not capable of discriminating between old and recent damage caused by T. urticae.
In hyperspectral imaging, the PLS-DA model was able to separate sound from damaged areas in 100% of cases.On the one hand, recent infestations were distinguished from old ones in 92% of cases, with a 100% success rate for the underside of the leaves, as the damage is more evident on this surface.On the other hand, the models for exploring their capability to discriminate between T. urticae and damage caused by other problems showed a percentage of correctly classified damage of less than 50%.More specifically, for the discrimination of damage caused by other deficiencies versus T. urticae, it was impossible to establish discriminatory differences.
Although it was not the objective of this research, a relevant finding has been the potential of hyperspectral systems to detect the damage caused by P. citrella.This pest is difficult to detect by any automatic surveillance system because the damage is hidden on the underside of the leaves, and hence, it is difficult to see beyond a certain distance.
The results indicated the potential of colour and hyperspectral imaging to detect the chlorotic spots caused by T. urticae in citrus leaves as fast and automatic techniques that represent an improvement on manual methods.

Figure 1 .
Figure 1.Images of the leaves (upper and underside of the leaf) for each subset.

Figure 2 .
Figure 2. Images captured at 650 nm and colour of the two sides of a leaf affected by T. urticae.

Figure 3 .
Figure 3. Examples of image segmentation of leaves.(a) Leaf with symptoms compatible with N deficiencies.(b) Leaf affected by T. urticae.

Figure 4 .
Figure 4. Mean spectra of healthy and damaged regions extracted from sets G1 (undamaged) and G2 (damaged) at each age and on (a) under side, recent leaves; (b) upper side recent leaves; (c) under side mature leaves, and (d) upper side mature leaves.

Figure 5 .
Figure 5. Vector of regression coefficients of the PLS model using mean spectra and with the optimal wavelengths selected at each age and on (a) under side, recent leaves; (b) upper side recent leaves; (c) under side, mature leaves; and (d) upper side mature leaves.

Figure 6 .
Figure 6.Mean spectra of damaged regions caused by T. urticae on (a) under side and (b) upper side of recent and mature leaves.

Figure 7 .
Figure 7. Vector of regression coefficients of the PLS model using mean spectra and with the optimal wavelengths selected on (a) under side and (b) upper side of the leaf.

Figure 9 .
Figure 9. Vector of regression coefficients of the PLS model using mean spectra and with the optimal wavelengths selected on (a) under side and (b) upper side of the leaf.

Figure 10 .
Figure 10.(a) Comparison of the image of the upper side of a leaf captured at 700 nm with the hyperspectral camera and the image of the same leaf captured with the colour camera.(b) Spectra of the healthy and damaged regions of this leaf.

Table 1 .
Classification of the sets and subsets of the leaves for analysis.

Table 2 .
Classification of the tagged database for analysis.

Table 3 .
Analysis of variance (ANOVA) of the geometrical properties of the objects found in the test images.The objects correspond to actual damages caused by T. urticae and nutritional deficiencies (not T. urticae).

Table 4 .
Results of the detection of T. urticae damage on each side of the leaf using colour information.

Table 5 .
Classification of age of T. urticae damage (%) for the validation set by PLS-DA using all and selected wavelengths on each side of the leaf.

Table 6 .
Damage classification according to the presence of different types of damage of the validation set by PLS-DA using all and selected wavelengths on each side of the leaf.