You are on page 1of 10

Image Recognition and Processing using Artificial Neural Network

Md. Iqbal Quraishi, 2J Pal Choudhury, 3Mallika De

Dept. of IT, kalyani Government Engineering College, iqbalqu@gmail.com

Dept. of IT, kalyani Government Engineering College, jnpc193@yahoo.com

Dept. of Engineering and Technological Studies, University of Kalyani, demallika@yahoo.com

Abstract:
There are several techniques for image recognition. Among those methods, application of soft computing models on digital image has been considered to be an approach for a better result. The main objective of the present work is to provide a new approach for image recognition using Artificial Neural Networks. Initially an original gray scale intensity image has been taken for transformation. The Input image has been added with Salt and Peeper noise. Adaptive median Filter has been applied on noisy image such that the noise can be removed and the output image would be considered as filtered Image. The estimated Error and average error of the values stored in filtered image matrix as have been calculated with reference to the values stored in original data matrix. Now each pixel data has been converted into binary number (8 bit) from decimal values. A set of four pixels has been taken together to form a new binary number with 32 bits and it has been converted into a decimal. This process continues to produce new data matrix with new different set of values .This data matrix has been taken as original data matrix and saved in data bank. Now for recognition, a new test image has been taken and the same steps have been applied to get a new test matrix. Now the average error of the second image with respect to original image has been calculated based on the both generated matrices. If the average error is more than 45% then a conclusion can be made that the images are different and cannot be matched. But if the value of average error has been found to be less than or equal to 45%, an effort has been made to use the artificial neural network on test data matrix with reference to original data matrix thereby producing a new matrix of the second image(test image). The total average error has been calculated on generated data matrix produced after the application of artificial neural networks on test data matrix. It has been observed that the value of average error is less than that of test image without application of artificial neural network .Further it has been observed that the test image is matching and recognized with respect to original image. Keywords: Digital Image Processing, Artificial Neural Network, The Feed forward back propagation neural network , Average Error, Gray scale intensity Image. 1. Introduction. The main aim of image processing is to alter the visual impact such that the information content improves and as a result the said image is more suitable than original image. This technique helps in getting a better

visibility of any portion or feature of interest of an image and suppressing the information in other portion or feature of that image. Image Recognition has been dedicated with finding the identity of an object being observed in the image from a set of known labels. Different Recognition techniques are available for use but the selection of an appropriate choice of such techniques depends mainly on a given task at hand and some other related parameters. Soft Computing is an emerging field built of latest techniques like fuzzy logic, artificial neural networks, evolutionary computation and machine learning. Each soft computing technique can be applied to produce solutions to any problem that are too complex or noisy to tackle with conventional methods. This paper will provide a new approach for image recognition and processing using Artificial Neural Network. Artificial Neural Network has been one of the recent development tools that are inspired from biological neural networks. The main advantage of this new powerful tool is to use its capacity to solve problems that are not very easy to be solved by traditional computing methods. The traditional computers use step by step approach in solving a problem and each step should be well defined and computable. The computer cannot solve the problem if any step that the computer needs to follow is not known. So to solve a problem using a computer need all knowledge of how to solve the problem. But Artificial Neural Networks are new techniques that follow a different way from traditional computing methods to solve problems. Artificial Neural Networks may be considered as much more powerful because it can solve problems where how to solve have been not known exactly. Uses of artificial neural network have been spread to a wide range of domain like image recognition, fingerprint recognition and so on. Artificial Neural Networks have the capability to adapt, learn, generalize and organize data. Some of the known structures of artificial neural network are Percepton, Adaline, Madaline, Kohonen, Back Propagation. 2. Related Work. The appearance of digital computers [1] and the development of modern theories of learning and neural processing both occurred at about the same time, during the late 1940s. The study of artificial neural systems (ANS) [2] on computers remains an active field of biomedical research. Since that time, the digital computer has been used as a tool to model individual neurons as well as clusters of neurons, which are called neural networks. Traditional techniques from statistical pattern recognition were popular until the beginning of the 1990s.In the new era, 2000, Robert P.W. Duin, and Jianchang Mao [3] gave us a holistic summary and compared some well known methods in pattern recognition system. The review was mainly meant for statistical approaches. Artificial neural network (ANN) was discussed there as a part.

