Morphological Image Processing
Morphological Image Processing
Preechaya Srisombut
Graduate School of Information Sciences and Engineering,Tokyo Institute of Technology For IP seminar, 4 November 2004
Reference: Rafael C. Gonzalez, Richard E. Woods, Digital Image Processing, Second Edition,
Prentice Hall, p.519-560&617-621
Contents:
1. Introduction 2. Preliminaries
Basic Concepts from Set Theory Logic Operations
1. Introduction
Morphology commonly denotes a branch of biology that deals with the form and structure of animals and plants. Here, the same word morphology is used as a tool for extracting image components that are useful in the representation and description of region shape. It is also used for pre- or post processing, such as filtering. The language of mathematical morphology use set theory to represent objects in an image.
3. Morphological Operations
Dilation and Erosion Opening and Closing The Hit-or-Miss Transformation
2. Preliminaries
Basic Concepts from Set Theory
For binary image, let A be a set in Z2 a A a = (a1, a2) is an element of A. Set Operations:
of
Gray-Scale
Morphological smoothing
7. Summary
Appendix: Summary of Morphological Operations on Binary Images
Logic Operations
Dilation: Joining broken segments One immediate advantage of the morphological approach over lowpass filtering is that the
morphological method resulted directly in a binary image, while lowpass filtering started with producing gray-scale image.
3. Morphological Operations
Dilation and Erosion
Erosion:
Dilation: Set B is commonly referred to as the structuring element, and also viewed as a convolution mask. Although dilation is based on set operations where convolution is based on arithmetic operations, the basic idea is analogous. B is flipping about its origin and slides over set (image) A.
Erosion & Dilation: eliminating irrelevant detail Suppose we want to eliminate all the squares except largest one. We can do this by eroding the image with a structuring element of a size somewhat smaller than the objects we wish to keep. After that, we can restore it by dilating them with the same structuring element we used for erosion.
Opening & Closing: Noise Filter The light elements are completely eliminated in first erosion stage, but unfortunately image is smaller so we have to restore it with dilation (erosion then dilation opening of A by B). However, new gaps were created. To counter this effect we have to perform closing on an image again.
protrusions. Closing also tends to smooth sections of contours but, ass opposed to opening, it generally fuses narrow breaks and long thin gulfs, eliminates small holes, and fills gaps in the contour.
Opening: Closing:
The small window, W, is assumed that have at least one-pixel-thick than an object. Anyway, in some applications, we may be interested in detecting certain patterns, in which case a background is not required.
Region Filling
Beginning with a point p inside the boundary, the objective is to fill the entire region with 1s, by iteratively processing dilation.
Adding the intelligence to detect a black inner point of sphere, we can use region filling to fill up the sphere to be completely white.
with
, and let
(convconvergence)
Using connected components to detect foreign objects in packaged food. After extracting the bones from the background by using a single threshold, to make sure that only objects of significant size remain by eroding the thresholded image. The next step is to analyze the size of the objects remain
In other words, the procedure consists of iteratively applying the hit-or-miss transform to A with B; when no further changes occur, we perform the union with A and call the result D.
The limiting growth of convex can also be applied for better result.
Pruning
Pruning methods are an essential complement to the procedures that tend to leave parasitic components
Thinning
that need to be cleaned up by post processing. For example, the automated recognition of hand printed characters.
. Thinning 3 times. End-point detectors. Grow line. The structuring elements have the same form as in thinning but with all 1s and 0s interchanged. However, a separate algorithm for thickening is seldom used in practice. The usual procedure is to thin the background instead. Restore the character.
Thickening
Dilation
Erosion
Dilation is expected to produce an image that is brighter that the original and in which small, dark details have been reduced or eliminated. In the other hand, erosion produces darker image, and the sizes of small, bright features were reduced. Note that opening decreases sizes of the small bright detail, with no appreciable effect on the darker gray levels, while the closing decreases sizes of the small dark details, with relatively little effect on bright features.
1. Closing with the small blobs, leaving left area with light background. 2. Opening with the large blobs, leaving a dark
Morphological gradient
The morphological gradient highlights sharp gray-level transitions in the input image.
region on right. The process has produced a light region on the left and a dark region on the right.
Granulometry
Granulometry is a field that deals principally with determining the size distribution of particles in an image
Top-hat transformation
As the particles are lighter than the background, we use opening with increasing size of structuring elements, and compute the difference between the original image and its opening. The histogram of that difference indicates the presence of three predominant particle sizes in the input image.
7. Summary
Note the enhancement of detail in the background region below the lower part of the horses head.
The morphological concepts constitute a powerful set of tools for extracting features of interest in an image. A significant advantage in terms of implementation is the fact that dilation and erosion are primitive operations.
Textural segmentation
A simple gray-scale image composed of two texture region. The large blobs on right and small on left.