Identifying Irregular Potatoes Using Hausdorff Distance and Intersection over Union

Sensors (Basel). 2022 Jul 31;22(15):5740. doi: 10.3390/s22155740.

Abstract

Further processing and the added value of potatoes are limited by irregular potatoes. An ellipse-fitting-based Hausdorff distance and intersection over union (IoU) method for identifying irregular potatoes is proposed to solve the problem. First, the acquired potato image is resized, translated, segmented, and filtered to obtain the potato contour information. Secondly, a least-squares fitting method fits the extracted contour to an ellipse. Then, the similarity between the irregular potato contour and the fitted ellipse is characterized using the perimeter ratio, area ratio, Hausdorff distance, and IoU. Next, the characterization ability of the four features is analyzed, and an identification standard of irregular potatoes is established. Finally, we discuss the algorithm's shortcomings in this paper and draw the advantages of the algorithm by comparison. The experimental results showed that the characterization ability of perimeter ratio and area ratio was inferior to that of Hausdorff distance and IoU, and using Hausdorff distance and IoU as feature parameters can effectively identify irregular potatoes. Using Hausdorff distance separately as a feature parameter, the algorithm achieved excellent performance, with precision, recall, and F1 scores reaching 0.9423, 0.98, and 0.9608, respectively. Using IoU separately as a feature parameter, the algorithm achieved a higher overall recognition rate, with precision, recall, and F1 scores of 1, 0.96, and 0.9796, respectively. Compared with existing studies, the proposed algorithm identifies irregular potatoes using only one feature, avoiding the complexity of high-dimensional features and significantly reducing the computing effort. Moreover, simple threshold segmentation does not require data training and saves algorithm execution time.

Keywords: Hausdorff distance; ellipse fitting; irregular potatoes; least squares; machine vision.

MeSH terms

  • Algorithms
  • Image Processing, Computer-Assisted
  • Least-Squares Analysis
  • Solanum tuberosum*