Digital Image Processing

Similar documents
Image Restoration and Reconstruction

Image Restoration and Reconstruction

Image Processing Lecture 10

CoE4TN3 Medical Image Processing

CoE4TN4 Image Processing. Chapter 5 Image Restoration and Reconstruction

Image restoration. Restoration: Enhancement:

VU Signal and Image Processing. Image Restoration. Torsten Möller + Hrvoje Bogunović + Raphael Sahann

Noise Model. Important Noise Probability Density Functions (Cont.) Important Noise Probability Density Functions

x' = c 1 x + c 2 y + c 3 xy + c 4 y' = c 5 x + c 6 y + c 7 xy + c 8

Point and Spatial Processing

PSD2B Digital Image Processing. Unit I -V

Digital Image Processing Chapter 5: Image Restoration

Digital Image Processing

Image Restoration Chapter 5. Prof. Vidya Manian Dept. of Electrical and Computer Engineering INEL 5327 ECE, UPRM

Image Processing. Traitement d images. Yuliya Tarabalka Tel.

Digital Image Processing

Filtering and Enhancing Images

Chapter 3: Intensity Transformations and Spatial Filtering

Digital Image Processing

Image Enhancement in the Frequency Domain Periodicity and the need for Padding:

Image Enhancement: To improve the quality of images

Vivekananda. Collegee of Engineering & Technology. Question and Answers on 10CS762 /10IS762 UNIT- 5 : IMAGE ENHANCEMENT.

SYDE 575: Introduction to Image Processing

EE795: Computer Vision and Intelligent Systems

Image restoration. Lecture 14. Milan Gavrilovic Centre for Image Analysis Uppsala University

Overview Module 03. Image Restoration and Freq. Filtering & Color Imaging and Transformations. Model of Image Degradation/Restoration

UNIT III : IMAGE RESTORATION

Hom o om o or o phi p c Processing

Implementation of efficient Image Enhancement Factor using Modified Decision Based Unsymmetric Trimmed Median Filter

Linear Operations Using Masks

Digital Image Processing. Lecture # 3 Image Enhancement

CHAPTER 2 ADAPTIVE DECISION BASED MEDIAN FILTER AND ITS VARIATION

Intensity Transformations. Digital Image Processing. What Is Image Enhancement? Contents. Image Enhancement Examples. Intensity Transformations

IMAGE DE-NOISING IN WAVELET DOMAIN

Lecture 4: Spatial Domain Transformations

Lecture 2 Image Processing and Filtering

Hybrid filters for medical image reconstruction

f(x,y) is the original image H is the degradation process (or function) n(x,y) represents noise g(x,y) is the obtained degraded image p q

Digital Image Processing. Prof. P. K. Biswas. Department of Electronic & Electrical Communication Engineering

INTENSITY TRANSFORMATION AND SPATIAL FILTERING

Digital Image Processing

Image Denoising Based on Hybrid Fourier and Neighborhood Wavelet Coefficients Jun Cheng, Songli Lei

Filtering Images. Contents

Image Restoration Image Degradation and Restoration

An Intuitive Explanation of Fourier Theory

Lecture 4: Image Processing

Computer Vision 2. SS 18 Dr. Benjamin Guthier Professur für Bildverarbeitung. Computer Vision 2 Dr. Benjamin Guthier

Digital Image Fundamentals

Examination in Image Processing

Computer Vision I - Basics of Image Processing Part 1

IT Digital Image ProcessingVII Semester - Question Bank

ECG782: Multidimensional Digital Signal Processing

ECG782: Multidimensional Digital Signal Processing

Basic Algorithms for Digital Image Analysis: a course

Biometrics Technology: Image Processing & Pattern Recognition (by Dr. Dickson Tong)

Introduction to Digital Image Processing

Digital Image Processing (EI424)

High Speed Pipelined Architecture for Adaptive Median Filter

Image Analysis Image Segmentation (Basic Methods)

Chapter4 Image Enhancement

