- 497 Views
- Updated On :
- Presentation posted in: General

. . Smoothing Spatial Filters. Smoothing linear filtersAveraging filtersBox filterWeighted average filter. Smoothing Spatial Filters. The general implementation for filtering an MXN image with a weighted averaging filter of size mxn is given by where a=(m-1)/2 and b=(n-1)/2. Smoothing Spatial FiltersImage smoothing with masks of various sizes.

Digital Image Processing Lecture IV

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

**1. **Digital Image Processing Lecture IV Spatial Filtering (cont’d) and Image Segmentation
Spring 2010

**3. **Smoothing linear filters
Averaging filters
Box filter
Weighted average filter

**4. **The general implementation for filtering an MXN image with a weighted averaging filter of size mxn is given by
where a=(m-1)/2 and b=(n-1)/2

**7. **Order-statistic filters
Median filter: to reduce impulse noise (salt-and-pepper noise)

**8. **Sharpening Spatial Filters The objective is to highlight transitions in intensity.
Applications vary ranging from electronic printing and medical imaging to industrial guidance in military systems.

**9. **Sharpening Spatial Filters An Example

**10. **Sharpening filters are based on computing spatial derivatives of an image.
The first-order derivative of a one-dimensional function f(x) is
The second-order derivative of a one-dimensional function f(x) is

**11. **Development of the Laplacian method
The two dimensional Laplacian operator for continuous functions [Rosenfeld et. Al 1982]:
The Laplacian is a linear operator.

**13. **To sharpen an image, the Laplacian of the image is subtracted from the original image.
Example: Figure 3.40 shown next.

**15. **Unsharp Masking and Highboost Filtering A process that has been used for many years in printing and publishing industry to sharpen images.
Blur the original image
Subtract the blurred image from the original (let the resulting difference be mask)
Add mask to the original

**16. **Unsharp Masking and Highboost Filtering Let f’(x,y) denote the blurred image
gmask(x,y) = f(x,y) - f’(x,y)
g(x,y) = f(x,y) + k*gmask(x,y), where k>=0 is the weight.
When k=1, we have unsharp masking
When k >1, the process is called highboost filtering
When k < 1, it de-emphasizes the contribution of the mask.

**17. **1D Unsharp Masking

**18. **Example

**26. **Image segmentation divides an image into regions that are connected and have some similarity within the region and some difference between adjacent regions.
The goal is usually to find individual objects in an image.
For the most part there are fundamentally two kinds of approaches to segmentation: discontinuity and similarity.
Similarity may be due to pixel intensity, color or texture.
Differences are sudden changes (discontinuities) in any of these, but especially sudden changes in intensity along a boundary line, which is called an edge.

**27. **Image Segmentation

**28. **Fundamentals

**29. **Fundamentals

**30. **Image Segmentation

**31. **Image Segmentation Example

**32. **There are three kinds of discontinuities of intensity: points, lines and edges.
The most common way to look for discontinuities is to scan a small mask over the image. The mask determines which kind of discontinuity to look for.

**33. **Background The focus is to detect sharp, local changes in intensity, which can be detected using derivatives.
First-, second-order derivatives are particularly well suited for this purpose.
Derivatives of a digital function are defined in terms of differences.

**34. **Background

**35. **Background

**37. **Detection of Isolated Points

**39. **Only slightly more common than point detection is to find a one pixel wide line in an image.
For digital images the only three point straight lines are only horizontal, vertical, or diagonal (+ or –45?).

**40. **Line Detection

**47. **Three fundamental steps in edge detection

**49. **Basic Edge Detection

**50. **Example

**58. **Advanced Edge Detector: The Canny Edge Detector

**61. **Two properties of edge points are useful for edge linking:
the strength (or magnitude) of the detected edge points
their directions (determined from gradient directions)
This is usually done in local neighborhoods.
Adjacent edge points with similar magnitude and direction are linked.
For example, an edge pixel with coordinates (x0,y0) in a predefined neighborhood of (x,y) is similar to the pixel at (x,y) if

**62. **Edge linking with local processing

**64. **Regional Processing

**65. **Hough transform: a way of finding edge points in an image that lie along a straight line.
Example: xy-plane v.s. ab-plane (parameter space)

**66. **Thresholding for Segmentation

**67. **Assumption: the range of intensity levels covered by objects of interest is different from the background.

**72. **Adaptive Thresholding Divide the image into sub-images.
Assume that the illumination in each sub-images is constant.
Use a different threshold for each sub-image.
Alternatively – use a running window (and use the threshold of the window only for the central pixel )

**77. **Region-Based Segmentation

**78. **Edges and thresholds sometimes do not give good results for segmentation.
Region-based segmentation is based on the connectivity of similar pixels in a region.
Each region must be uniform.
Connectivity of the pixels within the region is very important.
There are two main approaches to region-based segmentation: region growing and region splitting.

**79. ** Let R represent the entire image region.
Segmentation is a process that partitions R into subregions, R1,R2,…,Rn, such that
where P(Rk): a logical predicate defined over the points in set Rk
For example: P(Rk)=TRUE if all pixels in Rk have the same gray level.

**80. **Fig. 10.41 shows the histogram of Fig. 10.40 (a). It is difficult to segment the defects by thresholding methods. (Applying region growing methods are better in this case.)

**82. **Region splitting is the opposite of region growing.
First there is a large region (possible the entire image).
Then a predicate (measurement) is used to determine if the region is uniform.
If not, then the method requires that the region be split into two regions.
Then each of these two regions is independently tested by the predicate (measurement).
This procedure continues until all resulting regions are uniform.

**83. **The main problem with region splitting is determining where to split a region.
One method to divide a region is to use a quadtree structure.
Quadtree: a tree in which nodes have exactly four descendants.

**84. **The split and merge procedure:
Split into four disjoint quadrants any region Ri for which P(Ri) = FALSE.
Merge any adjacent regions Rj and Rk for which P(RjURk) = TRUE. (the quadtree structure may not be preserved)
Stop when no further merging or splitting is possible.

**85. **Motion-Based Segmentation Use motion as a cue to distinguish moving objects in an image sequence (video)
Assumption:
regions that moves are of interests than still backgrounds
Successive image frames are taken from the same camera at the same shot.
Spatial versus frequency domain methods

**86. **Accumulative Difference Image Difference Image

**87. **ADI Calculations Absolute, positive, and negative ADIs
R(x,y): original image
f(x,y,k) = f(x,y,tk) k-th frame in a sequence of images to be compared to R(x,y)

**88. **ADI: accumulative difference image

**89. **Example of Using ADI