As it is found that statistical methods are more or less suffer from unavailability of general mathematical methods for recognition of features. A new approach for feature extraction based on
the calculation of Eigen values from a contour was proposed and found that using feed forward neural network satisfactory results was obtained [4]. Artificial neural network s has increasingly been used as an alternative to classic pattern classifiers and clustering techniques. In the field of medical image processing, Kenji Suzuki [5] compared pixel based and non pixel based ANNs to show that the former approach is much better when it comes to segmentation and feature calculation. The paper also concludes that Massive-Training ANNs (MTANNs) can be used to enhance images. In 1993 review article on image segmentation, Pal and Pal [6] predicted that neural networks would become widely applied in image processing. Segmentation, based on neural networks is found to show rich capabilities [7]. Another related work in the domain of medical image processing shows artificial neural network for image segmentation. The approach was conjugated with real time applications. A hybrid neural network was proposed [8].This hybrid neural network shows that error rate, when compared with Eigen face method, found to be producing satisfactory results. A more real time approach in the direction of the advancement of artificial neural networks shows that, how the detection and quantification of persons can be done in cluttered beach scenes [9]. It shows neural-based classification system. An approach to perform neutral

facial image recognition using Parallel Hopfield Neural Networks [10], shows encouraging results in recognition rate. A survey based on Hopfield neural networks was published in the year of 2007[11], where a broad Theoretical review of the concept was presented. Object recognition consists of locating the positions and possibly orientations and scales of instances of objects in an image. The purpose may also be to assign a class label to a detected object. Some other types of ANNs like feed-forward artificial neural network approaches can also be used for object recognition. This paper aims to provide an alternative solution for object Recognition using Artificial Neural Network. Initially an original gray scale intensity image has been taken as a reference and it is saved as original data bank. For processing the method of transformation has been applied on the original image. In the transformation firstly each pixel data has been converted into binary number (8 bit) from decimal values as the input image is an intensity image. Then a set of four pixels has been taken together to form a new binary number with 32 bits. Thereafter the binary number has been converted into a decimal number. This process has been continued for whole image row wise such that a new data matrix with different set of values has been produced. This data matrix has been taken as original data matrix and saved in data bank for reference. Now a new test image has been taken for recognition. The same steps have been applied on the new test image to get a new test matrix and then the average error of the second image with respect to initial image has been calculated based on the generated matrices developed earlier. If percentage error is more than 45% then a conclusion has been made that the images are different and not matching and no recognition is possible. On the other hand if the average error has been found to be less than or equal to 45%, an effort has been made to use artificial neural network on test data matrix with reference to original data matrix to produce a new matrix of the second image. The average error has been calculated on generated data matrix produced after applying Artificial Neural Network on test data matrix. It has been observed that if the average error is less than that of the value obtained earlier then it has been concluded that the images are matching and therefore can be recognized. A flow diagram for Image Recognition and Processing using Artificial Neural Network has been furnished in Figure -1 Start

Input Original Image

Input Image effected with Salt and Pepper Noise

Removal of Salt and Pepper Noise by using Adaptive median Filter

Calculation of Average Error of the Filtered Image based on Input Original Image

Transformation of Test Image into Test data Matrix

Calculation of average error of test data matrix based on original data matrix

Training on test data matrix using Artificial Neural Network to develop new data matrix

Calculation of average error of the new data matrix based on original data matrix Figure -1 Flow Diagram

3. Implementation

