Effect of Image Segmentation Thresholding on Droplet Size Measurement

: Droplet size spectrum is a key factor in pesticide application because it affects the biological efﬁcacy of a treatment in terms of target coverage, environmental impact in terms of evaporation, drift and run-off, and operator’s safety in terms of inhalation and dermal exposure. Droplet measurement methods based upon image analysis have to face the “binarization” or “segmentation” process, by which the objects of interest (the droplets) are extracted from the background. Segmentation is carried out by choosing appropriate threshold values, mostly based on the operator’s experience. In this study, images of droplets of an air induction nozzle TVI 8002 at four pressures (0.3, 0.5, 1.0, and 1.5 MPa) were obtained using the liquid immersion method. Each image was processed multiple times, ﬁrstly by using a “reference” threshold value based on the operator’s experience and then by using 11 different threshold values, chosen in the range of around ± 5% of the reference threshold and based upon the average gray level of the image. For each threshold value, the corresponding spray parameters (volumetric diameters, mean diameters, Sauter diameters, and numeric diameters) were analyzed. The results showed that spray parameters had a statistically signiﬁcant linear trend with respect to the threshold values in most cases. However, in absolute terms, variations were almost always less than 1.0% of reference values. This result allows considering the image acquisition system used in the present study as an automatic tool able to select the threshold according to the gray level of the image, making the whole segmentation process faster, more objective, and less dependent on the operator’s experience.


Introduction
Nowadays, in the field of pesticide application, the correct use of Plant Protection Products (PPPs) is the most common and powerful tool for crop pest control, and, for this reason, it is necessary to satisfy the growing demand for agricultural productivity in 2 of 19 in order to simultaneously increase the benefits of PPPs and to reduce the risks of environmental and human contamination [22,23]. As an example, Ferguson et al. (2016) [24], testing nozzles with different spray qualities in an oat canopy, found that droplet number densities were inversely related to the droplet size, yet coverage was increased more by application volume rate than droplet size. An exploratory study by Zwertvaegher et al. (2014) [25] showed that droplet size also affects spray retention, influencing efficacy, economic losses, and environmental contamination.
As it is well documented in the literature [26][27][28][29][30][31][32][33][34][35][36][37][38], droplet size is affected by several factors, among which nozzle features, liquid properties, working pressure, air speed, climatic conditions, position, and technique of sampling. All these factors should be considered when the atomizing capabilities of a nozzle are studied. The International Standard ISO 25358 (2018) [39] recognizes that the measurement and classification of droplet size spectra for applications of pesticides and other chemicals facilitate the description of sprays and therefore enhance efficacy and spray drift management. However, measurement systems and laboratories can produce different absolute values for a given droplet spectrum, due primarily to sampling effects, dynamic size range capabilities, data processing, and reporting [40]. Even if some of these differences can be minimized through the use of appropriate sampling techniques, discrete differences in absolute values of droplet size spectra can still remain between measurement systems. An approach that has been successfully used for describing spray droplet size spectra involves the use of reference sprays to define reference categories, in order to increase uniformity in relative measures and classifications among different measurement systems and laboratories.
Among intrusive techniques, based on digital image analysis, the most popular available in the literature include the use of Water Sensitive Papers (WSP) and the liquid immersion method. WSPs are one of the simplest and lowest-cost tools used by farmers to check the spray coverage of a certain treatment applied to any crop [49]. They consist of artificial targets with a yellow surface layer that turns dark blue when in contact with water [50]; the analysis of droplet stains by means of image processing software, allows measuring the droplet diameters [51][52][53][54][55]. Salyani et al. [53], operating within a citrus orchard, reported somewhat weak correlations between WSP area coverage and spray deposition, so they concluded that WSPs may provide a reasonably accurate estimation of area coverage, but could not be used to quantify the amount of spray deposits in most field applications.
In the liquid immersion method, droplets are collected on Petri dishes containing lightly viscose liquids, such as Vaseline, light mineral oil, or silicone oil, which, due to their hydrophobic nature, cause droplets to form almost spherical shapes. They are immediately photographed in situ by high-resolution cameras or observed with a microscope, allowing droplet counting and size measurement [56,57]. The liquid immersion method, even if intrusive, is cost-efficient, easy to use, and it is one of the most fundamental mechanical techniques to measure droplet sizes and their distributions. It is also adopted to confirm the adequacy of the data obtained by optical methods, such as the phase Doppler particle analyzer [56]. In general, these methods use as diffused as possible light sources to illuminate a collection of droplets, avoiding shadows formation, followed by software analysis of the images to determine the main characteristics of the spray droplets.
A common problem with these measurement methods concerns the "binarization" or "segmentation" of the image, which allows producing a binary image with only two values: one for droplets and another one for the background, in which it becomes possible to separate the droplets from the background. Other aspects to be addressed concern the Agronomy 2022, 12, 1677 3 of 19 resolution of the image, to be chosen appropriately in relation to the size of the objects to be extracted [58], or the in-focus image identification when high-speed imaging, shadowgraphy, particle/droplet image analysis, or holography methods are used [28,[44][45][46][47][48]59,60].
Thresholding is one of the most common image segmentation methods for binarization, in which objects of interest are extracted from the image by assigning a pixel's brightness as the threshold, which varies from 0 to 255 for an 8-bit gray-scale image. The accuracy of information that is extracted from digital images strongly depends on the success in selecting an appropriate threshold that becomes fundamental during segmentation [44,61,62]. The choice of the proper threshold value is crucial for the image evaluation since it separates the pixels of interest from the background in such a way that it influences all subsequent measurements [63].
Several thresholding methods are available in the literature, among which the Huang method, based on Shannon's entropy function [64], the isoData algorithm based on an iterative process that provides increasingly cleaner extractions of the object region [65], the mean method, that uses the mean of gray levels as the threshold [66], and the Otsu's threshold clustering algorithm, that searches for the threshold that minimizes the intra-class variance [67].
The basic problem of deciding if a threshold value or an extraction method is appropriate is ultimately user dependent. The final decision on which algorithm to apply under specific conditions or a specific experiment is necessarily subjective and application dependent. In general, the threshold value necessary to obtain an informative binary image is correlated with the gray level of the image itself, so this correlation enables the selection of an adequate threshold when analyzing samples [51]. Unfortunately, using manual thresholding methods has several limitations, among which low reproducibility, higher user bias, tediousness and time-consuming, and high intra-and inter-user variability. Instead, there are multiple advantages to using automatic binarization methods over manual ones, among these: full reproducibility, reduction in preprocessing treatments, possibility of automation in macros, plugins, etc. On the other hand, even if automatic methods are used, the final choice of the method to be used is user dependent and the results may vary significantly.
The main objective of this study was to evaluate the effects of the threshold values used for image binarization on droplet diameter measurement. More specifically, we assessed how much variations of about ±5% in the choice of the segmenting threshold affect the computation of volumetric and numeric diameters. The result may provide information useful for an automatic thresholding process, able to reduce the operator's subjectivity and the measurement errors.

