GTADAD: A Novel Grayscale Thresholding Algorithm for Fruit Disease Area Detection
Abstract
Grayscale thresholding algorithms are vital in computer vision for simplifying images into binary (black and white) data, which reduces computational complexity and isolates objects of interest from the background. Grayscale thresholding algorithms segment images by converting pixels into black or white based on intensity. They are essential for object detection and image analysis. Identifying the area of interest that is diseased or defective on fruit is another important area of agricultural research, particularly when sorting them using fruit sorters as fresh or infected fruit. A novel algorithm, GTADAD [Grayscale Thresholding Algorithm for diseased Area Detection], has been proposed in this paper for identifying the diseased area on the fruit image. The proposed algorithm is a simple thresholding algorithm that uses a single, user-defined value to classify all pixels. If pixel > T, it becomes white; otherwise, it becomes black. Each gray pixel is converted to a new pixel value using a data transformation technique that uses the log 10 function. The square root of the sum of all converted pixel values is the ‘T’ value for identifying and extracting the diseased or defective area from the fruit image. 150 fruit images [orange, banana, apple, papaya, and mango] were collected from Kaggle, Medley, and Google. Output obtained using the proposed GTADAD algorithm was compared with other famous grayscale algorithms like the Triangle method, Sauvola’s method, and Niblack’s method. Keeping the universal grayscale OTSU’s output image as the ground truth image, GTADAD, the Triangle method, Sauvola’s method, and Niblack’s method outputs were compared. The result showed that the proposed GTADAD algorithm outperformed the other three algorithms both visually and statistically. Metrics such as the Jaccard index, Dice coefficient, mean squared error, and structural similarity index demonstrated that the proposed algorithm, GTADAD, outperformed in the metrics analysis and achieved a good accuracy rate in segmenting the diseased area.
Copyright (c) 2026 M Henila

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