3.1 Processing of Original Image. Step 1. The initial optimal image has been taken as furnished in Figure -2 which has been considered as original image. Step 2. The Input image has been added with Salt and Peeper noise. 3.2 Processing of Noisy Image Step 3. Adaptive median Filter has been applied on noisy image such that the noise can be removed and the output image would be considered as filtered Image. Step 4. The estimated Error and average error of the values stored in filtered image matrix as furnished in table 3 have been calculated with reference to the values stored in original data matrix. The average error has been found as 12%. Step 5. The original image has been transformed into data matrix containing pixel values which have been furnished in Table -1. For simplicity first 10X10 matrix elements are shown. Table -1

Input Data Matrix


126 124 121 129 122 71 30 34 29 25 152 155 154 160 151 97 43 30 28 24 171 176 175 178 171 124 64 35 28 26 172 175 171 171 170 139 85 48 29 27 171 173 170 169 169 148 100 59 32 28 173 174 175 177 173 152 109 69 43 33 162 159 162 165 161 145 117 89 64 48 143 135 136 141 139 134 124 109 83 63 117 119 120 120 119 120 122 123 98 89 116 117 118 119 119 122 125 128 113 104

Step 6. For easier calculation four pixels have been taken together. The four pixels have been taken row wise and converted into individual binary numbers.

Step 7. The binary values of four pixels together side by side have been combined and formed as 32 bit binary number.

Step 8. Now the 32 bit binary number has been converted into a decimal number.

Step 9. The decimal number as generated in step 5 has been placed in original data matrix termed as ORMAT[][], which have been furnished in table-2. Table -2
8296619 8166320 7969455 8495282 8034219 4678012 1977152 2235939 1907740 1644570 10005420 10203311 10137515 10531499 9939882 6388875 2834517 1975088 1842205 1579547 11250859 11579309 11512746 11709353 11250345 8162196 4216164 2306107 1842464 1710876 11316141 11513262 11250351 11250097 11184557 9147544 5596269 3160901 1908779 1776673

Original Data Matrix ORMAT[][]


11251106 11382431 11186082 11121061 11120033 9738385 6581621 3884377 2108224 1843504 11379343 11444103 11510408 11642253 11379083 9998726 7173500 4544877 2834515 2175039 10653557 10454903 10651768 10849656 10586999 9537144 7699578 5860731 4215650 3161945 9401716 8877941 8943734 9271415 9140087 8812666 8157821 7175040 5464689 4151656 7697511 7828840 7894633 7894889 7829355 7895663 8027509 8093817 6451580 5859445 7628657 7694449 7760241 7825776 7826290 8023927 8222077 8419714 7437437 6845815

Step 10. The instructions furnished in step 3 to step 6 have been repeated for the total pixel value of the original image as stored in table 1. Therefore a matrix has been produced which has been stored in data matrix termed as ORMAT[][] as furnished in table-3. It is to note that first 10X10 matrix elements are shown in table-3 for easier presentation.

3.3 Processing of second Image (Test Image) A new image has been taken which is considered as a test image. Now it is necessary to check whether the said image can be recognized or not. The test image has been furnished in Figure-2.

Step 11. Instructions as furnished in step 2 have been executed on test image to generate a new data matrix as furnished in Table-3. Table -3
150 159 162 158 157 156 142 124 88 63 160 163 161 158 159 159 149 136 116 89 166 160 154 153 156 157 152 147 139 116 161 149 140 143 147 148 147 148 139 126 148 137 130 135 140 139 140 143 132 127

Test data Matrix


135 128 125 129 133 133 133 136 129 127 122 120 120 122 124 125 126 128 125 124 112 114 115 114 115 117 120 121 119 120 113 113 113 114 114 114 115 115 117 118 114 114 114 115 115 116 116 116 117 118

Step 12. The four pixels have been taken row wise and converted into individual binary numbers.

Step 13. The binary values of four pixels together have been combined to form 32 bit binary number.

Step 14. Now the 32 bit binary number has been converted into a decimal number.

