background in hue-saturation color space (Figure 4-7). Gray level histograms for the three classes in hue-luminance and red-green color plane are shown in Figure 4-8 and 4-9. Although it seemed there might be a distinction between the fruits and background in red-green color plane, there were numerous false detections when different thresholds were tested on the validation images. The main reason for so many false detections was because of high contrast and brightness level in the image, which tended to make leaves and background obj ects white in color and were classified as citrus class. The threshold in hue-saturation color plane was carefully chosen in a conservative approach after many trials have been conducted over the calibration images. The luminance component was added to the threshold to make it less dependent on the brightness level of the image during binarization. The pixel distribution for various classes in the calibration images is shown in Table 4-2. Although only 58% of citrus class was captured inside the threshold, the binarization scheme was found to work very well with the validation images. The main reason behind this threshold was that the threshold contained 0% of background and 0.03% of leaves. Since maj ority portion of an image consisted of leaves and background, this binarization scheme performed well and there were some underestimation but very small number of overestimation due to the conservative binarization scheme. Table 4-2. Pixel distribution for citrus, leaf and background classes for 25 images in HSI color plane. Pixel Category Citrus class Leaf class Background class Number Percentage Number Percentage Number Percentage of pixels of pixels of pixels Inside threshold 15875 58.1% 68 0.03% 0 0% Outside 11438 41.9% 23347 99.7% 8165 100% threshold