You are on page 1of 16

2012

Islamic University of Lebanon Biomedical Engineering 5th year

Cours:

pattern classification.

Project : Image based recognition of coins.

Presented to: Dr.Ahmad Faour. Prepared by: Mohamad Meneam Ali Diab Charbel Mojally. Hassan Danach.

Page

Page

Acknowledgments
First and foremost, we would like to thank the Head of Biomedical Engineering Department in the Islamic University of Lebanon Dr. Mohammad Ayach for the valuable guidance and advice, and for his assistance and care. Beside, we would like to thank the project supervisor and coordinator Dr.Ahmad Faour who inspired us greatly to work. Also, it was a big opportunity to be a part of Islamic University , where we worked with brave peoples who gave us the support, sustenance and help, and who did their best to assure success for our training period.

Page

Table of Contents

Acknowledgment: ............................................................................................................ 3 Abstract : ..........................................................................................................................5 Introduction: ................................................................................................................... 6 Previous works: ....................................................................................................7 Presentation of problem: ................................................................................................ 8 Pattern classification:.......................................................................................................9 Proposed solution:.......................................................................................................10 Proposed matlab algorithm:...........................................................................................11 Testing the algorithm and validation:..........................................................................13 References:..............................................................................16

Page

Abstract :
The objective of this project is to classify recently released LEBANESE coins of different denomination. The objective is to recognize the coins Lebanese Coins are released with different values and are classified based on different parameters of coin such as shape, size, surface, weight and so on. But in this project we take size in consideration for reason of simplicity. This project concentrates on affine transformations such as simple gray level scaling, shearing, rotation etc. The coins are well recognized by zooming processes by which a coin size of the image is increased. To implement the coin classification, code is written in Matlab and tested with simulated results. A method is proposed for realizing a simple automatic coin recognition system more effectively..

Page

Introduction:
In all walks of life, machine automation is essential to make sophisticated approach to the mankind. Of course the machines cannot be replaced by human beings in exact recognition of coins. Nowadays, most of the work of the human being is replaced by machines. The coin classification of various denominations and finding the sum of the coins is a tedious process. Coin counting machine is user friendly and makes customer operation a breeze. This machine is equipped with an operating system. This counting machine has a display and prompts the customer to operate the system. Coin sorting machine is attached with required number of International Journal of Advanced Science and Technology Vol. 31, June, 2011 68 tagged bags to collect appropriate denominations of coin. Dirty coins require machine cleaning frequently. The polar coordinate of coins outer edge with coin center which represents radii is used for recognition of the coin. Finally, the database of the coin is fed to the recognition system to classify easily.Nowadays, ancient coins are becoming subject to a very large illicit trade. Thus, the interest in reliable automatic coin recognition systems within cultural heritage and law enforcement institutions raises rapidly. Traditional methods to fight the illicit traffic of ancient coins comprise manual, periodical search in auctions catalogues, field search by authority forces, periodical controls at specialist dealers, and a cumbersome and unrewarding internet search, followed by human investigation. However, these methods only prevent the illicit trade of ancient coins in a rather partial way. To date, no automatic coin recognition system for ancient coins has been researched and thus applied successfully. Recent research approaches for coin classification algorithms focus solely on the recognition of modern coins. Applied pattern recognition algorithms are manifold ranging from neural networks to eigenspaces , decision trees , edge detection and gradient directions,and contour and texture features. Tests performed on image collections both of medieval and modern coins show that algorithms performing good on modern coins do not necessarily meet the requirements for classification of medieval ones . Main difference between ancient and modern coins is that the ancient coins have no rotational symmetry and consequently their diameter is unknown. Since ancient coins are all too often in very poor conditions, common recognition algorithms can easily fail. The features that most influence the quality of recognition process are yet unexplored. The COINS project addresses this research gap and aims to provide an efficient image based algorithms for coin classification and identification.

Page

Previous Works:
Several coin recognition approaches are mentioned in the literature. Fukumi et. al. describes a system based on a rotation-invariant neural network which is capable of distinguishing Japanese coins , 500 yen and a 500 won piece. Rotational invariance is achieved by explicitly generating the rotational group for a coarse model of the coin in a pre-processing step and feeding the results into a neural network. The drawback of the neural network approach is that, it takes much time to train. Davidsson compares several strategies, namely induction of decision trees, neural networks and Bayesian classifiers. He derives a decision tree algorithm to accept or to reject the coins. However, it is difficult to extend the approach to images. Adameck et al. presented an interesting method for a coin recognition system based on colour images . The basic idea of the method of detecting a straight line in coins image is discussed by Earl Gose, Richard Johnson Baugh, Steve Jost. The criteria for coin classification based on gray-level, color, texture, shape, model, etc, are discussed by R.Bremananth. The method which specifically addresses coin segmentation based on color or gray value is reported by P.Thumwarin and Petra Perner Many serious problems like shape of the coin, peak detection in surface of the coins are attempted by Reinhold Huber, but, it does not yield much result. Hence, it is proposed to use Roberts edge detection method, Laplacian of Gaussion edge detection method, Canny edge detection method and Multi-Level Counter Propagation Neural Network (ML-CPNN).

