IMAGE IMPROVEMENT TECHNIQUE USING FEED FORWARD NEURAL NETWORK By OMAR ABDULMOLA ABUSAEEDA Thesis Submitted to the School of Graduate Studies, Universiti Putra Malaysia in Partial Fulfilment of the Requirements for the Degree of Master of Science September 2004
Dedicated To My Parents and Elder Brother Mohamed ii
Abstract of thesis presented to the Senate of Universiti Putra Malaysia in partial fulfilment of the requirements for the degree of Master of Science IMAGE IMPROVEMENT TECHNIQUE USING FEED FORWARD NEURAL NETWORK By OMAR ABDULMOLA ABUSAEEDA September 2004 Chairman: Associate Professor Abd Rahman Ramli, Ph.D. Faculty : Engineering This research is aimed to develop an efficient image enhancement technique using multi layer Feedforward neural network. A nonlinear digital filter has been introduced as a promising solution for improving the image quality. The filter, which is named unsharp mask filter based neural network, significantly enhances the sharpness of image while highlights its details (edges and lines). In this thesis sharpening of image details has been obtained. Multi-layer Feedforward neural network with back propagation algorithm known as Multilayer Perceptron (MLP) is used to control the level of contrast enhancement. Grayscale blurred images were also used in this study. iii
The results have been evaluated using mean square error as well as grayscale histogram distribution for sharpening of image details. Comparison among 3x3, 5x5 and 7x7 mask sizes has shown that least mean square error has been achieved by using the 3x3 mask size. However, the grayscale histogram distribution has shown that the proposed method has given more image details sharpening (11.333% in average) compared to the original free noise image. Regarding the size of filter mask, three filter masks which are, 3 x 3, 5 x 5 and 7 x 7 have been used in this study. Results have shown that the mean square error is proportionate with the increasing of mask size. The program has been implemented using MATLAB version 6.5 as programming language. Finally, unsharp mask filter based neural network with different mask sizes has been investigated. Results have shown that better performance has been obtained using the proposed method, i.e., 10% for 3x3, 11% for 5x5 and 13% for 7x7 mask size. iv
Abstrak tesis yang dikemukakan kepada Senat Universiti Putra Malaysia sebagai memenuhi keperluan untuk ijazah Master Sains PENGGUNAAN RANGKAIAN NEURAL SUAP HADAPAN SEBAGAI TEKNIK PEMULIHAN IMEJ Oleh OMAR ABDULMOLA ABUSAEEDA September 2004 Pengerusi : Associate Professor Abd Rahman Ramli, Ph.D. Fakulti : Kejuruteraan Kajian tesis ini bertujuan unutk membangunkan teknik pemulihan dan pembaikan imej yang cekap dengan menggunakan rangkaian neural suap-hadapan (FeedForward). Hingar garam dan lada hitam digunakan untuk mewujudkan imej hingar. Suatu penapis tidak lurus telah dikaji sebagai suatu kaedah yang sesuai untuk mengurangkan hingar dan meningkatkan kualiti imej. Penapis tersebut yang dinamakan penapis topeng tidak tepat berdasarkan rangkaian neural, telah mengurangkan hingar pada imej digit. Ia juga meningkatkan ketepatan perincian imej (tepian dan garisan). Di dalam tesis ini suatu tolak ansur di antara pembuangan hingar dan penepatan imej telah didapati. Penapis telah direkabentuk v
dengan mengambil-kira rangkaian neural pelbagai lapisan suap-hadapan dengan algoritma penghantaran belakang yang dikenali sebagai MLP. Imej berskala kelabu dikaburkan dengan hingar garam dan lada hitam digunakan di dalam kajian ini. Prestasi penapis ini telah dibandingkan dengan penapis purata, penapis median dan penapis topeng tradisional tidak tepat. Keputusan-keputusan yang dinilai dengan menggunakan ralat purata kuasa dua untuk pengurangan hingar dan taburan histogram kelabu untuk penepatan perincian imej. Perbandingan di antara kaedah yang dicadangkan dengan penapis purata, penapis median dan penapis topeng tradisional tidak tepat telah dijalankan. Kaedah yang dicadangkan mempunyai ralat purata kuasa dua yang lebih rendah berbanding kaedah-kaedah yang lain. Selain itu, taburan histogram kelabu telah menunjukkan kaedah yang dicadangkan memberikan lebih perincian imej dan lebih tepat berbanding imej yang tiada hingar. Saiz penapis-penapis yang digunakan di dalam kajian ini ialah, 3 x 3, 5 x 5 dan 7 x 7. Keputusan menunjukkan purata ralat kuasa dua adalah berkadaran dengan penambahan saiz topeng. Keputusan juga telah menunjukkan tolak ansur yang lebih baik di antara pengurangan hingar dan penepatan perincian imej dengan menggunakan saiz topeng 3 x 3. Program-program simulasi telah dilakukan dengan menggunakan perisian MATLAB versi 6.5. Akhir sekali, topeng tidak tepat rangkaian neural dengan pelbagai saiz telah dikaji. Keputusan telah menunjukkan pencapaian prestasi yang lebih baik dengan menggunakan kaedah yang dicadangkan. vi
ACKNOWLEDGEMENTS First, all praise to almighty ALLAH SWT. The only creator, sustainer and efficient assembler of the world, for giving me the strength, ability and patience to complete this work. I would like to acknowledge and thank my supervisor Assoc. Prof. Dr. Abd Rahman Ramli, for accepting me as one of his postgraduate students. I would also like to thank him for his cheery nature, assistance, guidance and mentorship throughout the years. This dissertation would have never been completed without his help. He has provided me with all facilities needed to complete this work. Also I would to thank the staff members of the Computer and Communications Systems Engineering Department - UPM for their assistance during my studies. In addition to thanking my members of supervisory committee, I would like to thank Dr. Rahmita Wirza OK, at Faculty of Computer Science, University Putra Malaysia and Dr. Khairi Yusef, at Computer and Communication Systems Engineering Department for their assistance, constructive suggestions, and guidance for execution of the research project. vii
I would like to deeply thank my parents, brothers and sisters for their unwavering support, best wishes and encouragement through both good and bad times.i am especially grateful to my mother, a person whose courage, fortitude and patience I have always admired. I would like to take this opportunity to thank my friends for their friendship. We all have had memorable moments. Special thank goes to Computer System Lab staff members for being helpful in preparation of the research project. Last but not least, I would like to gratefully express my sincere appreciation to my elder brother (Mohamed), a person whose sacrifice, encouragement and unlimited financial support have made this work successful. None of this would have been possible without his support. viii
This thesis submitted to the Senate of Universiti Putra Malaysia and has been accepted as fulfilment of the requirement for the degree of Master of Science. The members of the Supervisory Committee are as follows: Abd Rahman Ramli, Ph.D. Associate Professor Faculty of Engineering Universiti Putra Malaysia (Chairman) Rahmita Wirza, Ph.D. Faculty of Computer Science and Information Technology Universiti Putra Malaysia (Member) Khairi Yusef, Ph.D. Faculty of Engineering Universiti Putra Malaysia (Member) AINI IDERIS, Ph.D. Professor/ Dean School of Graduate Studies Universiti Putra Malaysia ix
DECLARATION I hereby declare that the thesis is based on my original work except for equations and citations which have been duly acknowledged. I also declare that it has not been previously or currently submitted for any other degree at UPM or other institutions. OMAR ABDULMOLA ABUSAEEDA Date: x
TABLE OF CONTENTS Page DEDICATION ABSTRACT ABSTRAK ACKNOWLEDGEMENTS APPROVAL DECLARATION LIST OF TABLE LIST OF FIGURES ii iii v vii ix xi xiv xv CHAPTER I. INTRODUCTION 1.1 1.1 Background 1.1 1.2 Problem Statement 1.4 1.3 Objectives 1.5 1.4 Scope of work 1.5 1.5 Thesis Outline 1.6 II. LITERATURE REVIEW 2.1 2.1 Principles of Image Enhancement 2.1 2.2 Sources of Noise 2.2 2.3 Some Important Noise Probability Density Functions 2.2 2.3.1 Gaussian Noise 2.3 2.3.2 Impulse (salt and pepper) Noise 2.4 2.4 Model of the Image Degradation /Restoration Process 2.6 2.5 Image Averaging 2.7 2.6 Basic of Spatial Filtering 2.8 2.7 General Image Filtering Operation 2.10 2.7.1 Averaging Filters 2.11 2.7.2 Weighted-Averaging Filter 2.12 2.7.3 Median Filter 2.13 2.8 Enhancement of Image Details 2.15 2.8.1 Unsharp Mask Filter 2.15 2.8.2 Linear Median Hybrid Filter (LMH) 2.17 2.9 Introduction to Neural Networks 2.19 2.10 Human Brain 2.21 2.11 Neuron Model of Artificial Neural Network 2.23 2.12 Type of Activation Function 2.24 2.12.1 Threshold Function 2.24 2.12.2 Piecewise-Linear Function 2.26 2.12.3 Sigmoid Function 2.26 2.13 The Perceptron 2.27 2.14 Supervised Learning Algorithm 2.29 xi
2.15 Unsupervised Learning Algorithm 2.30 2.16 Feedforward Networks 2.31 2.17 Feedback neural Networks 2.32 2.18 Backpropagation Algorithm 2.33 2.19 Classification of Neural Network 2.34 2.20 Summary 2.36 III. IV V METHODOLOGY 3.1 Introduction 3.1 3.2 Image Enhancement Model 3.2 3.2.1 Input Image 3.2 3.2.2 Median Filter 3.3 3.2.3 The Difference Between Output of Median Filter 3.4 and Input Image 3.2.4 Calculate the Variance of the Gray Levels 3.6 3.2.5 Neural network model design 3.7 3.2.5.1 Input and output of Neural Network. 3.8 3.2.5.2 Neural network Weights Update 3.9 3.2.5.3 Training Set and Learning 3.10 3.2.6 Synthesizer 3.14 3.3 Usage of Graphical User Interface 3.14 3.4 Program Package Steps 3.16 RESULTS AND DISCUSSION 4.1 Introduction 4.1 4.2 Image Enhancement Results 4.6 4.2.1 Image Enhancement Using 3 X 3 Mask Size 4.6 4.2.2 Image Enhancement Using 5 X 5 Mask Size 4.12 4.2.3 Image Enhancement Using 7 X 7 Mask Size 4.17 4.3 Enhancement of Blurred Image 4.22 4.4 Discussion 4.28 CONCLUSION AND RECOMMENDATIONS 5.1 Conclusion 5.1 5.2 Suggestions for Future Work 5.2 REFERENCES R1 APPENDICES A.1 BIODATA OF THE AUTHOR B.1 xii