Presentation is loading. Please wait.

Presentation is loading. Please wait.

Digital Image Processing Week IV

Similar presentations


Presentation on theme: "Digital Image Processing Week IV"— Presentation transcript:

1 Digital Image Processing Week IV
Thurdsak LEAUHATONG

2 Neighborhood Processing
Linear vs non-linear operation Neighborhood processing Define center point (x,y) Perform operations involving only pixels in the neighborhood Result of operation is response to process at that point Moving the pixel results in a new neighborhood Repeat process for every point in the image Spatial Filtering (Neighborhood Processing) Linear Spatial Filtering (Spatial Convolution, Correlation) Nonlinear Spatial Filtering

3 Linear Spatial Filtering
Linear operation Multiply each pixel in the neighborhood by the corresponding coefficient and sum the results to get the response for each point (x,y) If neighborhood is m x n , then mn coefficients are required Coefficients are arranged in a matrix, called Filter Filter mask Kernel Template Mask sizes are typically odd sizes (3x3, 5x5, etc.) Larger the mask, greater the compute time

4 1-Dimensional Convolution
Impulse Function, Signal Sampling Let (t) be a unit square function whose width is a. Impulse function d(t) is the unit square whose is zero. A function x(t) can be considered as a sequence of the impulse functions,

5 1-Dimensional Convolution
Linear Time Invariant System and Convolution The impulse response of a system is the output signal when inputting the impulse function to the system. The time-invariant system is a system whose transformation does not depend on time.

6 1-Dimensional Convolution
Linear Time Invariant System and Convolution Linear Transformation Properties T(x) = y, T(x1) = y1, T(x2) = y2 1. T(ax) = ay 2. T(a1x1 + a2x2) = a1y1 + a2y2 The output of the linear time-variant system is called convolution.

7 1-Dimensional Convolution
Algorithm 3 Steps of computing the convolution 1. Flip the impulse response 2. Shift the impulse response 3. Compute the output

8 1-Dimensional Convolution
Example Impulse Response sometime is called mask. In order to convolve at the start and end of x[k], zeros are padded.

9 2-Dimensional Convolution
Example

10 Low Pass Filter Smoothing Linear Filter
The output of the smoothing filter is the average of the pixels contained in the neighborhood of the filter mask (local mean). These filters are called average filter or box filter. The average filter is one of the low pass filter.

11 Low Pass Filter Smoothing Linear Filter
In filter mask, some coefficients are more important than others. For example, such as the center coefficient. The weighted average filter is an average filter that the pixels are multiplied by different coefficients. The general implementation of the weighted average filter is given by follows.

12 Low Pass Filter Gaussian Filter
The optimal smoothing filter for images should be localized in both the spatial and frequency domains. (D. Marr and E. Hildreth, “Theory of edge detection,” Proc. R. Soc. London B, vol. 207, no. 1167, pp , Feb. 29, 1980.) The Gaussian filter is the only one smoothing filter which satisfies the above constraint.

13 Order Statistic (Nonlinear) Filters
Salt and Pepper Noises Salt and pepper Noises are a form of noise typically seen on images. It represents itself as randomly occurring white (salt) and black (pepper) pixels. The salt and pepper noise cannot be removed by the linear filters such as average or Gaussian filter. Salt and Pepper noise Image Remove by using average filter Remove by using Gaussian filter

14 Order Statistic (Nonlinear) Filters
Problems of Removing the Salt and Pepper Noises The intensities of the salt and pepper noise are the minimum and maximum intensities of the local histogram. In order to remove the noises, the output intensities must not be the minimum or maximum intensities. However, the noises cannot be removed by the local mean (average filter).

15 Order Statistic (Nonlinear) Filters
Median Filter Local mean = ( )/9 = 4.22 Ascending sort the local intensities. Local median = 3

16 Order Statistic (Nonlinear) Filters
Median Filter Algorithm Local mean = ( )/9 = 4.22 Ascending sort the local intensities. Local median = 3

17 Sorting Algorithm Bubble Sort { 5 1 4 2 8 } First Run
{ } Swap(5, 1) { } Swap(5, 4) { } Swap(5, 2) { } Not Swap(5, 8) Second Run { } Not Swap(1, 4) { } Swap(4, 2) { } Not Swap(4, 5) { } Not Swap(5, 8) Third Run { } Not Swap(1, 2) { } Not Swap(2, 4) { } Not Swap(4, 5) { } Not Swap(5, 8) Stop Run


Download ppt "Digital Image Processing Week IV"

Similar presentations


Ads by Google