Currency-Recognition-System-Using-Image-Processing
Currency-Recognition-System-Using-Image-Processing
ISSN 2229-5518
IJSER
works accurately and also able to quickly identify the
currency notes. image, which needs to be checked. Then system
performs basic image processing techniques on input
Keywords—Image Processing, BGR to Greyscale, image and refined to convert it into a usable input for
Binary Threshold, Currency Name, Currency matching with present image in dataset. The system
Denomination (Value), Trained Dataset, Current extracts the information from image based on features
Exchange Rate. such as colour and texture. With the help of these
features the system determines currency name and
I. INTRODUCTION denomination of the currency note. After this the
According to the UN charter there are around exchange rate of currency will be extracted from internet
195 countries around the globe. In which 193 countries with the help of online exchange rate api url. At the end
are members of the UN and two are observing states. output displayed on the screen.
According to The U.N., worldwide there are 180
currencies. All these currencies are different in A. RELEVANCE
characteristics such as size, colour and texture. In the era The proposed system is built with the motive to
of rapidly growing levels of trade between countries and help common people for currency recognition at anytime
also tourism all over the world, it becomes necessary to and anywhere. When people see a new currency that
recognize each currency note correctly. Now a days doesn’t belong to their native country then they face
people travel to different countries, they use their native many issues in recognition that currency’s value, origin
country currency in paying bills or buying stuffs and country and also face difficulties in finding the exchange
because most of the local people are not familiar with rate. It is need to develop a system which will help
the currency other than their own country currency and people to identify currency value, currency name and
also not familiar with the exchange rate of that currency exchange rate only by providing currency image.
in their own currency, it becomes necessary to develop In this paper we proposed an automation system
an automated system that helps in recognition notes for easily recognition of currency. The system uses
easily, faster with efficiency. digital image processing techniques to extract
The proposed system is based on image information from inserted image and match with the
processing and makes the process robust and automatic. template images.
IJSER © 2020
http://www.ijser.org
International Journal of Scientific & Engineering Research Volume 11, Issue 4, April-2020 1596
ISSN 2229-5518
To implement image processing techniques we frameworks. NumPy and OpenCv are the two
used python as programming language because it is frameworks which are used to perform image processing
much easier to implement digital image processing by functionalities and Tkinter is used to design applet of the
using python because of its pre-defined packages and application.
II. LITERATURE SURVEY The trained data set is created using the backpropagation
[1] In 2010, ‘K. K. Debnath et al’ proposed a system algorithm. Axis symmetric mask is used in the pre-
for currency recognition using Ensemble Neural processing stage for correct recognition of currency
Network (ENN). In this model, negative correlation notes. They used eight TAKA notes for testing the
learning is used to train the Individual Neural Networks system and the result was successfully recognition of all
IJSER
(NNs) in an ENN. They used different types of notes notes.
such as noisy and old notes because the machine doesn’t
easily recognize such notes. That’s why ENN is used to [4] In 2013, ‘Qing and Xun’ proposed a model
develop a system to identify them easily and correctly. which was based on Artificial Neural Networks and
For testing, they used different dominations notes, which Gene Algorithm. ANN and Gene algorithm are problem-
are of 2, 5, 10, 20, 50, 100 and 500 TAKA. The system solving techniques. Gene Algorithm had used because of
firstly converts the note image into greyscale and then slow convergence and indeterminate initial weights for
the image is compressed. After compression, the backpropagation neural networks. The Gene Algorithm:
compressed image is processed to the system as an input Back Propagation takes short training time with faster
for recognition. Due to ENN, the system can easily recognition speed and provides the appropriate result of
identify the currency with noise as well as old currency connection weights and network connection.
notes. The system has fewer chances of misclassification
because of independent training. [5] In 2000, ‘Y. Mitsukura et al’ proposed a model
that depends on Artificial Intelligence methods and
[2] In 2010, ‘J. Guo et al’ proposed a model that adaptive systems, combining Neural Network methods
uses the Local Binary Pattern (LBP) algorithm for paper with the help of the Simulated Annealing Method. The
currency recognition. It extracts currency features with proposed system was low cost with a recognition rate
good quality for efficient recognition of currency notes. result of 99.68%. The result was achieved by developing
LBP algorithm is used for the extraction of small size neural network for coin recognition with the
characteristics of a currency. LBP algorithm is based on help of a genetic algorithm and simulated annealing.
the LBP method and the LBP method has the advantage
of simplicity and high speed. III. OBJECTIVE of the SYSTEM
The main objective of this system is to recognize
[3] In 2011, ‘Jahangir and Raja’ proposed a system currency using image processing technique.
to recognize Bangladeshi currency with the help of the The system performs image processing on inserted
neural network recognition method. This method had image and match with trained data set.
implemented on cost-effective hardware so that can be To save user time it needs device should be
used in different places. The system takes a currency connected to internet so that it can extract current
note image as input and notes are scanned using sensors.
IJSER © 2020
http://www.ijser.org
International Journal of Scientific & Engineering Research Volume 11, Issue 4, April-2020 1597
ISSN 2229-5518
exchange rate of that currency into other mainly A. METHODOLOGY
used currencies. For Image processing and Template matching:
For using this no need for high specs hardware and 1. img = cv2.imread(filename) /*for taking input
easy to use. image and read that image*/
2. gray_img=cv2.cvtColor
IV. PROPOSED MODEL (img,cv2.COLOR_BGR2GRAY) /*conversion of
Flowchart for proposed system Fig. 2: input image from BGR to Greyscale.*/
1. Start 3. temp ="0" /*initializing a variable temp with 0
2. Give input as image (JPG/PNG/GIF format). value*/
3. Conversion of image from BGR to Greyscale. 3.1. entries = os.listdir("trained_data/") /*obtaining
4. The Binary Threshold value will be assigned with list of all files/directories from trained dataset.*/
the pixels of greyscale image. 4. for entry in entries:
5. Match the greyscale image with template image. 4.1. template = cv2.imread("trained_data/"+entry,
6. If image matched with the trained data set then show cv2.THRESH_BINARY) /*Assigning binary
the defined output. And if not matched with any threshold value to the entered greyscale image
image in data set then return error with message. pixels, 1 for white pixels and 0 for black
7. Stop the process pixels.*/
4.2. w, h = template.shape[::-1] /* w= width and
h=height and template.shape used to find and
search location of a template image in greyscale
image.*/
4.3. result = cv2.matchTemplate(gray_img, template,
cv2.TM_CCOEFF_NORMED) /*compare a
IJSER
template with the overlapped image regions.*/
4.4. loc = np.where(result >= 0.4) /* returns indices
of image where matching satisfies.*/
4.5. for pt in zip(*loc[::-1]):
cv2.rectangle(img, pt, (pt[0] + w, pt[1] + h), (0,
255, 0), 0)
4.6. temp=entry
break
4.7. imageid = temp.replace(".jpg","")
print(">>> Recognized with Image Id : " +
imageid)
5. if imageid is None: /* if image doesn’t match with
any image in trained dataset.*/
5.1. window.windows.error("Sorry Image Not
Recognised") /* gives error with message in
applet window.*/
6. else:
6.1. imageid = int(imageid) – 1 /* and when image
match with template image.*/
6.2. if currencydata[int(imageid)]['currency'] ==
"Indian Rupee": /* if inserted image matched
with Indian Currency template image.*/
url =
https://api.exchangeratesapi.io/latest?base=INR
/* url for getting live exchange rate in USD and
Euro.*/
6.2.1. response = requests.get(url) /*
requesting exchange rate from url
Fig. 2 Flowchart of the system server.*/
IJSER © 2020
http://www.ijser.org
International Journal of Scientific & Engineering Research Volume 11, Issue 4, April-2020 1598
ISSN 2229-5518
6.2.2. data = response.text /* reading response 6.3.3. response = requests.get(url) /*
data text from server.*/ requesting exchange rate from url
6.2.3. parsed = json.loads(data) /* Loading server.*/
parsed for using json data into python.*/ 6.3.4. data = response.text /* reading response
6.2.4. date = parsed["date"] /*parsing of data text from server.*/
date.*/ 6.3.5. parsed = json.loads(data) ) /* Loading
6.2.5. eur_rate = parsed["rates"]["EUR"] /* parsed function for using json data into
parsing of Euro exchange rate w r t python.*/
INR.*/ 6.3.6. eur_rate = parsed["rates"]["EUR"]
6.2.6. usd_rate = parsed["rates"]["USD"] /* /*parsing of Euro exchange rate w r t
parsing of USD exchange rate w r t USD.*/
INR.*/ 6.3.7. inr_rate = parsed["rates"]["INR"]
6.2.7. print("Currency Value : " , /*parsing of USD exchange rate w r t
currencydata[int(imageid)]['value']) INR.*/
/*for printing currency value on output 6.3.8. print("Currency Value : " ,
screen.*/ currencydata[int(imageid)]['value'])/*for
6.2.8. print("Currency Name : " , printing currency value on output
currencydata[int(imageid)]['currency']) screen.*/
/*for printing currency name on output 6.3.9. print("Currency Name : " ,
screen.*/ currencydata[int(imageid)]['currency'])
6.2.9. print("Currency value In EUR:" , /*for printing currency name on output
eur_rate*currencydata[int(imageid)]['val screen.*/
ue']) /* for printing exchange rate in 6.3.10. print("Currency value In EUR:" ,
IJSER
EURO on output screen.*/ currencydata[int(imageid)]['value'] *
6.2.10. print("Currency value In USD:" , eur_rate) /* for printing exchange rate in
usd_rate*currencydata[int(imageid)]['va EURO on output screen.*/
lue'] ) /* for printing exchange rate in 6.3.11. print("Currency value In INR:" ,
US Dollar on output screen.*/ currencydata[int(imageid)]['value'] *
6.2.11. currvalue = inr_rate ) /* for printing exchange rate
currencydata[int(imageid)]['value'] /* in INR on output screen.*/
obtaining currency value from trained 6.3.12. currvalue=currencydata[int(imageid)]['v
dataset.*/ alue'] /* obtaining currency value from
6.2.12. currname=currencydata[int(imageid)]['c trained dataset.*/
urrency'] /*obtaining currency name 6.3.13. currname=currencydata[int(imageid)]['c
from trained dataset.*/ urrency'] /* obtaining currency name
6.2.13. curreur=eur_rate*currencydata[int(imag from trained dataset.*/
eid)]['value'] /*For getting currency 6.3.14. curreur=currencydata[int(imageid)]['val
exchange rate with respect to euro. */ ue'] * eur_rate /*printing current
6.2.14. currusd = usd_rate * exchange rate with respect to USD.*/
currencydata[int(imageid)]['value'] 6.3.15. currinr=currencydata[int(imageid)]['val
/*printing current exchange rate with ue'] * inr_rate /*printing current
respect to USD.*/ exchange rate with respect to INR.*/
6.2.15. window.windows.getind(currvalue, 6.3.16. window.windows.getusd(currvalue,
currname, curreur, currusd,self) /* for currname, curreur, currinr,self) /*for
displaying output on application displaying output on application
window.*/ window.*/
6.3. else:
6.3.1. url="https://api.exchangeratesapi.io/late For applet:
st? 1. Imported frameworks and modules Fig. 3:
6.3.2. base=USD" /* url for getting live
exchange rate in INR and Euro.*/
IJSER © 2020
http://www.ijser.org
International Journal of Scientific & Engineering Research Volume 11, Issue 4, April-2020 1599
ISSN 2229-5518
4. ‘Reset’ button:
B. SYSTEM DESCRIPTION
Fig. 3 Frameworks and Modules
Input Image: An image file having extension
2. ‘Open Image’ button: JPG/PNG/GIF will be provided initially. The image
should be of currency notes (INR, USD). It can take
USD (1, 2, 5, 10, 20, 50, 100) and INR (1, 2, 5, 10, 20,
100, 200, 500, 2000).
IJSER
Value 1 is assigned to white pixels and 0 to black pixels.
V. RESULT
Firstly we run the application, welcome window
will open as in Figure 7. Welcome window have 4
buttons ‘Open Image’, ‘Recognize’, ‘Result’ and ‘Exit’
button.
Open Image: When you click on this button then it will
Fig. 5 Recognize button direct you to memory and ask you to select image of
IJSER © 2020
http://www.ijser.org
International Journal of Scientific & Engineering Research Volume 11, Issue 4, April-2020 1600
ISSN 2229-5518
currency. After selecting an image you will
automatically return to the window and your selected
image will be visible in application window as in Fig. 9.
Recognize: This button is used for currency recognition.
After pressing this button currency recognition will start
and you will get output in few seconds on the
application window as in Fig. 12.
Reset: This button is used to clear the application
window.
Exit: This works as simple exit button, you will come
out of the application and all processes of application
will be terminated.
IJSER
Fig. 7 Welcome window
IJSER © 2020
http://www.ijser.org
International Journal of Scientific & Engineering Research Volume 11, Issue 4, April-2020 1601
ISSN 2229-5518
The final output will contain Currency Value, Currency 10. https://www.googlescholar.com
Name, Value in Euro and Value in INR/Value in USD. 11. https://www.geeksforgeeks.org/digital-image-
And output will also show the country flag. processing/
12. https://www.elprocus.com
13. https://www.worldometers.info/geography/
14. https://www.worldatlas.com/articles/how-many-
currencies-are-in-the-world.html
REFERENCES
IJSER
1. Pearson Book on Digital Image Processing 4th
Edition By Gonzalez (2018).
2. Programming and Problem Solving with Python 1st
Edition by ‘Ashok Namdev Kamthane’ and ‘Amit
Ashok Kamthane’ 2017
3. Identification of Paper Currency Techniques: A
Survey by S. Sahu and T. Verma International
Journal of Science Technology & Engineering
(2016)
4. Recognition system for real time paper currency.
IEEE 2012.
5. Extraction of serial number on bank notes. IEEE.
6. Digital Image Processing And Analysis: Human
And Computer Vision Applications With Cviptools,
2nd Edition by Scott E Umbaugh, T and F India.
7. An intelligent system for paper currency recognition
- robust features Journal of Intelligent & Fuzzy
Systems - A. Sargano, M. Sarfrazb, and N. Haq,
2014.
8. Paper Currency Recognition - Journal of Advanced
Computer Science and Technology Research ,
‘Althafiri E, Sarfraz M’, ‘Alfarras M. Bahraini’.
9. Study of Printing Identification Based on Multi-
spectrum Imaging Analysis, Proceedings of the
International Conference on Computer Science and
Software Engineering, By Liu Q, Tang L. p. 229 –
232; 2008.
IJSER © 2020
http://www.ijser.org