0% found this document useful (0 votes)
20 views6 pages

Automated Coin Recognition System Using ANN: Shatrughan Modi Dr. Seema Bawa

The document presents an Automated Coin Recognition System using an Artificial Neural Network (ANN) to identify Indian coins of denominations `1, `2, `5, and `10 with a recognition rate of 97.74%. The system processes images of coins, extracting features through techniques like Hough Transformation and Pattern Averaging before classification by the trained neural network. The study highlights the effectiveness of the system in distinguishing coins, achieving only a 2.26% misrecognition rate.

Uploaded by

75251102
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views6 pages

Automated Coin Recognition System Using ANN: Shatrughan Modi Dr. Seema Bawa

The document presents an Automated Coin Recognition System using an Artificial Neural Network (ANN) to identify Indian coins of denominations `1, `2, `5, and `10 with a recognition rate of 97.74%. The system processes images of coins, extracting features through techniques like Hough Transformation and Pattern Averaging before classification by the trained neural network. The study highlights the effectiveness of the system in distinguishing coins, achieving only a 2.26% misrecognition rate.

Uploaded by

75251102
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

International Journal of Computer Applications (0975 – 8887)

Volume 26– No.4, July 2011

Automated Coin Recognition System using ANN

Shatrughan Modi Dr. Seema Bawa


Dept. of Computer Science and Engineering Dept. of Computer Science and Engineering
Thapar University Thapar University
Patiala-147004, India. Patiala-147004, India.

ABSTRACT The electromagnetic method based systems can differentiate


Coins are integral part of our day to day life. We use coins between different materials because in these systems the coins
everywhere like grocery store, banks, buses, trains etc. So it are passed through an oscillating coil at a certain frequency and
becomes a basic need that coins can be sorted and counted different materials bring different changes in the amplitude and
automatically. For this it is necessary that coins can be direction of frequency. So these changes and the other
recognized automatically. In this paper we have developed an parameters like diameter, thickness, weight and magnetism can
ANN (Artificial Neural Network) based Automated Coin be used to differentiate between coins. The electromagnetic
Recognition System for the recognition of Indian Coins of method based coin recognition systems improve the accuracy of
recognition but still they can be fooled by some game coins.
denomination `1, `2, `5 and `10 with rotation invariance. We
have taken images from both sides of coin. So this system is In the recent years coin recognition systems based on images
capable of recognizing coins from both sides. Features are have also come into picture. In these systems first of all the
extracted from images using techniques of Hough image of the coin to be recognized is taken either by camera or
Transformation, Pattern Averaging etc. Then, the extracted by some scanning. Then these images are processed by using
features are passed as input to a trained Neural Network. 97.74% various techniques of image processing like FFT [1, 2], Gabor
recognition rate has been achieved during the experiments i.e. Wavelets [3], DCT, edge detection, segmentation, image
only 2.26% miss recognition, which is quite encouraging. subtraction [4], decision trees [5] etc and various features are
extracted from the images. Then based on these features
General Terms different coins are recognized.
Neural Network, Pattern Recognition, Image Processing.

Keywords 2. RELATED WORK


Pattern Averaging, Hough Transform for circle detection, In 1992 [6] Minoru Fukumi et al. presented a rotational invariant
Automated Coin Recognition. neural pattern recognition system for coin recognition. They
performed experiments using 500 yen coin and 500 won coin. In
this work they have created a multilayered neural network and a
1. INTRODUCTION preprocessor consisting of many slabs of neurons to provide
We can not imagine our life without coins. We use coins in our rotation invariance. They further extended their work in 1993 [7]
daily life almost everywhere like in banks, supermarkets, and tried to achieve 100% accuracy for coins. In this work they
grocery stores etc. They have been the integral part of our day to have used BP (Back Propagation) and GA (Genetic Algorithm)
day life. So there is basic need of highly accurate and efficient to design neural network for coin recognition. Adnan Khashman
automatic coin recognition system. In-spite of daily uses coin et al. [8] presented an Intelligent Coin Identification System
recognition systems can also be used for the research purpose by (ICIS) in 2006. ICIS uses neural network and pattern averaging
the institutes or organizations that deal with the ancient coins. for recognizing rotated coins at various degrees. It shows 96.3%
There are three types of coin recognition systems available in correct identification i.e. 77 out of 80 variably rotated coin
the market based on different methods: images were correctly identified. M ohamed Roushdy [9] had
M echanical method based systems used Generalized Hough Transform to detect coins in image.

Electromagnetic method based systems In our work we have combined Hough Transform and Pattern
Averaging to extract features from image. Then, these features
Image processing based systems are used to recognize the coins. In section 3 implementation
The mechanical method based systems use parameters like details are given. In section 4 we have presented training and
diameter or radius, thickness, weight and magnetism of the coin testing data. Then, in section 5 the experimental results are
to differentiate between the coins. But these parameters can not provided. Then, in section 6 we have concluded the work.
be used to differentiate between the different materials of the
coins. It means if we provide two coins one original and other 3. IMPLEMENTATION DETAILS
fake having same diameter, thickness, weight and magnetism Coin recognition process has been divided into seven steps. The
but with different materials to mechanical method based coin architecture of Automated Coin Recognition System is shown in
recognition system then it will treat both the coins as original Fig. 1.
coin so these systems can be fooled easily.