Step 15. The decimal number as generated in step 11 has been placed in test data matrix termed as TESTMAT[][], which have been furnished in table -4. Table -4
9871526 10462112 10658202 10395289 10330012 10264477 9344408 8161427 5797003 4151668 10528417 10723477 10590860 10393999 10460307 10460564 9803923 8950676 7637899 5862526 10920340 10524041 10128514 10063751 10261388 10327179 9999244 9671823 9145220 7634559 10589319 9800064 9208445 9406337 9669765 9735045 9669765 9736072 9143425 8290175 9734010 9011320 8551800 8880506 9209212 9143677 9209214 9406592 8683901 8355708

TESTMAT[][]
8878704 8419442 8222835 8485490 8748147 8748405 8748664 8945785 8486263 8354936 8024177 7893617 7893873 8024690 8156018 8222066 8288371 8419699 8222581 8157302 7369074 7500146 7565682 7500403 7565939 7697012 7893876 7959412 7828853 7894646 7434868 7434868 7434868 7500660 7500661 7500917 7566454 7566454 7697782 7763574 7500917 7500917 7500918 7566454 7566711 7632247 7632503 7632503 7698039 7763574

Step 16. The instructions furnished in step 9 to step 12 have been repeated for the total pixel value of the test image to form a data matrix termed as TESTMAT[][] as furnished in table-6.

3.4 Calculation of Average Error of test data matrix based on original data matrix. Step 17. The estimated Error and average error of the values stored in decimal matrix as furnished in table 3 have been calculated with reference to the values stored in original data matrix. The average error has been found as 31%. The Estimated errors have been furnished in table -5. Table -5
0.189825 0.281129 0.337382 0.223654 0.285752 1.194196 3.726196 2.650112 2.038676 1.52447 0.052271 0.05098 0.04472 0.013056 0.052357 0.637309 2.458763 3.531786 3.146064 2.711524 0.029377 0.091134 0.120235 0.140537 0.087905 0.265245 1.371645 3.194004 3.963581 3.462368 0.064229 0.148802 0.181497 0.163888 0.135436 0.064225 0.727895 2.080157 3.790196 3.666123

Estimated Error data for First 10X10 data


0.13484 0.208313 0.235496 0.20147 0.171836 0.061068 0.399232 1.421648 3.11906 3.532514 0.219752 0.264299 0.285617 0.271147 0.231208 0.125048 0.219581 0.968323 1.993903 2.841281 0.246808 0.244984 0.258914 0.260374 0.229619 0.13789 0.076471 0.436629 0.950489 1.579837 0.216199 0.155193 0.15408 0.191019 0.172225 0.126597 0.032355 0.10932 0.432626 0.901566 0.034121 0.050323 0.058238 0.049935 0.041982 0.049995 0.057434 0.065156 0.193162 0.324967 0.016745 0.025152 0.033417 0.033137 0.033168 0.048814 0.071706 0.093496 0.035039 0.134061

Step 18.

Since the average error is less than 45%, necessary steps regarding the processing of image of test image has been made using the technique of artificial neural network for the purpose of recognition.

3.5 Noise removal/ Correction of Image using Artificial Neural Network. Step 19. The Feed forward back propagation neural network has been used on the test data matrix of the test image for training and testing with reference to the original data matrix of the original image. The configuration of Feed forward back propagation neural network is as follows. Feed-forward networks usually consist of three to four layers in which the neurons are logically arranged. The first and last layers are the input and output layers respectively and there are usually one or more hidden layers in between the other layers. Here information is only allowed to "travel" in one direction. This means that the output of one layer becomes the input of the next layer, and so forward. In order for this to occur, each layer is fully connected to next layer and each neuron is connected by a weight to a neuron in the next layer.