New feature preserving noise removal algorithm based on thediscrete cosine transform and the a prior knowledge of pixel type.

Babu Madhav Institute of Information Technology Years Integrated M.Sc.(IT)(Semester - 7)

Image Processing. Filtering. Slide 1

Review for Exam I, EE552 2/2009

Sampling and Reconstruction

Image Enhancement in Spatial Domain. By Dr. Rajeev Srivastava

JNTUWORLD. 4. Prove that the average value of laplacian of the equation 2 h = ((r2 σ 2 )/σ 4 ))exp( r 2 /2σ 2 ) is zero. [16]

Digital Image Processing

NEW HYBRID FILTERING TECHNIQUES FOR REMOVAL OF GAUSSIAN NOISE FROM MEDICAL IMAGES

Computer Vision I - Algorithms and Applications: Basics of Image Processing

Image Sampling and Quantisation

Image Sampling & Quantisation

Image processing. Reading. What is an image? Brian Curless CSE 457 Spring 2017

2D Image Processing INFORMATIK. Kaiserlautern University. DFKI Deutsches Forschungszentrum für Künstliche Intelligenz

VC 10/11 T4 Colour and Noise

Improved Adaptive Median Filter for Denoising Ultrasound Images

UNIT - 5 IMAGE ENHANCEMENT IN SPATIAL DOMAIN

Lectures Remote Sensing

Biomedical Image Analysis. Spatial Filtering

CHAPTER 3 IMAGE ENHANCEMENT IN THE SPATIAL DOMAIN

Digital filters. Remote Sensing (GRS-20306)

Lecture 4 Image Enhancement in Spatial Domain

A Decision Based Algorithm for the Removal of High Density Salt and Pepper Noise

Image Restoration by Inverse Filtering in the Frequency Domain Using Gaussian and Ideal Low Pass Filters By Nasser Abbasi

FPGA Implementation of a Nonlinear Two Dimensional Fuzzy Filter

Image Analysis. Edge Detection

An Effective Denoising Method for Images Contaminated with Mixed Noise Based on Adaptive Median Filtering and Wavelet Threshold Denoising

Lecture 6: Edge Detection

EECS 556 Image Processing W 09. Image enhancement. Smoothing and noise removal Sharpening filters

Image Processing. Daniel Danilov July 13, 2015

Computer Science 1001.py Lecture 18: A Crash Intro to Digital Images, Noise, and Noise Reduction

Feature Detectors - Canny Edge Detector

Cvision 3 Color and Noise

Digital Image Processing. Image Enhancement in the Frequency Domain

Unit - I Computer vision Fundamentals

CS4442/9542b Artificial Intelligence II prof. Olga Veksler

Image Enhancement. Digital Image Processing, Pratt Chapter 10 (pages ) Part 1: pixel-based operations

Aliasing. Can t draw smooth lines on discrete raster device get staircased lines ( jaggies ):

Digital Image Processing. Image Enhancement in the Spatial Domain (Chapter 4)

Applications of Image Filters

Transcription:

Digital Image Processing Image Restoration and Reconstruction (Noise Removal) Christophoros Nikou cnikou@cs.uoi.gr University of Ioannina - Department of Computer Science and Engineering

2 Image Restoration and Reconstruction Things which we see are not by themselves what we see It remains completely unknown to us what the objects may be by themselves and apart from the receptivity of our senses. We know nothing but our manner of perceiving them. Immanuel Kant

3 Contents In this lecture we will look at image restoration techniques used for noise removal What is image restoration? Noise and images Noise models Noise removal using spatial domain filtering Noise removal using frequency domain filtering

4 What is Image Restoration? Image restoration attempts to restore images that have been degraded Identify the degradation process and attempt to reverse it Similar to image enhancement, but more objective

5 Noise and Images The sources of noise in digital images arise during image acquisition (digitization) and transmission Imaging sensors can be affected by ambient conditions Interference can be added to an image during transmission

