Noise in Imaging Technology

Slides:



Advertisements
Similar presentations
Matlab Tutorial. Session 1 Basics, Filters, Color Space, Derivatives, Pyramids, Optical Flow Gonzalo Vaca-Castano.
Advertisements

Spatial Filtering (Chapter 3)
Digital Image Processing Chapter 5: Image Restoration.
EE465: Introduction to Digital Image Processing1 Limitation of Imaging Technology Two plagues in image acquisition Noise interference Blur (motion, out-of-focus,
Lecture 4 Linear Filters and Convolution
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
Lecture05 Transform Coding.
Digital Image Processing
Digital Image Processing Chapter 5: Image Restoration.
Chapter 5 Image Restoration. Preview Goal: improve an image in some predefined sense. Image enhancement: subjective process Image restoration: objective.
DREAM PLAN IDEA IMPLEMENTATION Introduction to Image Processing Dr. Kourosh Kiani
Basic Image Processing January 26, 30 and February 1.
Motivation from Real-World Applications EE565 Advanced Image Processing Copyright Xin Li Noisy Photos Noisy ultrasound data.
Digital Image Processing Lecture 4 Image Restoration and Reconstruction Second Semester Azad University Islamshar Branch
Topic 7 - Fourier Transforms DIGITAL IMAGE PROCESSING Course 3624 Department of Physics and Astronomy Professor Bob Warwick.
Applications of Image Filters Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 02/04/10.
1 Chapter 8: Image Restoration 8.1 Introduction Image restoration concerns the removal or reduction of degradations that have occurred during the acquisition.
Digital Image Processing Image Enhancement Part IV.
University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell Image processing.
Chapter 3: Image Restoration Introduction. Image restoration methods are used to improve the appearance of an image by applying a restoration process.
Digital Image Processing Lecture 10: Image Restoration March 28, 2005 Prof. Charlene Tsai.
Digital Image Processing Lecture : Image Restoration
Chapter 5: Neighborhood Processing
CS 556 – Computer Vision Image Basics & Review. What is an Image? Image: a representation, resemblance, or likeness An image is a signal: a function carrying.
Digital Image Processing (Digitaalinen kuvankäsittely) Exercise 2
Image Restoration Fasih ur Rehman. –Goal of restoration: improve image quality –Is an objective process compared to image enhancement –Restoration attempts.
Digital Image Processing Lecture 10: Image Restoration
8-1 Chapter 8: Image Restoration Image enhancement: Overlook degradation processes, deal with images intuitively Image restoration: Known degradation processes;
Spatial Filtering (Applying filters directly on Image) By Engr. Muhammad Saqib.
Ch5 Image Restoration CS446 Instructor: Nada ALZaben.
Digital Image Processing, 3rd ed. © 1992–2008 R. C. Gonzalez & R. E. Woods Gonzalez & Woods Chapter 3 Intensity Transformations.
Course 2 Image Filtering. Image filtering is often required prior any other vision processes to remove image noise, overcome image corruption and change.
Math 3360: Mathematical Imaging Prof. Ronald Lok Ming Lui Department of Mathematics, The Chinese University of Hong Kong Lecture 11: Types of noises.
Fourier Transform.
Chapter 5 Image Restoration.
The Chinese University of Hong Kong
Instructor: Mircea Nicolescu Lecture 5 CS 485 / 685 Computer Vision.
Image Restoration. Image restoration vs. image enhancement Enhancement:  largely a subjective process  Priori knowledge about the degradation is not.
6/10/20161 Digital Image Processing Lecture 09: Image Restoration-I Naveed Ejaz.
Digital Image Processing
Spatial Filtering (Chapter 3) CS474/674 - Prof. Bebis.
Image Restoration : Noise Reduction
Miguel Tavares Coimbra
Fundamentals of Spatial Filtering:
Digital Image Processing Lecture 10: Image Restoration
Linear Filters and Edges Chapters 7 and 8
Image Pre-Processing in the Spatial and Frequent Domain
Image Restoration Spring 2005, Jen-Chang Liu.
Digital Image Processing
Digital Image Processing
The Chinese University of Hong Kong
Lecture 11 Image restoration and reconstruction II
Math 3360: Mathematical Imaging
Digital Image Processing
Image Analysis Image Restoration.
All about convolution.
- photometric aspects of image formation gray level images
Outline Linear Shift-invariant system Linear filters
2D Fourier transform is separable
Image Enhancement in the Spatial Domain
4. Image Enhancement in Frequency Domain
Digital Image Processing
Basic Image Processing
Digital Image Processing Week IV
Intensity Transformation
Image Filtering Readings: Ch 5: 5. 4, 5. 5, 5. 6, , 5
Lecture 4 Image Enhancement in Frequency Domain
Lecture 7 Spatial filtering.
Even Discrete Cosine Transform The Chinese University of Hong Kong
Presentation transcript:

Noise in Imaging Technology Two plagues in image acquisition Noise interference Blur (motion, out-of-focus, hazy weather) Difficult to obtain high-quality images as imaging goes Beyond visible spectrum Micro-scale (microscopic imaging) Macro-scale (astronomical imaging)

What is Noise? noise means any unwanted signal One person’s signal is another one’s noise Noise is not always random and randomness is an artificial term Noise is not always bad.

Stochastic Resonance no noise heavy noise light noise

Image Denoising Where does noise come from? Why do we want to denoise? Sensor (e.g., thermal or electrical interference) Environmental conditions (rain, snow etc.) Why do we want to denoise? Visually unpleasant Bad for compression Bad for analysis

Noisy Image Examples thermal imaging electrical interference physical interference ultrasound imaging

Noise Removal Techniques Linear filtering Nonlinear filtering Recall Linear system

Image Denoising Introduction Impulse noise removal Median filtering Additive white Gaussian noise removal 2D convolution and DFT Periodic noise removal Band-rejection and Notch filter

Impulse Noise (salt-pepper Noise) Definition Each pixel in an image has the probability of p/2 (0<p<1) being contaminated by either a white dot (salt) or a black dot (pepper) with probability of p/2 noisy pixels with probability of p/2 clean pixels with probability of 1-p X: noise-free image, Y: noisy image Note: in some applications, noisy pixels are not simply black or white, which makes the impulse noise removal problem more difficult

Numerical Example P=0.1 X Y 128 128 128 128 128 128 128 128 128 128 128 128 255 0 128 128 128 128 128 128 128 128 128 128 0 128 128 128 128 0 128 128 128 128 128 128 128 128 128 128 128 128 0 128 128 128 128 128 128 128 0 128 128 128 128 255 128 128 128 128 128 128 128 128 128 128 128 128 128 255 128 128 128 128 128 128 128 255 128 128 X Y Noise level p=0.1 means that approximately 10% of pixels are contaminated by salt or pepper noise (highlighted by red color)

MATLAB Command >Y = IMNOISE(X,'salt & pepper',p) Notes:  The intensity of input images is assumed to be normalized to [0,1]. If X is double, you need to do normalization first, i.e., X=X/255;  The default value of p is 0.05 (i.e., 5 percent of pixels are contaminated)  imnoise function can produce other types of noise as well (you need to change the noise type ‘salt & pepper’)

Impulse Noise Removal Problem filtering algorithm denoised image ^ X ^ Can we make the denoised image X as close to the noise-free image X as possible? Noisy image Y

Median Operator Given a sequence of numbers {y1,…,yN} Mean: average of N numbers Min: minimum of N numbers Max: maximum of N numbers Median: half-way of N numbers Example sorted

1D Median Filtering y(n) W=2T+1 … … MATLAB command: x=median(y(n-T:n+T)); Note: median operator is nonlinear

Numerical Example T=1: Boundary Padding

2D Median Filtering x(m,n) W: (2T+1)-by-(2T+1) window MATLAB command: x=medfilt2(y,[2*T+1,2*T+1]);

Numerical Example 225 225 225 226 226 226 226 226 225 225 255 226 226 226 225 226 226 226 225 226 0 226 226 255 255 226 225 0 226 226 226 226 225 255 0 225 226 226 226 255 255 225 224 226 226 0 225 226 226 225 225 226 255 226 226 228 226 226 225 226 226 226 226 226 0 225 225 226 226 226 226 226 225 225 226 226 226 226 226 226 225 226 226 226 226 226 226 226 226 226 225 225 226 226 226 226 225 225 225 225 226 226 226 226 225 225 225 226 226 226 226 226 226 226 226 226 226 226 226 226 ^ Y X Sorted: [0, 0, 0, 225, 225, 225, 226, 226, 226]

Image Example P=0.1 denoised image ^ Noisy image Y X 3-by-3 window

Idea of Improving Median Filtering Can we get rid of impulse noise without affecting clean pixels? Yes, if we know where the clean pixels are or equivalently where the noisy pixels are How to detect noisy pixels? They are black or white dots

Median Filtering with Noise Detection Noisy image Y Median filtering x=medfilt2(y,[2*T+1,2*T+1]); Noise detection C=(y==0)|(y==255); Obtain filtering results xx=c.*x+(1-c).*y;

Image Example noisy clean (p=0.2) with w/o noise noise detection

Image Denoising Introduction Impulse noise removal Median filtering Additive white Gaussian noise removal 2D convolution and DFT Periodic noise removal Band-rejection and Notch filter

Additive White Gaussian Noise Definition Each pixel in an image is disturbed by a Gaussian random variable With zero mean and variance 2 X: noise-free image, Y: noisy image Note: unlike impulse noise situation, every pixel in the image contaminated by AWGN is noisy

Numerical Example 2 =1 X Y 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 2 =1 128 128 129 127 129 126 126 128 126 128 128 129 129 128 128 127 128 128 128 129 129 127 127 128 128 129 127 126 129 129 129 128 127 127 128 127 129 127 129 128 129 130 127 129 127 129 130 128 129 128 129 128 128 128 129 129 128 128 130 129 128 127 127 126 X Y

MATLAB Command >Y = IMNOISE(X,’gaussian',m,v) or >Y = X+m+randn(size(X))*v; Note: rand() generates random numbers uniformly distributed over [0,1] randn() generates random numbers observing Gaussian distribution N(0,1)

Image Denoising filtering denoised ^ algorithm image X Question: Why not use median filtering? Hint: the noise type has changed. Noisy image Y

1D Linear Filtering g(n) h(n) f(n) - Linearity See review section Linear convolution - Linearity - Time-invariant property

Fourier Series forward inverse time-domain convolution frequency-domain multiplication Note that the input signal is a discrete sequence while its FT is a continuous function

Filter Examples |H(w)| HP LP w Low-pass (LP) h(n)=[1,1] |h(w)|=2cos(w/2) High-pass (LP) h(n)=[1,-1] w |h(w)|=2sin(w/2)

2D Linear Filtering g(m,n) h(m,n) f(m,n) 2D convolution MATLAB function: C = CONV2(A, B)

2D Filtering=Two Sequential 1D Filtering Just as we have observed with 2D transform, 2D (separable) filtering can be viewed as two sequential 1D filtering operations: one along row direction and the other along column direction The order of filtering does not matter h1 : 1D filter

Fourier Series (2D case) spatial-domain convolution frequency-domain multiplication Note that the input signal is discrete while its FT is a continuous function

Filter Examples |h(w1,w2)| Low-pass (LP) h1(n)=[1,1] 1D |h1(w)|=2cos(w/2) h(n)=[1,1;1,1] 2D w2 |h(w1,w2)|=4cos(w1/2)cos(w2/2) w1

Image DFT Example Original ray image X choice 1: Y=fft2(X)

Image DFT Example (Con’t) choice 1: Y=fft2(X) choice 2: Y=fftshift(fft2(X)) Low-frequency at four corners Low-frequency at the center FFTSHIFT Shift zero-frequency component to center of spectrum.

Gaussian Filter FT MATLAB code: >h=fspecial(‘gaussian’, HSIZE,SIGMA);

Image Example PSNR=20.2dB PSNR=24.4dB PSNR=22.8dB (=1) (=1.5) noisy denoised denoised PSNR=20.2dB PSNR=24.4dB PSNR=22.8dB (=25) (=1) (=1.5) Matlab functions: imfilter, filter2

Gaussian Filter=Heat Diffusion Linear Heat Flow Equation: Isotropic diffusion: A Gaussian filter with zero mean and variance of t scale

Basic Idea of Nonlinear Diffusion* y I(x,y) x image I Diffusion should be anisotropic instead of isotropic image I viewed as a 3D surface (x,y,I(x,y))

Image Denoising Introduction Impulse noise removal Median filtering Additive white Gaussian noise removal 2D convolution and DFT Periodic noise removal Band-rejection and Notch filter

Periodic Noise Source: electrical or electromechanical interference during image acquistion Characteristics Spatially dependent Periodic – easy to observe in frequency domain Processing method Suppressing noise component in frequency domain

Image Example spatial Frequency (note the four pairs of bright dots)

Band Rejection Filter w2 w1

Image Example Before filtering After filtering