Centre surround method, as described earlier, is a biologically inspired method which detects contrast changes in an image. Centre surround method considers a local neighbour around a pixel and computes the Mean Value. If the pixel value exceeds the Mean Value by a certain margin, the pixel is said to have a strong contrast. The method performed better while considering a neighbourhood of 9×9 which was slower in processing. In the field of image processing, using a larger filter is considered inefficient. Instead of using a larger filter which slows down the operation, the image can be reduced in size and a smaller filter is used. A filter applied to the image has greater impact when image subsampled. This approach was used in the system and the image was resized to 20% both for rows and columns. A neighbourhood of 5×5 was used for centre surround computations. Pixels with higher local contrast were set to high. All other pixels were set to zero. The resulting image shows strong contrast change map which was essentially zero for smoother images.
Counting non-zero elements in the contrast map, obtained through centre surround method, resulted the total defective area of the fruit. Higher the non-zero pixels, more the fruit is faulty.