100 pixels based on area of the extracted features, these noises were removed from the images in Figure 4-10 (c). The threshold was selected based on the area of the noise pattern in the calibration images. (a) Color image. (b) Binanzed image. (c) After removing noise. (d) After tilling gaps. Figure 4-10. Image processing steps of a typical citrus grove scene. In the above processed image, there were cases in which a single fruit occluded by small leaves were counted as more than one fruit. To overcome this problem, a set of dilation and erosion with a kernel size of 5x5 pixels was applied to the images, resulting in the final processed image as shown in Figure 4-10 (d). These images could then be used to count the number of citrus fruits by the algorithm.