6 Noise Model We can consider a noisy image to be modelled as follows: g( x, y) f ( x, y) ( x, y) where f (x, y) is the original image pixel, η(x, y) is the noise term and g(x, y) is the resulting noisy pixel If we can estimate the noise model we can figure out how to restore the image

Images taken from Gonzalez & Woods, Digital Image Processing (2002) 7 Noise Models (cont...) There are many different models for the image noise term η(x, y): Gaussian Most common model Rayleigh Erlang (Gamma) Exponential Uniform Impulse Salt and pepper noise Erlang Gaussian Uniform Rayleigh Exponential Impulse

Images taken from Gonzalez & Woods, Digital Image Processing (2002) 8 Noise Example The test pattern to the right is ideal for demonstrating the addition of noise The following slides will show the result of adding noise based on various models to this image Image Histogram to go here Histogram

Images taken from Gonzalez & Woods, Digital Image Processing (2002) 9 Noise Example (cont )

Images taken from Gonzalez & Woods, Digital Image Processing (2002) 10 Noise Example (cont )

11 Restoration in the presence of noise We can use spatial filters of different kinds to remove different kinds of noise The arithmetic mean filter is a very simple one and is calculated as follows: 1 fˆ( x, y) g( s, t) mn 1 / 9 1 / 9 1 / 9 1 / 9 1 / 9 1 / 9 1 / 9 1 / 9 1 / 9 ( s, t) S xy This is implemented as the simple smoothing filter It blurs the image. only

12 Restoration in the presence of noise only (cont.) There are different kinds of mean filters all of which exhibit slightly different behaviour: Geometric Mean Harmonic Mean Contraharmonic Mean

13 Restoration in the presence of noise Geometric Mean: only (cont.) fˆ( x, y) ( s, t) S g( s, t) xy 1 mn Achieves similar smoothing to the arithmetic mean, but tends to lose less image detail.

14 Restoration in the presence of noise Harmonic Mean: only (cont.) fˆ( x, y) ( s, t) g( s, t) S xy mn 1 Works well for salt noise, but fails for pepper noise. Also does well for other kinds of noise such as Gaussian noise.

15 Restoration in the presence of noise Contraharmonic Mean: only (cont.) fˆ( x, y) ( s, t) S xy ( s, t) S g( s, t) g( s, t) xy Q1 Q Q is the order of the filter. Positive values of Q eliminate pepper noise. Negative values of Q eliminate salt noise. It cannot eliminate both simultaneously.

Images taken from Gonzalez & Woods, Digital Image Processing (2002) 16 Noise Removal Examples Original image Image corrupted by Gaussian noise 3x3 Arithmetic Mean Filter 3x3 Geometric Mean Filter (less blurring than AMF, the image is sharper)

Images taken from Gonzalez & Woods, Digital Image Processing (2002) 17 Noise Removal Examples (cont ) Image corrupted by pepper noise at 0.1 Filtering with a 3x3 Contraharmonic Filter with Q=1.5

Images taken from Gonzalez & Woods, Digital Image Processing (2002) 18 Noise Removal Examples (cont ) Image corrupted by salt noise at 0.1 Filtering with a 3x3 Contraharmonic Filter with Q=-1.5

Images taken from Gonzalez & Woods, Digital Image Processing (2002) 19 Contraharmonic Filter: Here Be Dragons Choosing the wrong value for Q when using the contraharmonic filter can have drastic results Pepper noise filtered by a 3x3 CF with Q=-1.5 Salt noise filtered by a 3x3 CF with Q=1.5

Images taken from Gonzalez & Woods, Digital Image Processing (2002) 20 Order Statistics Filters Spatial filters based on ordering the pixel values that make up the neighbourhood defined by the filter support. Useful spatial filters include Median filter Max and min filter Midpoint filter Alpha trimmed mean filter

21 Median Filter Median Filter: fˆ( x, y ) median{ g ( s, t )} ( s, t) S xy Excellent at noise removal, without the smoothing effects that can occur with other smoothing filters. Particularly good when salt and pepper noise is present.

