A lightweight coin detection and classification algorithm for low quality images

Zhi Liu, Yanru Sun2017

Abstract

Coin detection and classification systems are essential in banking environments. However, when images are captured by low-end line-scan cameras under poor illumination, image quality is often degraded. This paper proposes a lightweight algorithm specifically designed for such conditions. The approach utilizes a modified Canny operator to filter vertical line segments, accelerating ellipse fitting, and employs a rotation-invariant feature descriptor. Experimental results demonstrate a classification accuracy of 92.6% with a processing time of 25ms per image.

Introduction

Automated coin sorting is a critical component of modern currency management. While high-end imaging systems can provide the clarity needed for accurate classification, they often come with prohibitive hardware costs. This research explores the use of low-cost line-scan cameras for high-speed conveyor belt systems. The primary challenge lies in the resulting image quality: these cameras frequently produce noisy images with prominent vertical artifacts from the belt and motion-induced distortions. To be viable, the classification algorithm must be computationally efficient for real-time use while remaining robust against these artifacts and varying coin orientations.

Methodology

The proposed pipeline is optimized for both speed and the specific noise characteristics of line-scan hardware.

1. Modified Canny Edge Detection and Ellipse Fitting

Standard edge detection algorithms, such as the Canny operator, tend to capture excessive noise from the vertical strips of the conveyor belt. This noise complicates the subsequent ellipse-fitting stage. To address this, the authors modified the Canny operator to prioritize horizontal edges, effectively ignoring the vertical artifacts. This reduction in data points significantly speeds up the detection of the coin's elliptical boundary.

Figure 6: Edge detection results illustrating the significant vertical noise generated by the line-scan system.

2. Geometric Normalization

Due to camera perspective and high-speed movement, coins often appear as ellipses rather than circles. Once the ellipse is detected, an affine transformation is applied to normalize the image into a standard circular shape. This step ensures that feature extraction is performed on a consistent geometric basis.

Figure 4: The geometric processing pipeline, from edge detection to final segmentation.

3. Rotation-Invariant Feature Extraction

To handle coins at any orientation, the system uses a Radial Gradient Transform (RGT) to create rotation-invariant features. By partitioning the coin into concentric rings and calculating gradients relative to the center, the system generates a unique "fingerprint" that remains stable regardless of the coin's rotation on the belt. These features are then classified using a Support Vector Machine (SVM) into three categories: Normal, Counterfeit, or Spoiled.

Experimental Results

The algorithm was tested on a dataset of 2,000 images, following training on a set of 800 samples (including normal, counterfeit, and spoiled coins).

  • Accuracy: The system achieved an overall accuracy of 92.6%. Specifically, normal coins were identified with 96.1% accuracy, while counterfeit and spoiled coins saw accuracies of 92.5% and 89.3%, respectively.
  • Performance: The entire pipeline processes a single image in approximately 25ms, meeting the requirements for real-time industrial sorting.

Conclusion

This research demonstrates that hardware-informed software optimizations can compensate for low-cost imaging components. By specifically targeting the predictable noise of line-scan cameras and employing rotation-invariant features, the proposed system provides a high-accuracy, lightweight solution for coin classification. Future work will focus on improving the classification of "spoiled" coins, which currently present the greatest challenge due to their highly variable physical degradation.

Summary updated

Abstract

Coin detection and classification system is important in banks. When coin images are captured by low end line-scan camera with poor illumination, their quality will be relatively low. A lightweight algorithm is proposed for this kind of images. Firstly, a modified Canny operator is designed to filter vertical line segments to speed up the ellipse fitting steps. Secondly, a rotation invariant feature is applied to describe the feature of a coin. Initial experiments show that the classification accuracy of the proposed algorithm is about 92.6% for the data given.
BibTeX
@misc{liu2017lightweight,
  author = {Zhi Liu and Yanru Sun and Zhi Liu},
  title = {{A lightweight coin detection and classification algorithm for low quality images}},
  year = {2017},
  doi = {10.2991/amcce-17.2017.105},
}

Loading related content...

Figure