13
International Journal of Computer Applications (0975 – 8887)
Volume 26– No.4, July 2011

Step 4. Find the maximum value from the Hough M atrix.


Acquire RGB Coin Image
The corresponding indices give the center
coordinates and radius of coin.
Now based on the center coordinates and radius, the coin is
Convert RGB Image to Grayscale extracted from the background. So, in this way the shadow of
the coin is removed. Fig. 3 shows a coin with shadow and Fig. 4
shows the coin without shadow after applying Hough
Remove Shadow from Image Transform.

Crop and Trim the Image

Generate Pattern Averaged Image

Generate Feature Vector and pass it as


Input to Trained NN Fig. 3: Image with S hadow Fig. 4: Image without Shadow

3.4 Crop and Trim the Image


Give Appropriate Result according to the After shadow removal the image is cropped so that we just have
Output of NN the coin in the image. Then after cropping, coin image is
trimmed to make it of equal dimension of 100 × 100.
Fig. 1: Architecture for Automated Coin Recognition System

3.1 Acquire RGB Coin Image


This is the first step of coin recognition process. In this step the
RGB coin image is acquired. Indian coins of denominations `1,
`2, `5 and `10 were scanned from both sides at 300 dpi (dots
per inch) using color scanner as shown in Fig. 2. Five coins of
each denomination were scanned.

3.2 Conve rt RGB Coin Image to Grayscale Fig. 5: Cropped Image Fig. 6: 100×100 Trimmed
From the first step the image we got is a 24-bit RGB image. Image
Image processing of colored images takes more time than the
grayscale images. So, to reduce the time required for processing 3.5 Generate Pattern Averaged Image
of images in further steps it is good to convert the 24-bit RGB The 100×100 trimmed coin images become the input for the
image to 8-bit Grayscale image. trained neural network. But to reduce the computation and
complexity in the neural network these images are further
3.3 Remove Shadow of Coin from Image reduced to size 20×20 by segmenting the image using segments
In this step, shadow of the coin from the Grayscale image is of size 5×5 pixels, and then taking the average of pixel values
removed. As all the coins have circular boundary. So, for within the segment. This can be represented by mathematical
removing shadow Hough Transform for Circle Detection [9] is equations, as shown in (1) and (2):
used. For this first of all edge of the coin is detected using Sobel 5 5
Edge Detection. Following is the pseudo code for Hough Sumi Pijk
Transform: j 1 k 1
Step 1. Define a 3-dimensional Hough M atrix of (M × N × …(1)
R), where M , N is the height and width of the Sumi
Grayscale image and R is the no. of radii for which SegAvgi
25 …(2)
we want to search.
where i, j, k is the segment no., row no. and column no. of a
Step 2. For each edge pixel (x, y) and for particular radius particular segment respectively, Sum i is the sum of the pixel
r, search circle center coordinates (u, v) that satisfy values Pijk of the segment i, SegAvgi is the average of pixel
the equation (x-u)2+(y-v)2=r2 and increase count in
values of segment i.
Hough M atrix at (u, v, r) by 1.
Step 3. Repeat step 2 for other radii.

14
International Journal of Computer Applications (0975 – 8887)
Volume 26– No.4, July 2011

(v) (vi)
(i) (ii) (iii) (iv)

(vii) (viii) (x) (xii)


(ix) (xi)

(xiii) (xiv)
Fig. 2: Indian Coins of different Denominations; (i) Head of `1 coin (1st type), (ii) Tail of `1 coin (1st type), (iii) Head of `1 coin (2nd
type), (iv) Tail of `1 coin (2nd type), (v) Head of `2 coin (1st type), (vi) Tail of `2 coin (1st type), (vii) Head of `2 coin (2nd type), (viii)
Tail of `2 coin (2nd type), (ix) Head of `5 coin (1st type), (x) Tail of `5 coin (1st type), (xi) Head of `5 coin (2nd type), (xii) Tail of `5
coin (2nd type), (xiii) Head of `10 coin, (xiv) Tail of `10 coin