22 Max and Min Filter Max Filter: fˆ( x, y) max ( s, t) S xy { g( s, t)} Min Filter: fˆ( x, y) min ( s, t) S xy { g( s, t)} Max filter is good for pepper noise and Min filter is good for salt noise.

23 Midpoint Filter Midpoint Filter: fˆ( x, y) 1 2 max ( s, t) S { g( s, t)} min ( s, t) xy S xy { g( s, t)} Good for random Gaussian and uniform noise.

24 Alpha-Trimmed Mean Filter Alpha-Trimmed Mean Filter: fˆ( x, y) 1 mn d ( s, t) g S xy r ( s, t) We can delete the d/2 lowest and d/2 highest grey levels. So g r (s, t) represents the remaining mn d pixels.

Images taken from Gonzalez & Woods, Digital Image Processing (2002) 25 Noise Removal Examples Salt And Pepper at 0.2 1 pass with a 3x3 median 2 passes with a 3x3 median 3 passes with a 3x3 median Repeated passes remove the noise better but also blur the image

Images taken from Gonzalez & Woods, Digital Image Processing (2002) 26 Noise Removal Examples (cont ) Image corrupted by Pepper noise Image corrupted by Salt noise Filtering above with a 3x3 Max Filter Filtering above with a 3x3 Min Filter

Images taken from Gonzalez & Woods, Digital Image Processing (2002) 27 Noise Removal Examples (cont ) Image corrupted by uniform noise Image further corrupted by Salt and Pepper noise Filtering by a 5x5 Arithmetic Mean Filter Filtering by a 5x5 Geometric Mean Filter Filtering by a 5x5 Median Filter Filtering by a 5x5 Alpha- Trimmed Mean Filter (d=5)

28 Adaptive Filters The filters discussed so far are applied to an entire image without any regard for how image characteristics vary from one point to another. The behaviour of adaptive filters changes depending on the characteristics of the image inside the filter region. We will take a look at the adaptive median filter.

29 Adaptive Median Filtering The median filter performs relatively well on impulse noise as long as the spatial density of the impulse noise is not large. The adaptive median filter can handle much more spatially dense impulse noise, and also performs some smoothing for non-impulse noise.

30 Adaptive Median Filtering (cont ) The key to understanding the algorithm is to remember that the adaptive median filter has three purposes: Remove impulse noise Provide smoothing of other noise Reduce distortion (excessive thinning or thickenning of object boundaries).

31 Adaptive Median Filtering (cont ) In the adaptive median filter, the filter size changes depending on the characteristics of the image. Notation: S xy = the support of the filter centerd at (x, y) z min = minimum grey level in S xy z max = maximum grey level in S xy z med = median of grey levels in S xy z xy = grey level at coordinates (x, y) S max =maximum allowed size of S xy

32 Adaptive Median Filtering (cont ) Stage A: Stage B: A1 = z med z min A2 = z med z max If A1 > 0 and A2 < 0, Go to stage B Else increase the window size If window size S max repeat stage A Else output z med B1 = z xy z min B2 = z xy z max If B1 > 0 and B2 < 0, output z xy Else output z med

33 Adaptive Median Filtering (cont ) Stage A: A1 = z med z min A2 = z med z max If A1 > 0 and A2 < 0, Go to stage B Else increase the window size If window size S max repeat stage A Else output z med Stage A determines if the output of the median filter z med is an impulse or not (black or white). If it is not an impulse, we go to stage B. If it is an impulse the window size is increased until it reaches S max or z med is not an impulse. Note that there is no guarantee that z med will not be an impulse. The smaller the the density of the noise is, and, the larger the support S max, we expect not to have an impulse.

34 Adaptive Median Filtering (cont ) Stage B: B1 = z xy z min B2 = z xy z max If B1 > 0 and B2 < 0, output z xy Else output z med Stage B determines if the pixel value at (x, y), that is z xy, is an impulse or not (black or white). If it is not an impulse, the algorithm outputs the unchanged pixel value z xy. If it is an impulse the algorithm outputs the median z med.

