intTypePromotion=1
zunia.vn Tuyển sinh 2024 dành cho Gen-Z zunia.vn zunia.vn
ADSENSE

Digital Image Processing: Image Enhancement Spatial Filtering - Duong Anh Duc

Chia sẻ: Lavie Lavie | Ngày: | Loại File: PPT | Số trang:40

61
lượt xem
2
download
 
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

Digital Image Processing: Image Enhancement Spatial Filtering - Duong Anh Duc includes Image Enhancement - Spatial Filtering; How to specify T; Smoothing Filters; Image smoothing by averaging (lowpass spatial filtering); Image Sharpening; High-boost filtering; Prewitt operators.

Chủ đề:
Lưu

Nội dung Text: Digital Image Processing: Image Enhancement Spatial Filtering - Duong Anh Duc

  1. Digital Image Processing Image Enhancement Spatial Filtering 21/11/15 Duong Anh Duc - Digital Image Processing 1
  2. Image Enhancement: Spatial Filtering  Image enhancement in the spatial domain can be represented as: Transformation Enhanced Image g(m,n) = T(f)(m,n) Given Image  The transformation T maybe linear or nonlinear. We will mainly study linear operators T but will see one important nonlinear operation. 21/11/15 Duong Anh Duc - Digital Image Processing 2
  3. How to specify T  If the operator T is linear and shift invariant (LSI), characterized by the point- spread sequence (PSS) h(m,n) , then (recall convolution) 21/11/15 Duong Anh Duc - Digital Image Processing 3
  4. How to specify T  In practice, to reduce computations, h(m,n) is of “finite extent: h(k,l) = 0 for (k,l) where is a small set (called neighborhood). is also called as the support of h.  In the frequency domain, this can be represented as: G(u,v) = He(u,v) Fe(u,v)  where He(u,v) and Fe(u,v) are obtained after appropriate zeropadding. 21/11/15 Duong Anh Duc - Digital Image Processing 4
  5. How to specify T  Many LSI operations can be interpreted in the frequency domain as a “filtering operation.” It has the effect of filtering frequency components (passing certain frequency components and stopping others).  The term filtering is generally associated with such operations. 21/11/15 Duong Anh Duc - Digital Image Processing 5
  6. How to specify T  Examples of some common filters (1-D case): Lowpass filter Highpass filter 21/11/15 Duong Anh Duc - Digital Image Processing 6
  7.  If h(m, n) is a 3 by 3 mask given by w1 w2 w3 h= w4 w5 w6 w7 w8 w9 then 21/11/15 Duong Anh Duc - Digital Image Processing 7
  8.  The output g(m, n) is computed by sliding the mask over each pixel of the image f(m, n). This filtering procedure is sometimes referred to as moving average filter.  Special care is required for the pixels at the border of image f(m, n). This depends on the so-called boundary condition. Common choices are:  The mask is truncated at the border (free boundary)  The image is extended by appending extra rows/columns at the boundaries. The extension is done by repeating the first/last row/column or by setting them to some constant (fixed boundary).  The boundaries “wrap around” (periodic boundary). 21/11/15 Duong Anh Duc - Digital Image Processing 8
  9.  In any case, the final output g(m, n) is restricted to the support of the original image f(m, n).  The mask operation can be implemented in MATLAB using the filter2 command, which is based on the conv2 command. 21/11/15 Duong Anh Duc - Digital Image Processing 9
  10. Smoothing Filters  Image smoothing refers to any image-to-image transformation designed to “smooth” or flatten the image by reducing the rapid pixel-to-pixel variation in grayvalues.  Smoothing filters are used for:  Blurring: This is usually a preprocessing step for removing small (unwanted) details before extracting the relevant (large) object, bridging gaps in lines/curves,  Noise reduction: Mitigate the effect of noise by linear or nonlinear operations. 21/11/15 Duong Anh Duc - Digital Image Processing 10
  11. Image smoothing by averaging (lowpass spatial filtering)  Smoothing is accomplished by applying an averaging mask.  An averaging mask is a mask with positive weights, which sum to 1. It computes a weighted average of the pixel values in a neighborhood. This operation is sometimes called neighborhood averaging.  Some 3 x 3 averaging masks:  This operation is equivalent to lowpass filtering. 21/11/15 Duong Anh Duc - Digital Image Processing 11
  12. Example of Image Blurring Original Image Avg. Mask 21/11/15 Duong Anh Duc - Digital Image Processing 12
  13. Example of Image Blurring N =3 N =7 21/11/15 Duong Anh Duc - Digital Image Processing 13
  14. Example of Image Blurring N = 11 N = 21 21/11/15 Duong Anh Duc - Digital Image Processing 14
  15. Example of noise reduction Noise-free Image 21/11/15 Duong Anh Duc - Digital Image Processing 15
  16. Example of noise reduction Zero-mean Gaussian noise, Variance = 0.01 21/11/15 Duong Anh Duc - Digital Image Processing 16
  17. Example of noise reduction Zero-mean Gaussian noise, Variance = 0.05 21/11/15 Duong Anh Duc - Digital Image Processing 17
  18. Median Filtering  The averaging filter is best suited for noise whose distribution is Gaussian:  The averaging filter typically blurs edges and sharp details.  The median filter usually does a better job of preserving edges.  Median filter is particularly suited if the noise pattern exhibits strong (positive and negative) spikes. Example: salt and pepper noise. 21/11/15 Duong Anh Duc - Digital Image Processing 18
  19. Median Filtering  Median filter is a nonlinear filter, that also uses a mask. Each pixel is replaced by the median of the pixel values in a neighborhood of the given pixel.  Suppose A ={a1, a2, …, ak} are the pixel values in a neighborhood of a given pixel with a1 a2 … ak. Then  Note: Median of a set of values is the “center value,” after sorting.  For example: If A ={0,1,2,4,6,6,10,12,15} then median(A) = 6. 21/11/15 Duong Anh Duc - Digital Image Processing 19
  20. Example of noise reduction Gaussian noise: s = 0.2 Salt & Pepper noise: prob. = 0.2 MSE = 0.0337 MSE = 0.062 21/11/15 Duong Anh Duc - Digital Image Processing 20
ADSENSE

CÓ THỂ BẠN MUỐN DOWNLOAD

 

Đồng bộ tài khoản
2=>2