The Image Acquisition System
Spray droplets were captured by means of a custom-made test bench, built at the Section of Mechanics and Mechanization of the Di3A [68,69]. The test bench allows analyzing nozzle sprays with hydraulic atomization according to the procedure established by ISO 5682-1 standard [70], based upon the liquid immersion method.
The test bench reproduces test conditions similar to those present in a standard sprayer with hydraulic atomization (Figure 1). The test liquid is contained in a 70 L main tank, from where it is pumped to the nozzle under test by means of a diaphragm pump (AR 30, Annovi Reverberi, Reggio Emilia, Italy), driven by a 2.2 kW, 230 V AC induction motor. The required pressure value may be adjusted by means of a manual pressure regulating valve. The nozzle is applied to a mobile support that moves along two horizontal rails, with travel speed controlled by a closed-loop position/speed controller, applied to a 240 W, 24 V DC brushed motor. Liquid pressure at the nozzle and flow rate are measured in real time by means of a piezoresistive pressure transmitter (Series 22 S, Keller Italy Srl, Milano, Italy) and an infrared flow sensor (SF800-6, Swissflow, Maarheeze, The Netherlands). The whole system (sensor signal acquisition, starting and stopping spraying, nozzle speed, data logging) is managed by a suitable self-made software user interface designed to run on a Windows 10 PC operating system. in real time by means of a piezoresistive pressure transmitter (Series 22 S, Keller Italy Srl, Milano, Italy) and an infrared flow sensor (SF800-6, Swissflow, Maarheeze, The Netherlands). The whole system (sensor signal acquisition, starting and stopping spraying, nozzle speed, data logging) is managed by a suitable self-made software user interface designed to run on a Windows 10 PC operating system. The nozzle under test, while moving up to 1.5 m s −1 , sprays in a single pass the test liquid (clean water with soluble coloring agent Ponceau Red, Novema Srl, Turin, Italy, at the concentration of 2 g L −1 ) above three Petri dishes (55 mm diameter, centers spaced 195 mm), each containing 5 mL of silicone oil (AR200, Sigma-Aldrich, Milano, Italy). The distance between the nozzle and Petri dishes is 0.5 m, chosen according to the ISO 5682-1 standard [70], on which the construction of the test bench for the measurement of the droplet size is based. To reduce the effects of unwanted vibrations, the Petri dishes are placed on a wood table, distinct and mechanically insulated from the whole apparatus.
The images of the droplets trapped by the silicone oil were acquired by using a highresolution (6000 × 4000 pixels) DSLR camera (Nikon D5500, Nikon Corporation, Tokyo, Japan) equipped with a macro lens (Nikon Micro Nikkor AF-S 60 mm f/2.8 G ED, Nikon Corporation, Tokyo, Japan) and an electronic flash (Neewer 48 Macro LED Ring Flash, Shenzen, Guangdong, China) and saved as high-quality color JPEG files. Figure 2 shows an example of the droplets trapped by the silicone oil. The red color of the tracer added to the water was functional for the subsequent recognition of the droplets in the image.
Images were spatially calibrated by taking photos of a known object (a 10 × 10 mm grid pattern, 1 mm step, engraved on a glass disc, placed at the three positions of the Petri dishes). This assured that the camera focal plane had the same distance for both droplets and pattern grid, and therefore it was possible to measure in pixels a known length (10 mm) along two orthogonal directions. Relating real length to pixel length, the average calibration factor was 5.33 μm pixel −1 . The nozzle under test, while moving up to 1.5 m s −1 , sprays in a single pass the test liquid (clean water with soluble coloring agent Ponceau Red, Novema Srl, Turin, Italy, at the concentration of 2 g L −1 ) above three Petri dishes (55 mm diameter, centers spaced 195 mm), each containing 5 mL of silicone oil (AR200, Sigma-Aldrich, Milano, Italy). The distance between the nozzle and Petri dishes is 0.5 m, chosen according to the ISO 5682-1 standard [70], on which the construction of the test bench for the measurement of the droplet size is based. To reduce the effects of unwanted vibrations, the Petri dishes are placed on a wood table, distinct and mechanically insulated from the whole apparatus.
The images of the droplets trapped by the silicone oil were acquired by using a highresolution (6000 × 4000 pixels) DSLR camera (Nikon D5500, Nikon Corporation, Tokyo, Japan) equipped with a macro lens (Nikon Micro Nikkor AF-S 60 mm f/2.8 G ED, Nikon Corporation, Tokyo, Japan) and an electronic flash (Neewer 48 Macro LED Ring Flash, Shenzen, Guangdong, China) and saved as high-quality color JPEG files. Figure 2 shows an example of the droplets trapped by the silicone oil. The red color of the tracer added to the water was functional for the subsequent recognition of the droplets in the image.
Images were spatially calibrated by taking photos of a known object (a 10 × 10 mm grid pattern, 1 mm step, engraved on a glass disc, placed at the three positions of the Petri dishes). This assured that the camera focal plane had the same distance for both droplets and pattern grid, and therefore it was possible to measure in pixels a known length (10 mm) along two orthogonal directions. Relating real length to pixel length, the average calibration factor C f was 5.33 µm pixel −1 . Experiments were carried out with an air induction hollow cone nozzle TVI 8002 (A buz, France) at the pressures of 0.3, 0.5, 1.0, and 1.5 MPa, with a nozzle speed of 1.5 m s − The corresponding flow rates were 0.80, 1.05, 1.47, and 1.76 L min −1 , respectively. Pressur values were chosen according to the manufacturer's information so as to cover the usua range of use of the nozzle. Three repetitions were carried out per each pressure, so a tota of 36 images (4 pressures × 3 repetitions/pressure × 3 Petri dishes/repetition) were cap tured.