Images taken from Gonzalez & Woods, Digital Image Processing (2002) 35 Adaptive Filtering Example Image corrupted by salt and pepper noise with probabilities P a = P b =0.25 Result of filtering with a 7x7 median filter Result of adaptive median filtering with S max = 7 AMF preserves sharpness and details, e.g. the connector fingers.

Images taken from Gonzalez & Woods, Digital Image Processing (2002) 36 Periodic Noise Typically arises due to electrical or electromagnetic interference. Gives rise to regular noise patterns in an image. Frequency domain techniques in the Fourier domain are most effective at removing periodic noise.

37 Band Reject Filters Removing periodic noise form an image involves removing a particular range of frequencies from that image. Band reject filters can be used for this purpose An ideal band reject filter is given as follows: H ( u, v) 1 0 1 if if if D( u, v) D 0 W 2 D( u, v) D 0 W 2 D( u, v) D 0 W 2 D 0 W 2

Images taken from Gonzalez & Woods, Digital Image Processing (2002) 38 Band Reject Filters (cont ) Ideal Band Reject Filter Butterworth Band Reject Filter (of order 1) Gaussian Band Reject Filter

Images taken from Gonzalez & Woods, Digital Image Processing (2002) 39 Band Reject Filter Example Image corrupted by sinusoidal noise Fourier spectrum of corrupted image Butterworth band reject filter Filtered image

Images taken from Gonzalez & Woods, Digital Image Processing (2002) 40 Notch Filters Rejects frequencies in a predefined neighbourhood around a center frequency.

Images taken from Gonzalez & Woods, Digital Image Processing (2002) 41 Optimum Notch Filtering Several interference components (not a single burst). Removing completely the star-like components may also remove image information.

Images taken from Gonzalez & Woods, Digital Image Processing (2002) 42 Optimum Notch Filtering (cont.) Apply the notch filter to isolate the bursts. Remove a portion of the burst.

Images taken from Gonzalez & Woods, Digital Image Processing (2002) 43 Optimum Notch Filtering (cont.) A noise estimate in the DFT domain: N( k, l) H( k, l) G( k, l) In the spatial domain: 1 H k l G k l ( m, n) (, ) (, ) Image estimate: f ˆ( m, n) g( m, n) w( m, n) ( m, n)

Images taken from Gonzalez & Woods, Digital Image Processing (2002) 44 Optimum Notch Filtering (cont.) f ˆ( m, n) g( m, n) w( m, n) ( m, n) Compute the weight minimizing the variance over a local neighbourhood of the estimated image centered at (m,n): a b 1 ( m, n) f ˆ( m k, n l) fˆ( m, n) (2a1)(2b1) ka lb 2 with a b ˆ 1 f ( m, n) f ˆ( m k, n l) (2a1)(2b1) ka lb Substituting the estimate in σ(m,n): yields:

Images taken from Gonzalez & Woods, Digital Image Processing (2002) 45 Optimum Notch Filtering (cont.) a b 1 ( m, n) g( m k, n l) w( m k, n l) ( m k, n l) (2a1)(2b1) ka lb g( m, n) w( m, n) ( m, n) 2 A simplification is to assume that the weight remains constant over the neighbourhood: w( m k, n l) w( m, n), a k a, b l b a b 1 ( m, n) g( m k, n l) w( m, n) ( m k, n l) (2a1)(2b1) ka lb g( m, n) w( m, n) ( m, n) 2

Images taken from Gonzalez & Woods, Digital Image Processing (2002) 46 Optimum Notch Filtering (cont.) To minimize the variance: ( mn, ) w( m, n) 0 yielding the closed-form solution: w( m, n) g( m, n) ( m, n) g( m, n) ( m, n) 2 2 ( m, n) ( m, n) More elaborated result is obtained for nonconstant weight w(m,n) at each pixel.