Topic 5 (image restoration)

16
CSE 473: Digital Image CSE 473: Digital Image Processing and Pattern Processing and Pattern Recognition Recognition Spring 2015 Spring 2015 Course Teacher: Course Teacher: Md. Tarek Habib Md. Tarek Habib Assistant Professor Assistant Professor Department of Computer Science and Department of Computer Science and Engineering Engineering Green University of Bangladesh Green University of Bangladesh Topic – 5: Image Topic – 5: Image Restoration Restoration

Transcript of Topic 5 (image restoration)

Page 1: Topic   5 (image restoration)

CSE 473: Digital Image Processing CSE 473: Digital Image Processing and Pattern Recognitionand Pattern Recognition

Spring 2015Spring 2015

Course Teacher:Course Teacher:Md. Tarek HabibMd. Tarek Habib

Assistant ProfessorAssistant ProfessorDepartment of Computer Science and EngineeringDepartment of Computer Science and Engineering

Green University of BangladeshGreen University of Bangladesh

Topic – 5: Image RestorationTopic – 5: Image Restoration

Page 2: Topic   5 (image restoration)

BasicsBasics

Low-Pass FiltersLow-Pass Filters

Median FiltersMedian Filters

Topic ContentsTopic Contents

Page 3: Topic   5 (image restoration)

3

BasicsBasics Image restoration is a process or operation by which

a degraded image is restored to its original condition.The aim of image restoration is the removal of noise

(sensor noise, motion blur, etc.) from images.The simplest possible approach for noise removal is

various types of filters such as low-pass filters or median filters.

More sophisticated methods assume a model of how the local image structures look like, a model which distinguishes them from the noise.

By first analyzing the image data in terms of the local image structures, such as lines or edges, and then controlling the filtering based on local information from the analysis step, a better level of noise removal is usually obtained compared to the simpler approaches.

Page 4: Topic   5 (image restoration)

4

BasicsBasics

Image Restoration

Page 5: Topic   5 (image restoration)

5

Low-Pass FiltersLow-Pass Filters

Noise in an image usually appears as snow (white or black) randomly sprinkled over an image.

Spikes, or very sharp, narrow edges in the image cause snow. A low-pass filter smoothes and often removes these sharp edges.

Page 6: Topic   5 (image restoration)

6

Low-Pass FiltersLow-Pass FiltersLow-pass filtering smoothes out sharp

transitions in gray levels and removes noise.Some low-pass filter convolution masks:

Page 7: Topic   5 (image restoration)

7

Low-Pass FiltersLow-Pass Filters

Page 8: Topic   5 (image restoration)

8

Low-Pass FiltersLow-Pass Filters

Page 9: Topic   5 (image restoration)

9

Low-Pass FiltersLow-Pass Filters

Page 10: Topic   5 (image restoration)

10

Median FiltersMedian Filters

A special type of low-pass filter is the median filter. The median filter takes an area of an image (3x3, 5x5, 7x7, etc.), looks at all the pixel values in that area, and replaces the center pixel with the median value. The median filter does not require convolution. It does, however, require sorting the values in the image area to find the median value.

Page 11: Topic   5 (image restoration)

11

Median FiltersMedian FiltersThere are two noteworthy features of the median

filter. It is easy to change the size of the median filter.

(The images later will show the effect of using a different size.) Implementing the different size is a simple matter of changing for loops in the code.

Median filters remove noise in images, but change noise-free parts of images minimally.

Page 12: Topic   5 (image restoration)

12

Filtering: Median FiltersFiltering: Median Filters

House Image

Page 13: Topic   5 (image restoration)

13

Filtering: Median FiltersFiltering: Median Filters

Result of 3x3 Median Filter

Page 14: Topic   5 (image restoration)

14

Filtering: Median FiltersFiltering: Median Filters

Result of 5x5 Median Filter

Page 15: Topic   5 (image restoration)

15

Filtering: Median FiltersFiltering: Median Filters

Result of 7x7 Median Filter

Page 16: Topic   5 (image restoration)

AcknowledgementAcknowledgement

Dr. M. RokonuzzamanDr. M. Rokonuzzaman

ProfessorProfessorDepartment of Electrical and Computer EngineeringDepartment of Electrical and Computer Engineering

North South UniversityNorth South University

16