Linear and Nonlinear Image Processing Filter
Total Page:16
File Type:pdf, Size:1020Kb
LINEAR AND NONLINEAR FILTER FOR IMAGE PROCESSING USING MATLAB’S IMAGE PROCESSING TOOLBOX This report is submitted to the School of Engineering and Information Technology, Murdoch University as a partial fulfilment of the requirement for the Bachelor of Engineering (Honours) FATIHAH MOHD PADZIL PROJECT SUPERVISOR: DR. GREGORY CREBBIN JANUARY, 2016 LINEAR AND NONLINEAR IMAGE PROCESSING FILTER ACKNOWLEDGEMENT Firstly, I would like to take this opportunity to express my sincere gratitude to my supervisor, Dr. Gregory Crebbin, who was always there to listen and give advice with patience and a smile on his face, despite his busy schedule. His valuable comments, guidance and constant encouragement gave me motivation to finish this project. Also, I cannot forget to thank Dr. Linh Vu, as my second supervisor, and the School of Engineering and Information Technology for their support throughout this project. Finally, to all my family and friends, I would like to send my deep appreciation and respect for their continuous support and encouragement throughout my thesis and entire degree. i LINEAR AND NONLINEAR IMAGE PROCESSING FILTER ABSTRACT The proposal of the thesis is basically to study techniques in digital image processing. This thesis will cover two image processing areas, which are image restoration and image enhancement. More specifically, image restoration will involve the removal of noise and image enhancement will look into technique for edge enhancement. In this project, two classes of filter will be introduced, which are linear and nonlinear filters. Two type of noise source will be used which are Gaussian noise and salt and pepper noise. For noise removal, the mean filter is used as example of a linear filter and the median filter is used as an example of a nonlinear filter. For edge enhancement, only a linear filter is used, which is the unsharp mask filter. The simulation programs are written using the Image Processing Toolbox in MATLAB (MATrix LABoratory). Test images that corrupted by noise will be used in investigations to assess the strength and weakness for each type of filter. ii LINEAR AND NONLINEAR IMAGE PROCESSING FILTER TABLE OF CONTENTS ACKNOWLEDGEMENT ............................................................................................................................... ABSTRACT ................................................................................................................................................ ii TABLE OF CONTENTS .............................................................................................................................. iii 1. Introduction .................................................................................................................................... 1 1.1 Problem scope ........................................................................................................................ 1 1.2 Thesis Objective ...................................................................................................................... 3 1.3 Report Outline......................................................................................................................... 4 2 Technical Review of Image Processing ........................................................................................... 5 2.1 Overview of Digital Image Processing ..................................................................................... 5 2.2 Image Processing System ........................................................................................................ 6 2.3 Digital Image Representation ................................................................................................. 7 2.4 Image Processing Operations ................................................................................................. 8 2.4.1 Noise ............................................................................................................................... 8 2.4.2 Neighborhood Operations ............................................................................................ 11 2.5 Image Restoration ................................................................................................................. 13 2.5.1 Linear Filter ................................................................................................................... 13 2.5.2 Nonlinear Filter ............................................................................................................. 15 2.6 Image Enhancement ............................................................................................................. 17 2.6.1 2.6.1 Unsharp mask filter .............................................................................................. 19 2.7 MATLAB ................................................................................................................................. 21 2.7.1 Image Processing Toolbox ............................................................................................. 21 3 Methodology ................................................................................................................................. 23 3.1 Image Input ........................................................................................................................... 23 3.2 Noise Removal ...................................................................................................................... 24 3.2.1 3.2.1 Process plan ......................................................................................................... 24 3.2.2 Mean Filter .................................................................................................................... 26 3.2.3 Median Filter ................................................................................................................. 27 3.3 Edge Enhancement ............................................................................................................... 29 3.3.1 Process Plan .................................................................................................................. 29 4 Results ........................................................................................................................................... 32 4.1 Mathematical rules ............................................................................................................... 32 iii LINEAR AND NONLINEAR IMAGE PROCESSING FILTER 4.2 Mean Filter Result ................................................................................................................. 33 4.2.1 Result of 3 by 3 filtered image ...................................................................................... 33 4.2.2 Result of 5 by 5 filtered image ...................................................................................... 35 4.3 Median Filter Result .............................................................................................................. 37 4.3.1 Result of 3 by 3 filtered image ...................................................................................... 37 4.3.2 Result of 5 by 5 filtered image ...................................................................................... 39 4.4 Result of 11-by-11 window filter .......................................................................................... 41 4.5 Unsharp Mask Filter Result ................................................................................................... 41 4.6 Result Summary .................................................................................................................... 44 5 Problem Encountered and Countermeasures .............................................................................. 45 6 Conclusion and Recommendations............................................................................................... 46 6.1 Conclusion ............................................................................................................................. 46 6.2 Recommendations ................................................................................................................ 47 7 References .................................................................................................................................... 48 8 Appendix ....................................................................................................................................... 49 8.1 Appendix A ............................................................................................................................ 49 Result for a 11 by 11 mean filter ................................................................................................... 49 Result for a 11 by 11 median filter. ............................................................................................... 51 8.2 Appendix B ............................................................................................................................ 53 8.3 Appendix C ............................................................................................................................ 55 8.4 Appendix D ............................................................................................................................ 57 8.5 Appendix E ............................................................................................................................ 58 iv LINEAR AND NONLINEAR IMAGE PROCESSING