1 / 29

Morphological Image Processing (Chapter 9)

Morphological Image Processing (Chapter 9). CSC 446 Lecturer: Nada ALZaben. Outline: . Introduction. Some basic Concepts from Set theory Logic operations involving Binary Images. Dilation and Erosion Open and Close Processing gray scale images . The Hit-and-Miss transformation.

arvin
Download Presentation

Morphological Image Processing (Chapter 9)

An Image/Link below is provided (as is) to download presentation 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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Morphological Image Processing(Chapter 9) CSC 446 Lecturer: Nada ALZaben

  2. Outline: Introduction. Some basic Concepts from Set theory Logic operations involving Binary Images. Dilation and Erosion Open and Close Processing gray scale images. The Hit-and-Miss transformation

  3. Introduction • The word morphology commonly denotes a branch of biology that deals with the form and structure of animals and plants. • Mathematical morphology is a tool that extract image components that are useful in the representation and discription of region shape such as: • Boundaries • Skeletons • Convex hull . • Sets in mathematical morphology represent objects in an image.

  4. Some basic Concepts from Set theory • Let A be set in . If a= is an element of A then we write: if not we say • Empty set is called null set and denoted by • Sets are specified by the contents of two braces {}. • Elements of the sets in this chapter are the pixel coordinates of representing objects in an image. • Example:- when we write we mean that set C is the set of elements w such that w is formed by multiplying each of the two coordinates of all the elements of set D by -1.

  5. Some basic Concepts from Set theory.. (cont.) • if every elements A is also an element of another set B then A is subset of B, . • Union of sets take all elements of A and B is . • Intersection of two sets A and B is set of elements belonging to both A and B , . • Two sets are disjoint or mutually exclusive if they have no common elements • The complement of a set A is the set of element not contained in A. } • The difference of two sets A and B is , wB}=

  6. Some basic Concepts from Set theory.. (cont.) • The reflection of set B is is defined as • The translation of set A by point z=(), is defined as Example.

  7. Logic Operation Involving Binary Images. • Mostly used images are the binary images. • The principle logic operations used in image processing are AND, OR and NOT • Logic operations are operated on a pixel by pixel basis between 2 images ,but, (NOT) operation use one image.

  8. Logic Operation Involving Binary Images. • More operations: • XOR: when only 1 in a pixel or the other pixel is 1 but not both. • NOT-AND: select the black pixel that simultaneously are in B but not in A. • NOTE: • Intersection ==AND • Union ==OR • Complement ==NOT

  9. Logic Operation Involving Binary Images.

  10. Logic Operation Involving Binary Images. Note: -In binary images white will represent the foreground (1) while black is the background (0). -The set of coordinate to the image is simply the set of 2D Euclidean coordinates of al the foreground pixels in the image as the origin normally takes in one of the corners.

  11. Logic Operation Involving Binary Images.

  12. Dilation and Erosion • Dilationis a morphological transformation which essentially expands an object by adding a layer of pixels around it’s edges and as a result it shrinks any hole in the object. • With A and B as sets in the Dilation of A by B denoted as: • This equation means get the reflection of B about its origin and shifting this reflection by z. the dilation of A by B then is a set of all displacements z such that and A overlap by at least one element. • B usually called structuring element (kernal).

  13. Dilation and Erosion • Dilation advantage in bridges gaps in an image.

  14. Dilation Algorithm: • Consider each of the background pixels in the input image as input. • For each background pixel we put the structure element on top of the image so that the origin of the structure element coincides with the input image. • If at least one pixel in the structure element coincides with the foreground pixel in the image underneath then the input pixel is set to the foreground , otherwise leave it as it background value.

  15. Dilation and Erosion Dilation example

  16. Dilation and Erosion • Erosion is a morphological dual to dilation which essentially shrinks an object by removing a layer of pixels around it’s edges and as a result it expands any hole in the object. • With A and B as sets in the Erosion of A by B denoted as: • Meaning the erosion of A by B then is a set of all points z such that translated by z is contained in A.

  17. Dilation and Erosion • Erosion advantage in eliminating irrelevant details in term of size in an image. • Note: if the structure element is larger than the object then the object will be eliminated completely

  18. Erosion algorithm: • Consider each of the foreground pixels in the input image as input. • For each foreground pixel we put the structure element on top of the image so that the origin of the structure element coincides with the input image. • If for every pixel in the structure element the corresponding pixel in image underneath is a foreground pixel then the input pixel is left as foreground , otherwise set it to background value.

  19. Dilation and Erosion

  20. Opening and Closing • Now we know that Erosion shrinks an object while Dilation expands it. • By combining these operations we get Open or Close operation. • Open: Erosion then Dilation • Close: Dilation then Erosion. • Opening and closing smothes the contour of an object but: • Opening: breaks narrow lines and eliminates thin protrusions( do thickening) • Closing: focus on thin protrusions so it eliminates small holes and fill gaps.

  21. Opening and Closing • Opening: • Closing: • ex: Open Close

  22. Opening and Closing • Perform open transformation on image 1 and closing on image 2 where B is 1? Open by 1 Close by 1

  23. Processing gray scale images • Same methods can be applied to gray scale images just little modification. • Grayscale erode: output at a point is minimum of image pixel and structuring element pixel. • Grayscale dilate: output is maximum of image and structuring element.

  24. Processing gray scale images The structuring element Initial image Dilation results Erosion results

  25. The Hit-and-Miss transform • The hit-and-miss transform is a general binary morphological operation that can be used to look for particular patterns of foreground and background pixels in an image. A⊛B • It is actually the basic operation of binary morphology since almost all the other binary morphology operators can be derived from it. • As with other binary morphology operators it takes as input a binary image and a structuring element and produce another binary image as output.

  26. The Hit-and-Miss transform • The structure element contain both 1 and 0 • The operation is done as: translating the structure image over all points in the image then by comparing the structure element 1’s and 0’s with image if they match then set the underlying pixel to foreground otherwise set as background. • Example of structure element 

  27. The Hit-and-Miss transform • Ex: assume the origin is at the center of 3X3 structure element. In order to find all corners in an image we need to run hit and miss four times with four different structure element. • After obtaining the locations of corners we then simply OR all these images together to get the final result.

  28. The Hit-and-Miss transform Exercise: do the rest and find the result..

  29. Exercise : • How can the hit and miss transform be used to perform erosion? • How can the hit and miss transform be used with the not operation to perform dilation? • What is the smallest number of different structuring elements that you would need to use to locate all foreground points in an image where they have at least one neighbor using the hit and miss transform? What do they look like?

More Related