Fast and Reliable Coin Classification

Fast and Reliable Coin Classification
Laurens van der Maaten a
Paul Boon a
a
MICC, Maastricht University
P.O. Box 616, 6200 MD Maastricht, The Netherlands
Abstract
In the demonstration, we present a new system that performs fast and reliable classification digital photographs of coins. The system is called Coin-o-matic, and is capable of recognizing 700 different coins
with over 2,000 coin faces. In its current version, Coin-o-matic classifies approximately 94% of the coins
in our testsets correctly, whereas the percentage of misclassifications is around 0.5%. On a consumer laptop computer, the system requires approximately 2 seconds to classify a single coin, making it applicable
to large-scale coin sorting applications.
1
Introduction
Systems for the automatic classification of coins based on area, thickness, and weight measurements are
widely used in, e.g., vending machines, but their applicability is limited to a single currency. As a result,
such systems are not capable of sorting heterogeneous coin collections. An example of a hetereogeneous
coin collection is the one that was collected during the introduction of the Euro in order to raise funds for
charity organizations. In order to automatically sort heterogeneous coin collections, systems have to be
developed that classify coins based on the analysis of digital photographs of the coins. In the demonstration,
we present Coin-o-matic: a system that was designed to this end. Coin-o-matic is capable of fast and
reliable recognition of approximately 700 coin types with over 2,200 coin faces, and can be applied to sort
heterogeneous coin collections that were collected during the introduction of the Euro [1]. In addition, the
system can be of use to, e.g, exchange offices, cultural heritage institutions that collect large amounts of
historical coins, and police departments investigating the theft of historical coins.
2
Coin-o-matic
Coin-o-matic was designed to meet the requirements of the MUSCLE CIS benchmark competition1 , in
which 5,000 coins (= 10,000 coin photographs) covering approximately 700 different coin types have to be
classified within 8 hours on a normal workstation. The focus in the benchmark assessment scheme is on
reliability of the classifications. The workflow of the system consists of five main stages: (1) segmentation,
(2) preselection, and (3) classification. The three stages are described below in more detail.
In the segmentation stage, a coin is extracted from its background in the coin photograph. The segmentation is performed by means of a computationally efficient approach based on edge detection and additional
morphological operations. Using the fact that coins are circular objects, the system checks whether the segmentation is completed successfully. In case of a segmentation failure, a computationally more expensive
approach based on the Hough circle detector is applied. The segmentation procedure works correctly for
over 99% of the coins in the MUSCLE CIS benchmark coin collection.
The preselection stage performs a preselection of possible coin types based on easy to compute features, and
aims at speeding up the classification process without reducing the classification performance of the system.
The preselection is performed based on the area of the coin (that is estimated by counting the number of
pixels inside the coin) and on so-called edge angle-distance histograms. Edge angle-distance histograms
measure the distribution of edge pixels (obtained from a Sobel edge detection) over the circular coin area.
1 See
http://muscle.prip.tuwien.ac.at for more information on the MUSCLE CIS benchmark competition.
In practice, the histograms are computed by dividing the coin into parts as illustrated in Figure 1. Rotationinvariance of the features is obtained by computing the magnitude of the Fourier transform of the angular
bands. In Coin-o-matic, the histograms are computed in a multi-scale manner using 2, 4, 8, 16, and 32
distance bins and 180 angle bins. When a nearest neighbor classifier is trained on the preselection features,
approximately 75% of the coins can already be classified correctly. In Coin-o-matic, the preselection features are used to reduce the number of possible coin types to approximately 100.
In the classification stage, Coin-o-matic decides on the coin type to assign to the unlabeled coin. The classification of the coin is performed by means of a template matching approach that is based on polar gradient
orientation images constructed from the coin photographs. Hence, all gradient magnitude information is
discarded in the matching process. The motivation behind this approach is that gradient orientations contain
structured information even when the gradient magnitude is very low, which is illustrated in Figure 2.
Because a coin has two coin faces, the process described above is performed for two coin photographs. In
order to ensure reliability of the classifications, a coin is rejected when its coin faces are classified differently.
If the two classifications correspond, the coin classification is accepted. In its current version, Coin-o-matic
is capable of correctly classifying approximately 94% of the coins in the MUSCLE CIS benchmark dataset,
while making around 0.5% incorrect classifications. Misclassifications are usually due to the presence of
perceptually very similar coins in the coin collection. On a standard consumer laptop computer, Coin-omatic requires 2 seconds of computation time for the classification of a single coin.
The system was implemented in C++ using the Trolltech Qt toolkit and the Intel Integrated Performance
Primitives libraries. As a result, binaries are available for Windows, Linux, as well as Mac OS X. Because
of our use of Intel-specific libraries, the use of an Intel CPU is desired (although the system works on other
x86 processors as well).
Figure 1: Edge angle-distance histograms.
3
Figure 2: Illustration of structure in gradient orientations that is not apparent in gradient magnitudes.
Demonstration
In the demonstration, we present a GUI-based version of Coin-o-matic, and show its performance in the
classification of modern coins. In addition, we present an initial version of Coin-o-matic that was developed
for the automatic recognition of historical coins.
References
[1] L.J.P. van der Maaten, P.J. Boon, and E.O. Postma. A new approach to the classification of modern and
historical coins. Preprint. 2007.