ROI based Indonesian Paper Currency Recognition Using Canny Edge Detection

Paper currency recognition is important for automatic payment system. The paper performs a nominal paper detection process using image processing with canny method implemented in python programming language. The canny method is used to find edge features in the nominal currency. By using template matching of image reference, region of interest (ROI) of nominal value is extracted so that it can be used in any orientation of paper currency image. The ROI of nominal image is processed by canny edge method and spatial transformation to strengthen the image features and being processed by template matching to decide nominal currency. The study has successfully tested nominal value of 1000, 2000, 5000, 10000, 20000, 50000, and 100000 Indonesia banknotes which then the currency value will appear in the value variable in python. Keywords— paper currency recognition, image processing, canny method, python, OpenCV.


I. INTRODUCTION
Cash transaction is part of our daily life. When conducting cash transactions, there is often a mistake because the conditions of money and texture are almost the same. This certainly will be detrimental when making payments for such items. This condition can occur anywhere with anyone when a transaction is carried out in cash and this will result in a loss for either party. This loss led to ideas to be able to create a system which can detect nominal paper currency quickly and accurately in the hope that the computer or the system can recognize the paper currency.
Banknotes is money made from paper with certain images and stamps and is a legal payment instrument. Paper money has value because of its nominal value. Therefore, paper money only has two kinds of values, namely nominal value and exchange rate. Current Indonesia banknotes can be seen in Figure 1.
Paper currency recognition (PCR) system is an important area of pattern recognition. A system for the recognition of paper currency is one kind of intelligent system which is a very important need of the current automation systems in the modern world of today. It has various potential applications including electronic banking, currency monitoring systems, money exchange machines, etc .
This system is built with several methods of image processing, from segmentation, then detection of nominal currency margins, and improving image detection results. Then the detection results will be extracted into variables that will be recognized by the computer for further processing. Python was chosen as a programming language assisted by several libraries such as OpenCV and pytesseract for the extraction of images obtained into digit variable numbers.

Figure 1. List of Indonesia Banknotes
The system presented is designed to recognize paper currency. Input to the system is an image acquired by a scanner or a digital camera, containing the paper currency and its output is the features of the paper currency. The system consists of the modules: Image acquisition, pre-processing including noise removal, feature extraction, classification and recognition.
Research of paper currency recognition has been conducted using image processing [1][2] with improved computational intelligence improvement using neural network [3][4] [5] and fuzzy algorithm [6]. Indonesia banknotes paper currency recognition system has been developed [7] [8]. The contribution of this paper is algorithm improvement to preprocess image so that it can handle image with variety of orientation. Another contribution is a validation that Canny detection method can improve accuracy of detection.

A. Digital Images
Digital image is an image of f (x, y) that has been digitalized both the area coordinates and the brightness level. The f value in the coordinates (x, y) shows the brightness or grayness level of the image at that point. Digital images are represented by a matrix consisting of M columns and N rows where the intersection between columns and rows is called a pixel (pixel = picture element), which is the smallest element of an image [9] . Digital image processing is a process that aims to analyze images with the help of computers.

B. Template Matching
Template matching is a technique in digital image processing to find small parts of an image that matches a picture template that functions to match each part of an image with an image that becomes a template (reference). Template matching is widely used in processing vision at a simple level to localize and identify image patterns Template matching is one technique in digital image processing that functions to match each part of an image with an image that becomes a template (reference). The principle of this method is to compare the object image that will be recognized with the existing image template. Image objects that will be recognized have their own level of resemblance to each image template. Recognition is done by looking at the highest similarity value value and the threshold value of the introduction of the object's image. If the similarity value is below the threshold value, the object's image is categorized as an unknown object.

C. Canny Methods
One of the edge detection operators is the Canny edge detection developed by John F. Canny [10]. There are some of the most optimum edge detection criteria with the Canny algorithm as follows

1) Detect well (detection criteria)
The ability to place and mark all edges in accordance with the selection of convolution parameters made. While also providing a very high flexibility in determining the level of detection of the desired edge thickness.

2) Localize well (localization criteria)
With Canny it is possible to produce the minimum distance between the edge detected and the original edge.

3) Clear response (response criteria)
There is only one response for each edge, so that it is easily detected and does not cause confusion in subsequent image processing. The choice of Canny edge detection parameters greatly affects the results of the resulting edges. Some of these parameters are the Gaussian standard deviation and the threshold value.

III. SYSTEM DESIGN
This system is designed with several stages, both in image calling, image processing, cropping, and extraction. The system flow diagram in this study is shown in Figure 2.
In proposed system a high resolution scanner or camera is employed to acquire the image. The acquired image then converted into grayscale. Using reference template image, the grayscale image is correlated to find the reference position. Region of interest which is image of nominal value is selected using reference position, so it is possible to use the algorithm with variety of orientation. Selecting region of interest simplify the computational complexity. The edge of the ROI image is filtered using Prewitt method. Then, the image edge is detected using Canny's edge detection method and further processed using binary threshold to produce clear image. The resulting image is detected using template matching or optical character recognition to extract the nominal information.

Figure 2. System Flow Diagram
The matching template is used to determine the merit of each currency which will later be used as a position parameter in determining the nominal of the currency to be detected.  Then, the ROI target image is selected with position and orientation in accordance to reference coordinate. The ROI image adapt the orientation of reference image in its translation, rotation and scale. Using ROI instead of whole image processing also significantly reduce computational complexity.

Figure 5. ROI Target in accordance to reference cordinate
The results of further processing will be region of interest. Followed by image processing with canny and binary threshold.  Based on research conducted, the system successfully detect sample currency image without error qualitatively. Each currency nominal is detected and can be extracted with variable results in the form of numeric digits according to the currency's nominal value.
However, in its application it could be the size and pixel in each different currency which will affect the matching template in the cropping process. With the acquisition position of the results of cropping incorrectly will affect the nominal currency readings do not match the desired target. The performance of the system also has not been calculated or simulated quantitatively.

V. CONCLUSION
This paper conduct paper currency recognition with ROI based processing and canny edge detection. It is shown that ROI based image detection reduce computational complexity and add flexibility of acquired image. The canny method is continued with a threshold binnay which is very appropriate to do in this study because it gets results that are very close to the nominal character that is being targeted. The difference in the size and pixel of the banknote that is used as a sample will affect the process of reading the target, because when the size and pixel are different from the compiled code will get a different target. This system can be implemented and developed directly in the cash transaction process.

VI. FUTURE WORKS
Performance evaluation with quantitative measurement should be conducted using method in this paper. The practical experiment with nonideal environment is a challenge in paper currency recognition system VII. ACKNOWLEDGEMENT