The Image Analysis Procedure
Droplet features extraction from images was based on the segmentation principle Image analysis was carried out by means of the image processing software ImageJ [71 The segmentation algorithms available as plugins in ImageJ were judged unsatisfactor for the present application, so a global thresholding based on the average gray level of th image was exploited. Original color JPEG images were converted into 8-bit gray-level im ages, segmented by applying the chosen threshold value, processed with the "watershed binary filter to separate some touching particles [72], and then carefully inspected at suitable zoom factor to manually remove some unrelated particles arousing from the seg mentation process or to separate some particles not separated by the watershed filter. F nally, all particles present in the images, except those touching the edges of the image were extracted and for each particle the following items were considered (all data in pixel area, primary and secondary axis of the best fitting ellipse, aspect ratio (ratio betwee primary and secondary axis), and maximum and minimum caliper (Feret's diameters These shape descriptors (best fitting ellipse axes and Feret's diameters) were used to dis charge particles strongly deviating from circularity, mainly deriving from the overlappin and subsequent separation of stains. In this study particles with aspect ratio and Feret' diameters ratio greater than 1.50 were ignored. All particles lower than 5 contiguous pix els were considered as noise and then were also ignored. All data were saved in exce spreadsheets and then imported into R [73] for subsequent analyses. Experiments were carried out with an air induction hollow cone nozzle TVI 8002 (Albuz, France) at the pressures of 0.3, 0.5, 1.0, and 1.5 MPa, with a nozzle speed of 1.5 m s −1 . The corresponding flow rates were 0.80, 1.05, 1.47, and 1.76 L min −1 , respectively. Pressure values were chosen according to the manufacturer's information so as to cover the usual range of use of the nozzle. Three repetitions were carried out per each pressure, so a total of 36 images (4 pressures × 3 repetitions/pressure × 3 Petri dishes/repetition) were captured.

The Image Analysis Procedure
Droplet features extraction from images was based on the segmentation principle. Image analysis was carried out by means of the image processing software ImageJ [71]. The segmentation algorithms available as plugins in ImageJ were judged unsatisfactory for the present application, so a global thresholding based on the average gray level of the image was exploited. Original color JPEG images were converted into 8-bit gray-level images, segmented by applying the chosen threshold value, processed with the "watershed" binary filter to separate some touching particles [72], and then carefully inspected at a suitable zoom factor to manually remove some unrelated particles arousing from the segmentation process or to separate some particles not separated by the watershed filter. Finally, all particles present in the images, except those touching the edges of the image, were extracted and for each particle the following items were considered (all data in pixel): area, primary and secondary axis of the best fitting ellipse, aspect ratio (ratio between primary and secondary axis), and maximum and minimum caliper (Feret's diameters). These shape descriptors (best fitting ellipse axes and Feret's diameters) were used to discharge particles strongly deviating from circularity, mainly deriving from the overlapping and subsequent separation of stains. In this study particles with aspect ratio and Feret's diameters ratio greater than 1.50 were ignored. All particles lower than 5 contiguous pixels were considered as noise and then were also ignored. All data were saved in excel spreadsheets and then imported into R [73] for subsequent analyses.

The Experimental Activity
The experimental activity was organized in three steps:

1.
Segmentation of all 36 images by using an "optimal" or "reference" threshold value (TV r ) based on the operator's experience. More in detail, the operator adjusted the threshold value in such a way the droplet diameters in segmented images were as close as possible to real diameters, visually established by comparing the segmented images to the original ones, both carefully inspected at a suitable zoom factor. Results coming from this step were assumed as a reference for successive comparisons.

2.
Study of the correlation between the "reference" threshold value (TV r ) and the average gray level (AGL) of the corresponding images so as to explore the possibility of using a threshold value based on the objective characteristics of the images rather than on the operator's subjectivity. This allowed to obtain a linear model (Equation (10) in the Results section) whose predicted value TV * was significantly correlated to the average gray level of the image.

3.
Reprocessing of each of the 36 images with 11 threshold values so to assess how much the choice of the threshold affects the calculation of the spray parameters. In detail, each image was segmented with the threshold value TV * predicted by the linear model (step 2) based upon its average gray level, with five thresholds greater than TV * and five thresholds lower than TV * , with a step of one. A total of 396 segmented images were analyzed. Figure 3 shows the flow chart of the whole procedure.

The Experimental Activity
The experimental activity was organized in three steps: 1. Segmentation of all 36 images by using an "optimal" or "reference" threshold value (TV ) based on the operator's experience. More in detail, the operator adjusted the threshold value in such a way the droplet diameters in segmented images were as close as possible to real diameters, visually established by comparing the segmented images to the original ones, both carefully inspected at a suitable zoom factor. Results coming from this step were assumed as a reference for successive comparisons. 2. Study of the correlation between the "reference" threshold value (TV ) and the average gray level (AGL) of the corresponding images so as to explore the possibility of using a threshold value based on the objective characteristics of the images rather than on the operator's subjectivity. This allowed to obtain a linear model (Equation (10) in the Results section) whose predicted value TV * was significantly correlated to the average gray level of the image. 3. Reprocessing of each of the 36 images with 11 threshold values so to assess how much the choice of the threshold affects the calculation of the spray parameters. In detail, each image was segmented with the threshold value TV * predicted by the linear model (step 2) based upon its average gray level, with five thresholds greater than TV * and five thresholds lower than TV * , with a step of one. A total of 396 segmented images were analyzed. Figure 3 shows the flow chart of the whole procedure.

Spray Parameters Calculation
Starting from the particle area A i (pixel), the corresponding particle diameter D i (pixel) was computed according to Equation (1): Real-world diameter was obtained by applying the measured calibration factor: Knowing the diameter of each particle (droplet), all the parameters usually adopted to describe a spray were computed according to Equations (3)-(9): Arithmetic mean diameter : Surface mean diameter : Volume mean diameter : Sauter mean diameter (SMD) : Volumetric diameter D vα: diameter below which smaller droplets constitute the fraction α of the total volume. The most common volumetric diameters are D v0.1 , D v0.5 , and D v0. 9 : diameters below which smaller droplets constitute 10%, 50%, and 90% of the total volume, respectively.
The particles of the three Petri dishes were unified for each repetition in such a way to compute the spray parameters on at least 2000 droplets, as recommended by the ISO 5682-1 [70]. All these quantities were computed by using custom-made R functions. Input data were the excel spreadsheets coming from image analysis with ImageJ. Average values were obtained at varying threshold values (TV) for each pressure and they were compared to those obtained when the reference threshold value (TV r ) was used. Table 1 reports the results of the measurements obtained when the reference threshold values TV r were used.

Reference Values
Results were coherent with the expectations; in fact, all diameters were affected by pressure: when the spraying pressure increased, droplet size decreased. When the pressure increased from 0.3 to 1.5 MPa, the volumetric diameter D v0.5 , usually adopted to describe the atomization capability of a nozzle, decreased by 52.0% (from 864 to 415 µm). The number median diameter (NMD) decreased by 9.2% (from 109 to 99 µm), the arithmetic mean diameter D 10 by 31.8% (from 195 to 133 µm), and the Sauter mean diameter D 32 by 51.7% (from 694 to 335 µm). The relative span factor (RSF) provides a practical mean for comparing various droplet size distributions. This parameter is indicative of the uniformity of the droplet size distribution: the closer this number is to 1, the more uniform the spray will be. In this study, RSF increased from 1.01 to 1.17 when the pressure increased from 0.3 to 1.0 MPa. A further increase in pressure to 1.5 MPa produced a decrease in RSF to 1.15. The cumulative volumetric curves are shown in Figure 4 as a function of the spray pressure. The graph was obtained by considering the average data of the three repetitions for each spraying pressure. All curves are clearly distinct, meaning a significant effect of the spray pressure on volumetric diameters.
Results were coherent with the expectations; in fact, all diameters were affected by pressure: when the spraying pressure increased, droplet size decreased. When the pressure increased from 0.3 to 1.5 MPa, the volumetric diameter . , usually adopted to describe the atomization capability of a nozzle, decreased by 52.0% (from 864 to 415 μm). The number median diameter (NMD) decreased by 9.2% (from 109 to 99 μm), the arithmetic mean diameter by 31.8% (from 195 to 133 μm), and the Sauter mean diameter by 51.7% (from 694 to 335 μm). The relative span factor (RSF) provides a practical mean for comparing various droplet size distributions. This parameter is indicative of the uniformity of the droplet size distribution: the closer this number is to 1, the more uniform the spray will be. In this study, RSF increased from 1.01 to 1.17 when the pressure increased from 0.3 to 1.0 MPa. A further increase in pressure to 1.5 MPa produced a decrease in RSF to 1.15.
The cumulative volumetric curves are shown in Figure 4 as a function of the spray pressure. The graph was obtained by considering the average data of the three repetitions for each spraying pressure. All curves are clearly distinct, meaning a significant effect of the spray pressure on volumetric diameters.  Figure 5 shows the relationship between the average gray level (AGL) of an 8-bit im-   Figure 5 shows the relationship between the average gray level (AGL) of an 8-bit image and the reference threshold value (TV r ) used for droplet segmentation, chosen on the basis of the researcher's expertise. with residual standard error 0.6994 on 34 df (degrees of freedom), multiple R-squared (R 2 ) 0.9222, F-statistic 402.8 on 1 and 34 df, and p-value highly significant (p-level < 0.001).

Relationship between Threshold Values and Gray Levels
Given the high statistical significance of the model, it was used to choose a threshold value operator-independent for subsequent analyses.  Figure 6 shows the effects of the threshold on volumetric diameters 0.1 , 0.5 , and 0.9 . All data are normalized with respect to the reference values, according to Equation . ; . = .

Effect of Threshold Value
. , For each sub-plot, threshold values are normalized with respect to the value TV * predicted by Equation (10). Each point represents the average of the three repetitions. All sub-plots show quite evident linear trends, described by the equations summarized in Table 2. The relationship was well described by the linear model (Equation (10)): with residual standard error 0.6994 on 34 df (degrees of freedom), multiple R-squared (R 2 ) 0.9222, F-statistic 402.8 on 1 and 34 df, and p-value highly significant (p-level < 0.001). Given the high statistical significance of the model, it was used to choose a threshold value operator-independent for subsequent analyses.  (1) ***: significant at p-level = 0.001; **: significant at p-level = 0.01; *: significant at p-level = 0.05; ns: not significant.

Effect of Threshold Value
The majority of the relationships (8 out of 12) were statistically significant, meaning a significant effect of the threshold on the computation of the volumetric diameters. This result confirms the importance of the choice of the threshold value during the image segmentation process. However, according to regression lines, absolute variations in For each sub-plot, threshold values are normalized with respect to the value TV * predicted by Equation (10). Each point represents the average of the three repetitions. All sub-plots show quite evident linear trends, described by the equations summarized in Table 2. The majority of the relationships (8 out of 12) were statistically significant, meaning a significant effect of the threshold on the computation of the volumetric diameters. This result confirms the importance of the choice of the threshold value during the image segmentation process. However, according to regression lines, absolute variations in volumetric diameters ranged from about 99.5% to about 101.0% of reference values. Table 1, when the threshold value ranged from 95% to 105% of TV * , variations in volumetric diameters predicted by regression lines were those reported in Table 3. As a general trend, the max-min difference increased when the fraction α of the total volume in D vα increased and decreased when the pressure increased. Differences in D v0.1 ranged from 0 to 3 µm, in D v0.5 ranged from 2 to 8 µm, and in D v0.9 ranged from 3 to 14 µm. The highest difference was 14 µm and regarded D v0.9 at 0.3 MPa. Considering the overall accuracy of the measuring system adopted in this study, these differences may be accepted and considered as measuring errors.

Considering the reference values reported in
A more comprehensive assessment was based on the comparison between reference volumetric diameters and volumetric diameters computed at varying the threshold value. The comparison was carried out for all volumetric diameters ranging from D v0.01 to D v1.00 with a step of 0.01 and the deviations (D r vα -D vα ) for each threshold value, with α = 0.01-1.00, are reported in Figure 7 for each spraying pressure.
volumetric diameters ranged from about 99.5% to about 101.0% of reference value sidering the reference values reported in Table 1, when the threshold value range 95% to 105% of TV * , variations in volumetric diameters predicted by regression line those reported in Table 3.
As a general trend, the max-min difference increased when the fraction α of th volume in increased and decreased when the pressure increased. Differences i ranged from 0 to 3 μm, in . ranged from 2 to 8 μm, and in . ranged from μm. The highest difference was 14 μm and regarded . at 0.3 MPa. Consider overall accuracy of the measuring system adopted in this study, these differences m accepted and considered as measuring errors. Table 3. Variations in volumetric diameters (range, μm) as predicted by regression lines r in Table 2.
. .   The plot shows that deviations were almost centered across 0 µm; however, when the volumetric diameter increased, the range of deviations among the 11 threshold values also increased. As an example, at 0.3 MPa, the range of deviations increased from 4.3 µm (D v0.1 ) to 17.8 µm (D v0.9 ), at 0.5 MPa increased from 3.1 µm (D v0.1 ) to 11.2 µm (D v0.9 ), at 1.0 MPa increased from 1.2 µm (D v0.1 ) to 11.5 µm (D v0.9 ), and at 1.5 MPa increased from 0.7 µm (D v0.1 ) to 6.6 µm (D v0.9 ). These results confirm that the uncertainty in the measurement of volumetric diameters, in absolute terms, is affected by the choice of the threshold used for image segmentation and the effects are more pronounced at lower pressures (higher droplet diameters).
On the other part, considering the results obtained when the image binarization was carried out with the threshold values TV * predicted by the linear model described by Equation (10), the deviations from reference values were much smaller, ranging from −2.8 µm (D v0.9 at 1.5 MPa) to 2.3 µm (D v0.5 at 1.5 MPa). This implies that segmenting the images using a threshold value based on the gray level may reduce deviations from reference values and make the entire process less subjective.
The results obtained considering the arithmetic mean diameter D 10 , the surface mean diameter D 20 , the volume mean diameter D 30 , and the Sauter mean diameter D 32 are shown in Figure 8. The linear trends in sub-plots were described by the equations summarized in Table 4.
The plot shows that deviations were almost centered across 0 μm; however, w the volumetric diameter increased, the range of deviations among the 11 threshold v also increased. As an example, at 0.3 MPa, the range of deviations increased from 4. ( . ) to 17.8 m ( . ), at 0.5 MPa increased from 3.1 m ( . ) to 11.2 m ( . ), MPa increased from 1.2 m ( . ) to 11.5 m ( . ), and at 1.5 MPa increased from m ( . ) to 6.6 m ( . ). These results confirm that the uncertainty in the measure of volumetric diameters, in absolute terms, is affected by the choice of the threshold for image segmentation and the effects are more pronounced at lower pressures (h droplet diameters).
On the other part, considering the results obtained when the image binarization carried out with the threshold values TV * predicted by the linear model describe Equation (10), the deviations from reference values were much smaller, ranging from μm ( . at 1.5 MPa) to 2.3 μm ( . at 1.5 MPa). This implies that segmenting th ages using a threshold value based on the gray level may reduce deviations from refer values and make the entire process less subjective.
The results obtained considering the arithmetic mean diameter , the surface m diameter , the volume mean diameter , and the Sauter mean diameter shown in Figure 8. The linear trends in sub-plots were described by the equations marized in Table 4.   Except for the Sauter mean diameter, in almost all other cases the trend was downward (coefficient a < 0), meaning a reduction in mean diameters when the threshold value increased. However, in most cases (10 out of 16), the regression lines were not statistically significant. Considering the reference values reported in Table 1, deviations predicted by the regression lines were almost always lower than 2 µm. This result implies that choosing the threshold value in an interval of ±5 points across TV * , the effect on these diameters is negligible from the practical point of view.
Finally, the results of the number median diameter were similar: even if the regression lines describing the trends in NMD were statistically significant, variations in diameter values were always lower than 2 µm.

Discussion
Spray droplet size measurement is a very complex task that has been addressed in many different ways over the years. All methods, both intrusive and non-intrusive, based upon the image analysis have to face and solve the problem of separating the objects of interest (the droplets) from the background by choosing an appropriate threshold value based on both image attributes and the operator's experience. This approach leads to a lack of uniformity and the reproducibility of the results is still uncertain, which is why different automatic thresholding algorithms have been developed [64][65][66][67]. In this study, a preliminary analysis carried out by using the most common automatic segmentation algorithms such as isoData, mean, and Otsu available as plugins in ImageJ, produced unsatisfactory results for the present application, so a global thresholding based on the average gray level of the image was exploited.
Several studies on spray image analysis have concerned the use of WSPs, despite their limitations when used to characterize spray droplet distribution and deposition in field application, especially when high volume rates are applied [53]. Measurements are affected by the threshold value used for image processing. Salyani and Fox (1999) [74] applied a manual procedure to fit the threshold intensity for each sample. Panneton (2002) [75] proposed a methodology similar to that investigated in the present study: for each card, a range of threshold values was applied, and the corresponding coverage was computed. The range of threshold values was chosen using a trial-and-error process and the "optimum threshold level" was determined from visual observation. Sánchez-Hermosilla and Medina (2011) [51], working on samples with different coverage levels, established relationships between threshold and statistical image histogram parameters such as mean, mode, and median of gray levels. The best correlation was found with the mean gray level and resulted in a linear equation similar to Equation (10), but with different coefficients due to the different features of the images. Considering the "true" covered surface that was obtained by digitizing the images with CAD software, the mean relative error was 5.15% in the coverage measurement. Finally, Xu et al. (2016) [76] tested on WSP seven grayscale parameters and five threshold selection methods and concluded that the luminosity grayscale parameter and the max-min threshold selection method (based on the average of minimum and maximum grayscale to separate foreground and background of images) got the best results. Again, a manual validation was performed in comparison with the computer recognition results.
In general, each measurement technique produces different results. Sijs et al. (2021) [40], comparing the image analysis VisiSizer technique, a stroboscopic imaging method developed in-house, a phase Doppler particle analysis, and laser diffraction (Malvern Spraytec), reported that the larger the droplets, the bigger the differences between the results obtained by the different methods. The authors recommend the need for selecting the size measurement technique to fit the physical nature and the expected range of droplet parameters. Nuyttens et al. (2007) [26], analyzing 17 bibliographic references of the results obtained in different laboratories, where different techniques were adopted to test reference nozzles pre-screened for laboratory purposes, reported a wide range of absolute measurements: when median values of D v0.5 increased from about 140 to about 395 µm, the interquartile range was on average 24% of the median values. Variations in results were then much higher than those experienced in this study due to the threshold choice, always lower than 1%, except for D v0.9 at 1.0 MPa (1.5%) and NMD at 0.5 MPa (2.0%). These results do not intend to be valid for each situation: the regression equation (Equation (10)) may change if images are acquired with different light conditions, or if a different coloring tracer is used. However, the approach of choosing the threshold value here discussed remains valid and, after validation, can be implemented within automatic tools for image segmentation. Another limitation of the actual procedure is represented by the inspection of the segmented images to manually remove the unrelated particles introduced from the segmentation process or to separate the particles not separated by the watershed filter. This procedure is tedious, time consuming, and may reintroduce elements of subjectivity. In future developments, we will try to eliminate this step by applying filters on the extracted particles based on their size and their shape descriptors, or developing a suitable algorithm capable of minimizing the noise.

Conclusions
Image analysis is present in several procedures for droplet size measurement, both intrusive and non-intrusive. A common problem to be addressed is the droplet features extraction from the image, which is affected, among other things, by the thresholding algorithm. In this study, images of droplets of an air induction nozzle were acquired by exploiting the liquid immersion method. Images were firstly segmented by applying a reference threshold based upon the operator's expertise and subsequently, this reference threshold was correlated to the average gray level of the image. Having found that the correlation descripted by a linear trend was highly significant, each image was reprocessed 11 times using, in addition to the threshold value predicted by the regression (TV * ), five higher and five lower values with a step of one. In relative terms, this consists in varying the threshold value in the range of about ±5% of TV * . The spray parameters were computed for each threshold value and the results were compared to the reference ones. Results allowed drawing the following main conclusions: • Volumetric diameters D v0.1 , D v0.5 , and D v0.9 varied linearly according to the variations in threshold values, and in the majority of cases trends were statistically significant. However, from the practical point of view, variations ranged from about 99.5% to about 101.0% of reference values (maximum variation of 14 µm), and then absolute errors, with respect to variations of about ±5% in the threshold value, were lower than 1.0%. • Error was affected by droplet size modified by spray liquid pressure: as a general trend, the max-min difference among the 11 threshold values increased when the fraction α of the total volume in D vα increased and decreased when the pressure increased.

•
Considering the results obtained when images were binarized using the threshold values TV * , deviations from reference values ranged in absolute terms from −2.8 µm (D v0.9 at 1.5 MPa) to 2.3 µm (D v0.5 at 1.5 MPa), corresponding to variations in relative terms from −0.43% to 0.55%. The practical effect on the three volumetric diameters D v0.1 ,D v0.5 , and D v0.9 may therefore be neglected.

•
The effects of threshold value on mean diameters, Sauter mean diameter, and number median diameter were similar to those observed for volumetric diameters, i.e., variations well described by linear trends, in six out of 16 statistically significant, but ranging from −0.21% to 0.68% for mean diameters and SMD and from −0.64% to 1.35% for NMD.
All considered, the study confirms the importance of accurately choosing the threshold for image binarization. Using a threshold value based upon the average gray level of the image can allow to develop an automatic tool for image segmentation that will be faster than manual thresholding and operator independent. Moreover, variations in the threshold value in the range of about ±5% have effects on droplet size parameters which can be considered negligible in practice. These results could be useful in developing automatic tools for droplet image analysis without introducing significant errors.

Data Availability Statement:
The authors have full access to all data in the study. They take full responsibility for the integrity of the data, the accuracy of the data analysis and interpretation, and the conduct of the research. The authors have the right to publish any and all data, separate and apart from the guidance of any sponsor. The data sets supporting the conclusions of this article are available from the authors upon reasonable request.

Conflicts of Interest:
The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.

AGL
Average gray level HIS High-speed imaging LD Laser diffraction NMD Number median diameter PDPA Phase Doppler particle analyzer PPP Plant protection product RSF Relative span factor SMD Sauter mean diameter TV Threshold value WSP Water sensitive paper Superscript "n" Normalized values Superscript "r" Reference values Superscript "*" Values predicted by the linear model (Page: 16 Equation (10))