Page

Presentation of problem : . In our time many stores and supermarkets and banks have every day a honorable number of coins of different weight (coins weighted 250 and coins weighted 500) to count and classify but manually this classification take a big time and effort so what is the solution????

Page

Pattern classification : .
There are two basic approaches in pattern recognition. They are statistical approach and structural approach. In the first approach, the pattern is represented as a vector in a feature space. Then a decision algorithm, which is mainly based on the statistical concept, is used to decide to which class the pattern belongs. In the structural method, the pattern is represented by its structure. For example, a string of symbols, a graph connecting the primary elements, etc. The statistical method can be broadly classified into classical and Artificial Neural Networks (ANN) approaches. No single technique or model is suited for all Pattern Recognition (PR) problems. Hence, different types of PR approaches are to be adopted. The coin classification technique is based on the following assumptions and computations. i) The coins should move on a conveyor belt. ii) Proper lighting is to be focused on the coin. iii) Each coin is separated and fed to the system for recognition. iv) Coins are weighed accurately. v) Both sides of the coin are to be collected. vi) The side view of the coin image can be captured. vii) The coin image can be rotated by any degree. viii) The Circular, Hexagon, Octagon, Polygon shape of coins radius are measurable. ix) The coin Circumference/Perimeter and area are to be computed. x) The thickness of each coin can be computed by the system. xi) The coin images with 256 gray values are to be computed. xii) The coin average gray values are computable.

Page

Proposed solution:
Any picture taken by a camera for a set of coins is transformed from colored image to a binary image by calculating a appropriate threshold and the pixels in each of the white regions of the image were given a unique numeric label using the region-labeling algorithm. Next we perform region felling to fill the hall in processed image this are eliminated by region filling after we have a white square shape with different size . Next we calculate the size of each coins(white square shape) and based in the difference of shape we classify coins between coins of 250 and coins of 500. After we calculate the center of gravity of each coins .the goal of the calculation of center of gravity is to make a label in the center of gravity after the calculation.

Page

10

Proposed matlab algorithm:


clc clear all close all I = imread('C:\Users\Adam\Desktop\test1.jpg'); figure, imshow(I, [ 0 255]) level = graythresh(I); Bw = im2bw(I, level); figure, imshow(Bw, [ 0 1]) Bwfil = imfill(Bw,'holes'); figure, imshow(Bwfil, [ 0 1]) [L,num] = bwlabel(Bwfil,8); Cx =[]; Cy =[]; Type=[]; for i=1:num [xx, yy] = find(L==i); Cx(i)= floor(sum(xx)/length(xx)); Cy(i)= floor(sum(yy)/length(yy)); if length(xx)<=13600 Type(i) = 0; else Type(i) = 1 end end

Page

11

figure, imshow(I, [0 255]) hold on plot(Cy, Cx, 'r+'); for i=1:num if Type(i)==0 T2='250'; else T2='500'; end text(Cy(i), Cx(i)+10,0,T2,'FontSize',10, 'color', 'red'); end hold off

Page

12

Testing the algorithm and validation:


We learn the system by test1 and test2 (base dappretissage)

Figure1: test 1 .

Figure2: test1 after classification .

Page

13

Figure 3: test2.

Figure4 :test2 after classification.

Page

14

We test the system by test 3 and let see the result

Figure5:test3.

Figure6 :test3 after classification.

Page

15

References

[1] Adameck. M, Hossfeld.M, and M. Eich, (2003), Three color selective stereo gradient method for fast topography recognition of metallic surfaces, Proceedings of Electronic Imaging, Science and Technology (Martin A. Hunt and Jeffery R. Price, eds.), Machine Vision Applications in Industrial Inspection XI, vol. SPIE 5011, pp. 128139. [2] Bremananth.R, B.Balaji, M.Sankari, A.Chitra, (2005), A New approach to Coin recognition using Neural Pattern Analysis, IEEE Indicon Conference, pp 366-370. [3] Davidsson.P, (1996), Coin classification using a novel technique for learning characteristic decision trees by controlling the degree of generalization, Ninth International Conference on Industrial and Engineering Applications of Artificial Intelligence & Expert Systems (IEA/AIE-96), Gordon and Breach Science Publishers, pp. 403412. [4] Fukumi.M, Mitsukura.Y, Norio Akamatsu, (2000), Design and Evaluation of neural Networks for Coin Recognition by using GA and SA, IEEE, pp 178-183.

Page

16

You might also like