3.6 Generate Feature Vector and pass it as that to which denomination the given coin belongs i.e. if coin
gets classified in one of the class from (i) to (iv) then we say it is
Input to Trained NN
In this step, a feature vector is generated from the pattern a `1 coin. Similarly, for other classes we give ap propriate result.
averaged coin image. The 20×20 image generates a feature In Fig. 8 snapshot of the tool developed is given in which a `10
vector of dimension 400×1 i.e. all the pixel values are put into a coin is recognized.
vector of 1 column. Then, this feature vector of 400 features is
passed as input to trained neural network. Fig. 7 gives the 4. TRAINING AND TESTING DATA
architecture of Trained Neural Network. Five samples of each denomination of Indian coins are scanned
from both sides as shown in Fig. 2. So, it results to 10 images
for each coin. But for `1, `2 and `5 two types of coins are used.
So for each of these denominations there are 20 images from
which 10 (5 for head and 5 for tail) are of 1 st type and other 10
(5 for head and 5 for tail) are of 2 nd type. Then after
preprocessing when we get images of 100×100 then these
images were rotated to 50, 100, 150,….,3550 i.e. total 72 rotated
Fig. 7: Architecture of Trained Neural Network
images get generated for each image. So there are 20*72=1440
images for each of `1, `2 and `5 but 10*72=720 images for `10.
3.7 Give Appropriate Result according to the So there are total 1440*3+720=5040 images. So we trained the
neural network by randomly selecting images from these 5040
Output of Neural Network
Coins are classified into 14 categories as shown in Fig. 2. The images. 90% of 5040 images were used for training, and then
neural network classifies the given coin image into one of these 5% images were used for testing and rest 5% were used for
class and based on the classification the results get generated validation.

15
International Journal of Computer Applications (0975 – 8887)
Volume 26– No.4, July 2011

Fig. 8: S napshot of Automated Coin Recognition S ystem


coins get classified by trained NN. It is clear from the figure that
5. RESULTS 97.74% correct recognition has been achieved which is quite
Fig. 9 gives the resultant values of M SE (M ean Square Error)
and %E obtained after training, testing and validation. Training encouraging. So, there is only 2.26% misclassification.
of the network takes 148 epochs in total. Fig. 10 shows the
performance of network for each training, testing and validation.
The best validation performance is achieved at epoch 142. The
Fig. 11 shows the confusion matrix for Neural Network. In
confusion matrix Target classes are the classes to which the coin
actually belongs and Output classes are the classes in which the
Fig. 9: Results after Training, Testing and Validation of NN

Fig. 10: Performance of Neural Network

16
International Journal of Computer Applications (0975 – 8887)
Volume 26– No.4, July 2011

Fig. 11: Confusion Matrix of NN

Table 1: Recognition Results 2.26% images get miss-recognized; the result is quite
encouraging.
S r. No. Coin Type Images Recognition
correctly Rate
recognized / 7. REFERENCES
(in %age) [1] Cai-ming Chen, Shi-qing Zhang, Yue-fen Chen, "A Coin
Total no. of
Recognition System with Rotation Invariance," 2010
images
International Conference on M achine Vision and Human-
1 `1 1412/1440 98.05 machine Interface, 2010, pp. 755-757.
2 `2 1426/1440 99.03
[2] Thumwarin, P., M alila, S., Janthawong, P. and Pibulwej,
3 `5 1368/1440 95 W., “A Robust Coin Recognition M ethod with Rotation
4 `10 720/720 100 Invariance”, 2006 International Conference on
Total 4926/5040 97.74 Communications, Circuits and Systems Proceedings, 2006,
pp. 520-523.
[3] Shen, L., Jia, S., Ji, Z. and Chen, W.S., “Statictics of
6. CONCLUSION Gabor features for coin recognition”, IEEE International
An ANN based automated coin recognition system has been Workshop on Imaging Systems and Techniques, 2009, pp.
developed using M ATLAB. In this system, firstly preprocessing 295 - 298.
of the images is done and then these preprocessed images are
[4] Gupta, V., Puri, R., Verma, M ., “Prompt Indian Coin
fed to the trained neural network. Neural network has been Recognition with Rotation Invariance using Image
trained, tested and validated using 5040 sample images of Subtraction Technique”, International Conference on
denominations `1, `2, `5 and `10 rotated at 50, 100, 150…., Devices and Communications (ICDeCom), 2011
3550. Experiments show that the system provides 97.74% [5] P. Davidsson, “Coin classification using a novel technique
correct recognition rate from 5040 sample images, i.e., only for learning characteristic decision trees by controlling the
degree of generalization”, Ninth International Conference

17
International Journal of Computer Applications (0975 – 8887)
Volume 26– No.4, July 2011

on Industrial & Engineering Applications of Artificial [8] Khashman A., Sekeroglu B. and Dimililer K., “Intelligent
Intelligence & Expert Systems, 1996. Coin Identification System”, Proceedings of the IEEE
[6] Fukumi M . and Omatu S., "Rotation-Invariant Neural International Symposium on Intelligent Control ( ISIC'06 ),
Pattem Recognition System with Application to Coin M unich, Germany, 4-6 October 2006, pp. 1226-1230.
Recognition", IEEE Trans. Neural Networks, Vol.3, No. 2, [9] Roushdy, M., “Detecting Coins with Different Radii based
pp. 272-279, M arch, 1992. on Hough Transform in Noisy and Deformed Image”, In
[7] Fukumi M . and Omatu S., "Designing A Neural Network the proceedings of GVIP Journal, Volume 7, Issue 1, April,
For Coin Recognition By A Genetic Algorithm", 2007.
Proceedings of 1993 International Joint Conference on
Neural Networks, Vol. 3, pp. 2109-2112, Oct, 1993.

18

You might also like