morphological operators
play

MORPHOLOGICAL OPERATORS INEL 6088 - M. Toledo Ref: Sec. 2.6, 2.7 - PowerPoint PPT Presentation

MORPHOLOGICAL OPERATORS INEL 6088 - M. Toledo Ref: Sec. 2.6, 2.7 Jain et. al, Ch. 8 Davies MORPHOLOGICAL OPERATORS Intersection of A and B: binary image which is 1 at all pixels p which are 1 in both A and B Union of A and B: binary image which


  1. MORPHOLOGICAL OPERATORS INEL 6088 - M. Toledo Ref: Sec. 2.6, 2.7 Jain et. al, Ch. 8 Davies

  2. MORPHOLOGICAL OPERATORS Intersection of A and B: binary image which is 1 at all pixels p which are 1 in both A and B Union of A and B: binary image which is 1 at all pixels which are 1 in A or in B, or in both . Complement of A: Ω is a universal binary image (all 1’s) The vector sum of pixels p and q with indeces (i,j) and (k,l) is the pixel p+q with indices (i+k,j+l). The vector difference p-q is the pixel with indices (i-k,j-l). The translation of a binary image A by pixel p is an image given by:

  3. BINARY IMAGE MORPHOLOGICAL OPERATIONS Morphology refers to form or shape. Morphological operations use a binary image and a structuring element , which is another, much smaller, binary image. origin Original image A (left) and structuring element S (right). The origin of the structuring element is darker than other pixels in B

  4. Dilation: A ⊕ S= ∪ b ∈ S A b translation of A by b Each 1 in S describes a shift of the image in the direction of the vector from the origin to the location. When several shifts are prescribed by the mask S, the resulting shifted images are combined by a set of union operations. Alternative description: the structuring element S is swept over the image; each time the origin of the structuring element is over a 1-pixel on the image, the entire structuring element is “Boolean OR-ed” to produce the output image. During a dilation operation, every pixel in the structuring element will be present in the final image if the structuring element origin is over a 1-pixel of the original image.

  5. Dilation of A by B. Original figure A shown as a bold line.

  6. Examples of dilation masks and their effect Identity operation 1 Left shift 1 1 Horizontal thickening 1 1 1 1 1 Isotropic thickening 1 1 1 1 1 1 Symmetrical Horizontal thickening 1 1 1

  7. EROSION: A ⊖ S = ∩ B ∈ S A -B Each 1 in S describes a shift of the image in the direction of the vector from the location to the origin. When several shifts are prescribed by the mask S, the resulting shifted images are combined by a set of intersection operations. Alternative description: The structuring element S is swept over the image. Each time the origin of S is over a 1-pixel on the image, the corresponding pixel in the resulting image is 1 only if all pixels in S are over 1-pixels in the original image. Original image’s boundary

  8. OTHER STRUCTURING ELEMENTS (taken from “Computer Vision” by Shapiro and Stockman)

  9. Geometric complement: reflection = binary image B r which is symmetric with B about the origin; B r = {-p | p ∈ B} Geometric duality of dilation and erosion: (A ⊕ B) C = A C ⊖ B r (A ⊖ B) C = A C ⊕ B r Logical duality (de Morgan) (A ∪ B) C = A C ∩ B C (A ∩ B) C = A C ∪ B C

  10. Complement of A and the reflection of B. The structuring element’s origin is still the darker pixel. Previous result Dual of dilation: eroding A’s background with the B’s reflection.

  11. Dual of erosion: dilation of A’s background with B’s reflection

  12. (A ⊕ B) ⊕ C = A ⊕ (B ⊕ C) dilations are associatives (A ⊖ B) ⊖ C = A ⊖ (B ⊕ C) erosions are not assoc. X ⊕ Y = Y ⊕ X X ⊖ Y = Y ⊖ X boundary = A - (A ⊖ B)

  13. Opening : erosion followed by dilation with the same structuring element. Will remove all pixels in regions Opening: erosion, shown on left, is followed by dilation. that are too small to contain Final result shown at right. S. A ○ B=(A ⊖ B) ⊕ B C l o s i n g : a d i l a t i o n followed by erosion. Can be used to suppress spatial features or discriminate against objects based upon their size. A ⦁ B=(A ⊕ B) ⊖ B Closing: dilation, shown on left, is followed by erosion. Final result shown at right.

  14. 246 CHAPTER 8 Mathematical Morphology 8.3 Mathematical Morphology 247 and mask sizes is of vital importance in the design of complete algorithms for all these tasks. Figures 8.2 and 8.3 illustrate some of these possibilities in the case of a peppercorn image: some of the interest in this image relates to the presence of a twiglet and how it is eliminated from consideration and/or identified. " • * 1 • • , • • • • • # * • ^ JBjBl • J ^ (a) ib) (c) id) Figure 8.2 Use of the closing operation, {a) shows a peppercorn image, and {b) shows the result of thresholding, (c) shows the result of applying a 3 x 3 dilation operation to the object shapes, and {d) shows the effect of subsequently applying a 3 x 3 erosion operation. The overall effect of the two operations is a "closing" operation. In this case, closing is useful for eliminating the small holes in the objects. This would, for example, be useful for helping to prevent misleading loops from appearing in skeletons. For this picture, extremely large window operations would be required to group peppercorns into regions. id) (e) Figure 8.3 Use of the opening operation, (a) shows a thresholded peppercorn image, (b) shows the result of applying a.1 xl erosion operation to the object shapes, and (c) shows the effect of subsequently applying a 7 x 7 dilation operation. The overall effect of the two operations is an "opening" operation. In this case, opening is useful for eliminating the twiglet. (d) and (e) show the same respective operations when appUed within an 11 x 11 window. Here some size filtering of the peppercorns has been achieved, and all the peppercorns have been separated—thereby helping with subsequent counting and labeling operations.

  15. From Sternberg, S.R. 1985 “An Overview of Image Algebra using Mathematical Morphology” Integrated Technology for Parallel Image Processing Academic Press, London, 79-100

  16. Structuring elements used by Sternberg: • hole_ring: a ring of pixels whose diameter is slightly larger than the diameters of the 4 holes in the watch gears. It fits just around these holes and can be used to mark their centers. • hole_mask: an octagon slightly larger than the holes • gear_body: a disk structuring element that is as big as the gear minus its teeth • sampling_ring_spacer: a disk s.e. that is used to move slightly outward from the gear body. • sampling_ring_width: disk s.e. used to dilate outward to the tips of the teeth • tip_spacing: a disk s.e. whose diameter spans the tip-to-tip space between teeth. Steps to produce figure 3.15(e): • open B3 with gear_body to get rid of the teeth • dilate with sampling_ring_spacer to bring it out of the base of the teeth • dilate that with sampling_ring_width to bring the image out to the tip of the tip • subtract the second from the last result to get a ring that just fit over the tip

  17. HIT AND MISS TRANSFORM A’s background A ⌦ ( B, C ) = ( A B ) \ ( A C C ) se 1 se 2 erosion Can be used to search an image for instances of a shape (pattern matching)

  18. GRAY -SCALE DILATION/ EROSION Dilation: select the largest grayscale A � B = max b ∈ B A b value for all pixels under the mask B Erosion: select the smallest grayscale A B = min b ∈ B A − b value for all pixel under mask B G = ( A � B ) � ( A B ) G = morphological gradient. The operation enhances the image edges.

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend