3092011 Iq

Embed Size (px)

Citation preview

  • 7/30/2019 3092011 Iq

    1/10

    Image Recognition and Processing using

    Artificial Neural Network1Md. Iqbal Quraishi,

    2J Pal Choudhury,

    3Mallika De

    1Dept. of IT, kalyani Government Engineering College, [email protected]

    2Dept. of IT, kalyani Government Engineering College, [email protected]

    3Dept. of Engineering and Technological Studies, University of Kalyani, [email protected]

    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 ArtificialNeural 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 secondimage 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 improvesand as a result the said image is more suitable than original image. This technique helps in getting a better

  • 7/30/2019 3092011 Iq

    2/10

    visibility of any portion or feature of interest of an image and suppressing the information in other portionor 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 availablefor use but the selection of an appropriate choice of such techniques depends mainly on a given task athand and some other related parameters. Soft Computing is an emerging field built of latest techniqueslike 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 totackle 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 recentdevelopment 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 traditionalcomputing methods.

    The traditional computers use step by step approach in solving a problem and each step should be welldefined and computable. The computer cannot solve the problem if any step that the computer needs tofollow 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 ofartificial neural networkhave 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, whichare called neural networks. Traditional techniques from statistical pattern recognition were popular untilthe beginning of the 1990s.In the new era, 2000, Robert P.W. Duin, and Jianchang Mao [3] gave us aholistic 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 onthe 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 imageprocessing, Kenji Suzuki [5] compared pixel based and non pixel based ANNs to show that the formerapproach 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 imagesegmentation, 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]. Anotherrelated work in the domain of medical image processing shows artificial neural network for imagesegmentation. 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 incluttered beach scenes [9]. It shows neural-based classification system. An approach to perform neutral

  • 7/30/2019 3092011 Iq

    3/10

    facial image recognition using Parallel Hopfield Neural Networks [10], shows encouraging results inrecognition 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 locatingthe positions and possibly orientations and scales of instances of objects in an image. The purpose mayalso be to assign a class label to a detected object. Some other types of ANNs like feed-forward artificialneural 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 originaldata bank. For processing the method of transformation has been applied on the original image. In thetransformation 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 offourpixels has been taken together to form a newbinary number with 32 bits. Thereafter the binary number has been converted into a decimal number. Thisprocess 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 bankfor reference. Now a new test image has been taken for recognition. The same steps have been applied onthe 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 norecognition is possible. On the other hand if the average error has been found to be less than or equal to45%, an effort has been made to use artificial neural network on test data matrix with reference to originaldata 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 beenobserved 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

    Removal of Salt and Pepper Noise by using Adaptive median Filter

    Transformation of Test Image into Test data Matrix

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

    Input Image effected with Salt and Pepper Noise

    Input Original Image

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

  • 7/30/2019 3092011 Iq

    4/10

    Figure -1

    Flow Diagram

    3. Implementation

    3.1Processing of Original Image.Step 1.

    The initial optimal image has been taken as furnished in Figure -2 which has been considered as originalimage.

    Step 2.

    The Input image has been added with Salt and Peeper noise.

    3.2Processing of Noisy ImageStep 3.

    Adaptive median Filter has been applied on noisy image such that the noise can be removed and theoutput 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 hasbeen 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

    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

  • 7/30/2019 3092011 Iq

    5/10

    Input Data Matrix

    126 152 171 172 171 173 162 143 117 116

    124 155 176 175 173 174 159 135 119 117

    121 154 175 171 170 175 162 136 120 118

    129 160 178 171 169 177 165 141 120 119

    122 151 171 170 169 173 161 139 119 119

    71 97 124 139 148 152 145 134 120 12230 43 64 85 100 109 117 124 122 125

    34 30 35 48 59 69 89 109 123 128

    29 28 28 29 32 43 64 83 98 113

    25 24 26 27 28 33 48 63 89 104

    Step 6.

    For easier calculation four pixels have been taken together. The four pixels have been taken row wise andconverted into individual binary numbers.

    Step 7.

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

    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 Original Data Matrix ORMAT[][]

    8296619 10005420 11250859 11316141 11251106 11379343 10653557 9401716 7697511 7628657

    8166320 10203311 11579309 11513262 11382431 11444103 10454903 8877941 7828840 7694449

    7969455 10137515 11512746 11250351 11186082 11510408 10651768 8943734 7894633 77602418495282 10531499 11709353 11250097 11121061 11642253 10849656 9271415 7894889 7825776

    8034219 9939882 11250345 11184557 11120033 11379083 10586999 9140087 7829355 7826290

    4678012 6388875 8162196 9147544 9738385 9998726 9537144 8812666 7895663 8023927

    1977152 2834517 4216164 5596269 6581621 7173500 7699578 8157821 8027509 8222077

    2235939 1975088 2306107 3160901 3884377 4544877 5860731 7175040 8093817 8419714

    1907740 1842205 1842464 1908779 2108224 2834515 4215650 5464689 6451580 7437437

    1644570 1579547 1710876 1776673 1843504 2175039 3161945 4151656 5859445 6845815

  • 7/30/2019 3092011 Iq

    6/10

    Step 10.

    The instructions furnished in step 3 to step 6 have been repeated for the total pixel value of the originalimage 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 intable-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 asfurnished in Table-3.

    Table -3 Test data Matrix

    150 160 166 161 148 135 122 112 113 114

    159 163 160 149 137 128 120 114 113 114

    162 161 154 140 130 125 120 115 113 114

    158 158 153 143 135 129 122 114 114 115

    157 159 156 147 140 133 124 115 114 115

    156 159 157 148 139 133 125 117 114 116

    142 149 152 147 140 133 126 120 115 116

    124 136 147 148 143 136 128 121 115 116

    88 116 139 139 132 129 125 119 117 117

    63 89 116 126 127 127 124 120 118 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.

  • 7/30/2019 3092011 Iq

    7/10

    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 TESTMAT[][]

    9871526 10528417 10920340 10589319 9734010 8878704 8024177 7369074 7434868 7500917

    10462112 10723477 10524041 9800064 9011320 8419442 7893617 7500146 7434868 7500917

    10658202 10590860 10128514 9208445 8551800 8222835 7893873 7565682 7434868 7500918

    10395289 10393999 10063751 9406337 8880506 8485490 8024690 7500403 7500660 7566454

    10330012 10460307 10261388 9669765 9209212 8748147 8156018 7565939 7500661 7566711

    10264477 10460564 10327179 9735045 9143677 8748405 8222066 7697012 7500917 7632247

    9344408 9803923 9999244 9669765 9209214 8748664 8288371 7893876 7566454 7632503

    8161427 8950676 9671823 9736072 9406592 8945785 8419699 7959412 7566454 7632503

    5797003 7637899 9145220 9143425 8683901 8486263 8222581 7828853 7697782 7698039

    4151668 5862526 7634559 8290175 8355708 8354936 8157302 7894646 7763574 7763574

    Step 16.

    The instructions furnished in step 9 to step 12 have been repeated for the total pixel value of the testimage 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 havebeen calculated with reference to the values stored in original data matrix. The average error has beenfound as 31%. The Estimated errors have been furnished in table -5.

    Table -5 Estimated Error data for First 10X10 data

    0.189825 0.052271 0.029377 0.064229 0.13484 0.219752 0.246808 0.216199 0.034121 0.016745

    0.281129 0.05098 0.091134 0.148802 0.208313 0.264299 0.244984 0.155193 0.050323 0.025152

    0.337382 0.04472 0.120235 0.181497 0.235496 0.285617 0.258914 0.15408 0.058238 0.033417

    0.223654 0.013056 0.140537 0.163888 0.20147 0.271147 0.260374 0.191019 0.049935 0.033137

    0.285752 0.052357 0.087905 0.135436 0.171836 0.231208 0.229619 0.172225 0.041982 0.0331681.194196 0.637309 0.265245 0.064225 0.061068 0.125048 0.13789 0.126597 0.049995 0.048814

    3.726196 2.458763 1.371645 0.727895 0.399232 0.219581 0.076471 0.032355 0.057434 0.071706

    2.650112 3.531786 3.194004 2.080157 1.421648 0.968323 0.436629 0.10932 0.065156 0.093496

    2.038676 3.146064 3.963581 3.790196 3.11906 1.993903 0.950489 0.432626 0.193162 0.035039

    1.52447 2.711524 3.462368 3.666123 3.532514 2.841281 1.579837 0.901566 0.324967 0.134061

    Step 18.

  • 7/30/2019 3092011 Iq

    8/10

    Since the average error is less than 45%, necessary steps regarding the processing of image of test imagehas 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 imagefor training and testing with reference to the original data matrix of the original image. The configurationof 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 morehidden 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 forthis 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 Matrixnamed 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 127 127 127 119 114

    127 127 127 127 127 127 127 126 120 115

    127 127 127 127 127 127 127 127 121 115

    127 127 127 127 127 127 127 127 122 114

    127 127 127 127 127 127 127 127 121 116

    90 106 125 127 127 127 127 127 122 118

    28 65 66 86 100 109 118 124 124 123

    33 29 44 49 58 69 90 110 125 126

    29 28 29 28 31 45 63 83 106 115

    24 24 26 27 31 34 45 63 103 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 storedin 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.

  • 7/30/2019 3092011 Iq

    9/10

    Step 22.

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

    4.

    ResultsSerial No. Original

    Image

    Test

    Image

    Average

    Error

    Revised

    Test Image

    with ANN

    Average

    Error

    Remarks

    1 Figure -2 Figure -3 31% Figures -4 14.39% Recognition

    Possible

    2 Figure -5 Figure -6 74% Figures -4 64% Recognition

    Not

    Possible

    Figure -2 Figure -3 Figures -4

    Input Original Image Input Test Image Revised Image after ANN

    Figure -5 Figures -6

    Input Original Image Input Test Image Remarks

    5. ConclusionIt 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 matchedsuccessfully 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.

    Processing Not Possible

  • 7/30/2019 3092011 Iq

    10/10

    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.