Step 20. After the application of artificial neural network as furnished in step 16, a new modified data Matrix named MODMAT[][] has been produced as furnished in table -6. It is to note that first 10X10 pixels are stored in table 6 for better presentation. Table -6 Modified Data Matrix MODMAT[][]
125 127 127 127 127 90 28 33 29 24 127 127 127 127 127 106 65 29 28 24 127 127 127 127 127 125 66 44 29 26 127 127 127 127 127 127 86 49 28 27 127 127 127 127 127 127 100 58 31 31 127 127 127 127 127 127 109 69 45 34 127 127 127 127 127 127 118 90 63 45 127 126 127 127 127 127 124 110 83 63 119 120 121 122 121 122 124 125 106 103 114 115 115 114 116 118 123 126 115 113

3.6 Calculation of estimated Error and Average Error. Step 21. The estimated error and average error of the values as stored in table -6 with reference to the values stored in table -3 have been calculated and the average error has been found as 14.39%. The image based on values as stored in table-6 has been formed which has been furnished in figure-4.

Step 22. Other test images as furnished in figure- 5 have been taken for processing and recognition.

4. Results Serial No.

Original Image Figure -2 Figure -5

Test Image Figure -3 Figure -6

Average Error 31% 74%

1 2

Revised Test Image with ANN Figures -4 Figures -4

Average Error 14.39% 64%

Remarks

Recognition Possible Recognition Not Possible

Figure -2 Input Original Image

Figure -3 Input Test Image

Figures -4 Revised Image after ANN

Processing Not Possible

Figure -5 Input Original Image 5. Conclusion

Figures -6 Input Test Image

Remarks

It has been observed that if the average error is less than 45%, Artificial Neural network can be applied for training and testing for the purpose of recognition. Therefore the test image is recognized and matched successfully with original image. It has also been observed that, if the average error is greater than 45% then the image is recognized as a different image.

Reference. [1] M. Egmont-Petersena, D. de Ridderb, H. Handelsc, L. Beaurepaire, K.Chehdi; B.Vozel Image processing with neural networksa review", Pattern Recognition 35 (2002), 2002, PP-22802288 [2] Berend Jan van der Zwaag , Kees Slump , and Lambert Spaanenburg " Extracting Knowledge from Neural Networks in Image Processing" PP-143-145 [3] Anil K. Jain, Fellow, IEEE, Robert P.W. Duin, and Jianchang Mao, Senior Member, IEEE Statistical Pattern Recognition: A Review, IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE VOL. 22, NO. 1, JANUARY 2000

[4] Andrzej Dziech, Ali Amuri, CONTOUR RECOGNITION USING NEURAL NETWORKAPPLICATION, Communications Dept., AGH Cracow University, Cracow, POLAND, Electronics and Communication Dept., Kielce University of Technology, Kielce, POLAND. [5] Kenji Suzuki, Pixel-Based Artificial Neural Networks in Computer-Aided Diagnosis, Department of Radiology, Division of Biological Sciences, the University of Chicago USA [6] N.R. Pal, S.K. Pal, "A review on image segmentation techniques", Pattern Recognition 26 (9) (1993) 1277 1284. [7] S.K. Pal, A. Ghosh, "Neuro-fuzzy computing for image processing and pattern recognition", Int. J. Systems Sci. 27 (12) (1996) 11821193 [9] Mostafa Jabarouti Moghaddam, Hamid Soltanian-Zadeh, Medical Image Segmentation Using Artificial Neural Networks . [10] Adilson Gonzaga, Armando Marin, Evandro A. Silva, Fabiana C. Bertoni Kelton A.P. Costa, Luciana A.L. Albuquerque Neutral Facial Image Recognition Using Parallel Hopfield Neural Networks, Universidade de So Paulo [10] Y.J. Zhang, "A survey on evaluation methods for image segmentation", Pattern Recognition 29 (8) (1996) 1335 1340 [11] Humayun Karim Sulehria, Ye Zhang, Hopfield Neural NetworksA Survey, Proceedings of the 6th WSEAS Int. Conf. on Artificial Intelligence, Knowledge Engineering and Data Bases, Corfu Island, Greece, February 16-19, 2007.

You might also like