Thai Amulet Recognition Using Simple Feature Thanachai Sauthananusuk, Chalie Charoenlarpnopparut and Toshiaki Kondo School of Information, Computer and Communication Technology Sirindhorn International Institute of Technology Thammasat University, Thailand Email: st.thanachai@gmail.com,chalie@siit.tu.ac.th tkondo@siit.tu.ac.th Pished Bunnun National Electronics and Computer Technology Center National Science and Technology Development Agency, Thailand Email: pished.bunnun@nectec.or.th Kaneko Hirohiko Department of Information Processing Tokyo Institute of Technology 4259 Nagatsuta, Midori-ku, Yokohama 227 Japan. Email: kaneko@ip.titech.ac.jp Abstract Thai amulet is accessory with Buddha shape and named after local Buddhism priest in Thailand. There are many kinds and variations which are difficult to distinguish. This paper demonstrates a way to determine the kind of amulet from taken picture. The identification process includes pre-processing such as grayscale conversion, filtering, Prewitt edge detection, cropping and resizing then apply the proposed method to get image similarity value, at last the template with highest similarity value is identified as the recognition result. The experiment shows that this method can identify 36 out of 53 amulet kinds and correct recognition rate is 60.6% accuracy (339 of 559 images). Keywords Amulet Recognition, Image Similarity, Image Processing I. INTRODUCTION There are many clubs in Thailand those who trade Thai amulet fluently, people there can tell what kind of amulet they are dealing with just a glance because they know each amulet characteristic which require long time study to master all of them. For those who did not familiar with any Thai amulet club and don t have prior knowledge about it. Just looking at the unknown one will not tell them what kind of amulet it is. Some kinds have word carved on the shape but for the rest those there are not any word in the shape, all information is what they see. This paper aim to provide system to identified the kind of unknown amulet from taken picture. from edge pixel as recognition feature. Seth McNeill use vector quantization [3] of edge feature image and k-means algorithm to train machine learning system for classification Marco Reisert [4], [5] use Hough transform to segment coin image, then shift coin center to origin position, scaling image so that coin radius is equal to 1 and use gradient image and fast Fourier transform to generate feature. In 2010, Chomtip Pornpanomchai [6] work with actual amulet, not another class of coin like all the works mentioned before. The system use correlation value to determine the recognition result. The correlation value is computed from the difference of grayscale value of all pixels between two images. The images in this work were taken in controlled environment (black box and spotlight). III. PROPOSED METHOD The overview of the system is described by Figure 1; begin with retrieval of input image, doing some preprocessing to segment the amulet and normalization all amulet magnitude to same scale for easiness in similarity comparison. The recognition process present result with highest similarity value. II. RELATED WORK Since Thai amulet is not well known outside Thailand, almost of the similar work in the past is coin recognition. Minoru Fukumi use rotated image for neural network training to create rotation invariant coin pattern recognition system [1] and applied the system with 500 Japanese yen coin and a 500 Korean won coin. Michael Nolle propose Dagobert system [2] that can recognize 39 classes of coin and can reject unknown class which is not recognized. The system use binary string created Fig. 1: System Overview
A. Image Retrieval For data acquisition, the condition is amulet must be placed on the plain color background. In this work we place amulets on pink color paper when collect data. Some of sample data is shown in Figure 2. (a) RGB image (b) Grayscale image Fig. 2: Sample Data Fig. 3: Grayscale conversion The collected data is resized to 540 pixel width and 720 pixel height before using them in the following step. B. Image Preprocessing The objective of this step is to segment amulet and normalization its magnitude. Here are the processes to be used. 1) Grayscale Conversion: The system uses common formula to convert RGB color image to grayscale image. Grayscale = 0.299 R + 0.587 G + 0.114 B (1) (a) Grayscale image When R is red color intensity in RGB image. G is green color intensity in RGB image. B is blue color intensity in RGB image. The result of grayscale conversion is shown in Figure 3. 2) Edge Detection: The system applies Prewitt edge detection to grayscale image from previous step. The binary image with only edge pixels remain is shown in Figure 4. 3) Noise Filtering: As seen in Figure 4. There are noisy white pixels which interfere with finding topmost, lowermost, leftmost, rightmost position of the amulet. The system uses two separate filters to get rid of noisy pixels and get accurate topmost, lowermost, leftmost, rightmost position of the amulet. (b) Prewitt edge image Fig. 4: Prewitt edge operator
When the 2-D linear FIR filter whose impulse response is 2 3 0.1 0.1 0.1 0.1 0.1 0.1 0.1 6 7 4 5 is applied to the image to find horizontal line for getting topmost and lowermost position of the amulet; and the 2-D linear FIR filter whose impulse response is 2 3 6 7 45 (a) Prewitt edge image is applied to the image to find vertical line for getting leftmost and rightmost position of the amulet. To pass the filter, there must be at least 5 non-zero(white pixel) pixels of 7 pixels in a row. This process can eliminate noise efficiently. The horizontal line filtered image and vertical line filtered image are shown in Figure 5. 4) Crop and Resize: After get topmost, lowermost, leftmost, rightmost position of the amulet from previous step. The image is cropped and resized to 540 pixel width and 720 pixel height like shown in Figure 6 to normalize all image to same size before compute similarity. (b) After apply vertical line filter C. Compute Image Similarity The similarity is computed from logical comparison of binary image. The formula is shown below. When X720 X540 S = (A i,j B i,j ) (2) i=0 j=0 S is similarity value of two images A and B. A i,j is grayscale value of binary image A at row i and column j B i,j is grayscale value of binary image B at row i and column j (c) After apply horizontal line filter The system determines template with highest similarity comparing with input image to be recognition result. Fig. 5: Filter for finding topmost, lowermost, leftmost, rightmost position of the amulet
VI. FUTURE WORK There are some limitations in this work. First is rotation variance; even slight rotation of amulet placement in the picture can create ambiguity in determination. The other limitation is that this method cannot distinguish some amulets which are very similar in shape and color i.e. amulets in same series but different edition. In the future, color information from RGB image will be used to improve the accuracy furthermore. (a) Prewitt edge image (b) Cropped and resized image ACKNOWLEDGMENT This research is financially supported by Thailand Advanced Institute of Science and Technology (TAIST), National Science and Technology Development Agency (NSTDA), Tokyo Institute of Technology and Sirindhorn International Institute of Techcnology (SIIT), Thammasat University (TU) and National Research University Project, Thailand Office of Higher Education Commission. REFERENCES [1] Minoru Fukumi, Sigeru Omatu, Fumiaki Takeda and Toshihisa Kosaka, Rotation-Invariant Neural Pattern Recognition System with Application to Coin Recognition, The IEEE transaction on Neural Networks, Vol. 3, pp. 722-279, March 1992 [2] Michael Nolle, Harald Penz, Michael Rubik, Konrad Mayer, Igor Hollander, Reinhard Granec, Dagobert A New Coin Recognition and Sorting System, Proceedings of the 7th Internation Conference on Digital Image Computing - Techniques and Applications (DICTA03), Syndney, Australia [3] Seth McNeill, Joel Schipper, Taja Sellers, Michael C. Nechyba, Coin Recognition using Vector Quantization and Histogram Modeling, 2004 Florida Conference on Recent Advances in Robotics (FCRAR) [4] Marco Reisert, Olaf Ronneberger, Hans Burkhardt, An Efficient Gradient based Registration Technique for Coin Recognition, Proceedings of the Muscle CIS Coin Competition Workshop, pages 1931, 2006. [5] Marco Reisert, Olaf Ronneberger, and Hans Burkhardt, A Fast and Reliable Coin Recognition System, Springer Pattern Recognition, vol. 4713, pp. 415424, 2007. [6] Pornpanomchai, C., Wongkorsub, J., Pornaudomdaj, T., Vessawasdi, P., Buddhist Amulet Recognition System (BARS), Computer and Network Technology (ICCNT), Second International Conference on, pp 495-499, 2010. Fig. 6: Image normalization IV. EXPERIMENT The experiment was conducted with 53 template images of 53 different kinds of amulet and 559 images for testing. The experiment result is shown in Table I. There are 36 kinds which proposed method can identified with more than 50 percent accuracy. V. CONCLUSION This work demonstrates a way to use simple feature like edge pixel to help in Thai amulet recognition. The proposed method in this work provides correct result more than half of all experiment (67.92 percent by number of corrected identified kind and 60.64 percent by number of correct identified image).
TABLE I: The experiment result No. Amulet Name Correct Incorrect Accuracy(%) 1 Luang Poo Glin 3 2 60 2 Luang Por Thongyu 6 0 100 3 Luang Por Noi 7 2 77.77778 4 Luang Poo Pew 1 7 12.5 5 Luang Por Kaew 2 nd edition 6 2 75 6 Luang Poo Van 1 st edition 7 0 100 7 Rian Phra Put 0 10 0 8 Luang Por Huad 12 0 100 9 Luang Por Sothorn 12 0 100 10 Ajarn Phun 9 th edition Alpaca type 7 1 87.5 11 Ajarn Phun last edition 4 3 57.14286 12 Ajarn Phun 9 th edition Pha Bart type 0 10 0 13 Ajarn Phun 43th edition 5 3 62.5 14 Ajarn Phun 7 th edition 9 1 90 15 Ajarn Phun 6 th edition 0 10 0 16 Luang Por Sye 80 years 9 0 100 17 Luang Poo Sarm 3 rd edition 3 3 50 18 Luang Poo Bun 7 2 77.77778 19 Luang Por Kong 5 4 55.55556 20 Luang Por Chang Riding Hanuman 2 7 22.22222 21 Luang Por Chuen 10 0 100 22 Luang Por Ngern 5 8 38.46154 23 Chinnarad Indochin 4 8 33.33333 24 Phra Ajarn Pimmalai 7 3 70 25 Chao Khun Noraruk 2 7 22.22222 26 Ajarn Phun 3 rd edition 3 6 33.33333 27 Phra Gru Wud ChanaSongkram 1 7 12.5 28 Rian Chareon Pond Lang 12 1 92.30769 29 Luang Por Sud 11 0 100 30 Luang Por Noang 8 8 50 31 Rian Lhor Wud RakungLungkorn 6 5 54.54545 32 Luang Poo Peuak 10 0 100 33 Luang Por Parn Pim Menmungkorn 0 11 0 34 Luang Por Parn Pim Kheeplamor 0 12 0 35 Luang Por Parn Pim Hanuman Yai 9 5 64.28571 36 Luang Poo Chan 7 1 87.5 37 Luang Por Mano 10 1 90.90909 38 Phra Kring Paireepinad Bualiam 2495 8 6 57.14286 39 Luang Poo Perm Khaotum shape 9 3 75 40 Luang Poo Top Tharntia shape 11 0 100 41 Luang Por Derm 1 st edition 5 4 55.55556 42 Luang Por Derm 3 rd edition 11 1 91.66667 43 Luang Por Derm 2 nd edition 10 1 90.90909 44 Luang Poo Tuad Pim Taoread 9 2 81.81818 45 Luang Poo Glin 1 st edition 9 6 60 46 Pidta Luang Poo Kaew 1 st edition 3 13 18.75 47 Luang Por Mui 1 st edition 8 1 88.88889 48 Luang Poo Rian 1 st edition 12 2 85.71429 49 Luang Poo Iam 1 st edition 12 1 92.30769 50 Phra Chaiwat Luan Poo Bun Pim Chalood 11 1 91.66667 51 Phra Kring 2484 0 11 0 52 Phra Chaiwat Luan Poo Bun Pim Pomlek 11 2 84.61538 53 Luang Por In 1 st edition 0 16 0 Total 339 220 60.64401