Automatic Parameter Tuning for Adaptive Thresholding in Fruit Detection

This paper presents an automatic parameter tuning procedure specially developed for a dynamic adaptive thresholding algorithm for fruit detection. One of the major algorithm strengths is its high detection performances using a small set of training images. The algorithm enables robust detection in h...

Full description

Bibliographic Details
Main Authors: Elie Zemmour, Polina Kurtser, Yael Edan
Format: Article
Language:English
Published: MDPI AG 2019-05-01
Series:Sensors
Subjects:
Online Access:https://www.mdpi.com/1424-8220/19/9/2130
_version_ 1811303534280310784
author Elie Zemmour
Polina Kurtser
Yael Edan
author_facet Elie Zemmour
Polina Kurtser
Yael Edan
author_sort Elie Zemmour
collection DOAJ
description This paper presents an automatic parameter tuning procedure specially developed for a dynamic adaptive thresholding algorithm for fruit detection. One of the major algorithm strengths is its high detection performances using a small set of training images. The algorithm enables robust detection in highly-variable lighting conditions. The image is dynamically split into variably-sized regions, where each region has approximately homogeneous lighting conditions. Nine thresholds were selected to accommodate three different illumination levels for three different dimensions in four color spaces: RGB, HSI, LAB, and NDI. Each color space uses a different method to represent a pixel in an image: RGB (Red, Green, Blue), HSI (Hue, Saturation, Intensity), LAB (Lightness, Green to Red and Blue to Yellow) and NDI (Normalized Difference Index, which represents the normal difference between the RGB color dimensions). The thresholds were selected by quantifying the required relation between the true positive rate and false positive rate. A tuning process was developed to determine the best fit values of the algorithm parameters to enable easy adaption to different kinds of fruits (shapes, colors) and environments (illumination conditions). Extensive analyses were conducted on three different databases acquired in natural growing conditions: red apples (nine images with 113 apples), green grape clusters (129 images with 1078 grape clusters), and yellow peppers (30 images with 73 peppers). These databases are provided as part of this paper for future developments. The algorithm was evaluated using cross-validation with 70% images for training and 30% images for testing. The algorithm successfully detected apples and peppers in variable lighting conditions resulting with an F-score of 93.17% and 99.31% respectively. Results show the importance of the tuning process for the generalization of the algorithm to different kinds of fruits and environments. In addition, this research revealed the importance of evaluating different color spaces since for each kind of fruit, a different color space might be superior over the others. The LAB color space is most robust to noise. The algorithm is robust to changes in the threshold learned by the training process and to noise effects in images.
first_indexed 2024-04-13T07:49:45Z
format Article
id doaj.art-febdf092140646a79e9a954526e1775d
institution Directory Open Access Journal
issn 1424-8220
language English
last_indexed 2024-04-13T07:49:45Z
publishDate 2019-05-01
publisher MDPI AG
record_format Article
series Sensors
spelling doaj.art-febdf092140646a79e9a954526e1775d2022-12-22T02:55:36ZengMDPI AGSensors1424-82202019-05-01199213010.3390/s19092130s19092130Automatic Parameter Tuning for Adaptive Thresholding in Fruit DetectionElie Zemmour0Polina Kurtser1Yael Edan2Department of Industrial Engineering and Management, Ben-Gurion University of the Negev, Beer-Sheva 8410501, IsraelDepartment of Industrial Engineering and Management, Ben-Gurion University of the Negev, Beer-Sheva 8410501, IsraelDepartment of Industrial Engineering and Management, Ben-Gurion University of the Negev, Beer-Sheva 8410501, IsraelThis paper presents an automatic parameter tuning procedure specially developed for a dynamic adaptive thresholding algorithm for fruit detection. One of the major algorithm strengths is its high detection performances using a small set of training images. The algorithm enables robust detection in highly-variable lighting conditions. The image is dynamically split into variably-sized regions, where each region has approximately homogeneous lighting conditions. Nine thresholds were selected to accommodate three different illumination levels for three different dimensions in four color spaces: RGB, HSI, LAB, and NDI. Each color space uses a different method to represent a pixel in an image: RGB (Red, Green, Blue), HSI (Hue, Saturation, Intensity), LAB (Lightness, Green to Red and Blue to Yellow) and NDI (Normalized Difference Index, which represents the normal difference between the RGB color dimensions). The thresholds were selected by quantifying the required relation between the true positive rate and false positive rate. A tuning process was developed to determine the best fit values of the algorithm parameters to enable easy adaption to different kinds of fruits (shapes, colors) and environments (illumination conditions). Extensive analyses were conducted on three different databases acquired in natural growing conditions: red apples (nine images with 113 apples), green grape clusters (129 images with 1078 grape clusters), and yellow peppers (30 images with 73 peppers). These databases are provided as part of this paper for future developments. The algorithm was evaluated using cross-validation with 70% images for training and 30% images for testing. The algorithm successfully detected apples and peppers in variable lighting conditions resulting with an F-score of 93.17% and 99.31% respectively. Results show the importance of the tuning process for the generalization of the algorithm to different kinds of fruits and environments. In addition, this research revealed the importance of evaluating different color spaces since for each kind of fruit, a different color space might be superior over the others. The LAB color space is most robust to noise. The algorithm is robust to changes in the threshold learned by the training process and to noise effects in images.https://www.mdpi.com/1424-8220/19/9/2130adaptive thresholdingfruit detectionparameter tuning
spellingShingle Elie Zemmour
Polina Kurtser
Yael Edan
Automatic Parameter Tuning for Adaptive Thresholding in Fruit Detection
Sensors
adaptive thresholding
fruit detection
parameter tuning
title Automatic Parameter Tuning for Adaptive Thresholding in Fruit Detection
title_full Automatic Parameter Tuning for Adaptive Thresholding in Fruit Detection
title_fullStr Automatic Parameter Tuning for Adaptive Thresholding in Fruit Detection
title_full_unstemmed Automatic Parameter Tuning for Adaptive Thresholding in Fruit Detection
title_short Automatic Parameter Tuning for Adaptive Thresholding in Fruit Detection
title_sort automatic parameter tuning for adaptive thresholding in fruit detection
topic adaptive thresholding
fruit detection
parameter tuning
url https://www.mdpi.com/1424-8220/19/9/2130
work_keys_str_mv AT eliezemmour automaticparametertuningforadaptivethresholdinginfruitdetection
AT polinakurtser automaticparametertuningforadaptivethresholdinginfruitdetection
AT yaeledan automaticparametertuningforadaptivethresholdinginfruitdetection