AUTHOR=Li Panfei , Jiang Xiaoxiao , Wu Yuhao , Fu Qiang , Qin Sheng TITLE=External defect detection of Orah mandarin based on a non-brightness correction algorithm JOURNAL=Frontiers in Plant Science VOLUME=Volume 16 - 2025 YEAR=2025 URL=https://www.frontiersin.org/journals/plant-science/articles/10.3389/fpls.2025.1654143 DOI=10.3389/fpls.2025.1654143 ISSN=1664-462X ABSTRACT=External defect detection is a crucial step in Orah mandarin citrus grading. However, in existing defect detection algorithms by image processing, Orah mandarin surfaces exhibit characteristics such as higher brightness at the center, lower brightness at the edges, and uneven brightness distribution in images. Although traditional brightness correction algorithms can solve these issues, they suffer from limitations including prolonged processing time, high computational complexity, and elevated false detection rates. To address these shortcomings, this work proposes a non-brightness correction algorithm to enhance the speed and accuracy of Orah mandarin external defect detection. The proposed algorithm divides Orah mandarin images into multiple equal-sized regions and performs threshold segmentation sequentially using a sliding window matching the region size. A sliding window size of 100 × 100 pixels was chosen because it offers a balanced trade-off between detection precision and computational efficiency, allowing the algorithm to detect both large and subtle defects effectively while maintaining fast processing speed. First, the histogram statistical method categorizes the current sliding window region into three types, and a dedicated defect detection algorithm applies adaptive thresholding to each type. Next, the threshold-segmented regions are merged, while the fruit stem area is excluded by combining circularity and hue features. Finally, morphological operations eliminate noise to obtain complete defect segmentation results. Experimental results demonstrate that with a sliding window size of 100 × 100 pixels, the algorithm achieves rapid external defect detection at 85.3 ms per fruit and a 97.5% defect recognition rate, offering a novel approach for fruit surface defect detection. This performance is consistent across different defect types, though the algorithm performed best for point-like defects, such as thrips scarring and canker spots, where clear, localized defects were more easily detected. For blocky rot defects, such as sunburn, the algorithm exhibited a slightly lower recognition rate, particularly in areas where the defect was less distinct and more integrated with the fruit’s surface. These findings suggest that the algorithm is effective for a range of defect types but may require further refinement to handle more complex or overlapping defects.