digital image processing n.
Skip this Video
Loading SlideShow in 5 Seconds..
Download Presentation

Loading in 2 Seconds...

play fullscreen
1 / 58


  • Uploaded on

Chapter 9 – Morphological Image Processing. DIGITAL IMAGE PROCESSING. J. Shanbehzadeh, M. Mahdijo Khwarizmi University of Tehran. Table of Contents. Preview. Morphology : form and structure Extracting image components for:

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'DIGITAL IMAGE PROCESSING' - vondra

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.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 - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
digital image processing

Chapter 9 – Morphological Image Processing


J. Shanbehzadeh, M. Mahdijo

Khwarizmi University of Tehran

  • Morphology : form and structure
  • Extracting image components for:

representation and description of region shape

  • From

Image processing methods

Input: Image Output: Image

  • To

Image processing methods

Input: Image Output: Attributes

9 1 preliminaries
9.1 Preliminaries
  • Reflection and Translation:
  • Translation :

(B)z = {c | c = b + z, for b є B}

9 1 preliminaries1
9.1 Preliminaries
  • Structuring Elements:
9 1 preliminaries2
9.1 Preliminaries
  • Structuring Elements:
9 2 erosion and dilation
9.2 Erosion and Dilation
  • Erosion

(B)z = {c | c = b + z, for b є B}

computing the erosion of a binary image
Computing the Erosion of a Binary Image
  • For each foreground pixel, we superimpose the structuring element on top of the input image so that the origin of the structuring element coincides with the input pixel coordinates.
  • If for every pixel in the structuring element, the corresponding pixel in the image underneath is
    • a foreground pixel, then the input pixel is left as it is.
    • Otherwise, it is set to background value.
the effect of erosion
The effect of Erosion
  • removing any foreground pixel that is not completely surrounded by other white pixels (assuming 8-connectedness).
  • Such pixels must lie at the edges of white regions, and so the practical upshot is that foreground regions shrink (and holes inside a region grow).
9 2 erosion1
9.2 Erosion
  • Erosion (More examples):
9 2 erosion2
9.2 Erosion
  • Erosion (More examples):
9 2 dilation
9.2 Dilation

(B)z = {c | c = b + z, for b є B}

  • Dilation
  • The basic effect of the operator on a binary image is to gradually enlarge the boundaries of regions of foreground pixels.
  • Thus areas of foreground pixels grow in size while holes within those regions become smaller
gray level erosion dilation
Gray level erosion /dilation

􀂄 Erosion:

􀂄 Chose the local minimum over the region defined by

the structure element

􀂄 Put the minimums value in the same pixel position in

the out image Results in darker images and light details are removed







An isthmus (/ˈɪsθməs/ or /ˈɪsməs/; plural: isthmuses; from Ancient Greek:ἰσθμόςisthmos “neck”) is a narrow strip of land connecting two larger land areas, usually with water on either side.[1] A tombolo is an isthmus where the strip of land consists of a spit or bar.

The Suez Canal goes across the western side of the Sinai Peninsula

The Isthmus of Panama


pro·trude  (prō-tro̅o̅d′)·trud·ed, pro·trud·ing, pro·trudespro·trude  (prō-tro̅o̅d′)·trud·ed, pro·trud·ing, pro·trudes push or thrust outward.

v.intr.To jut out; project. See Synonyms at bulge.

Example sentences

The air-conditioner does not protrude  into the alley.

They are large-bodied and display a mouthful ofsharp teeth that protrude  in 

Samantha's face and paws protrude  from thecutout door.

Scrub the mussels, and use a paring knife toremove any beards that protrude 

9 3 opening and closing1
9.3 Opening and Closing
  • Opening:
    • smoothes the contour of an object , breaks narrow isthmuses, and eliminates thin protrusions.



  • Opening is defined as an erosion followed by a dilation using the same structuring element for both operations.
  • Opening removes some of the foreground (bright) pixels from the edges of regions of foreground pixels.
  • Opening is less destructive than erosion in general.
  • The exact operation is determined by a structuring element.
  • The effect of the operator is:
  • to preserve foreground regions that
    • have a similar shape to this structuring element,
    • or can completely contain the structuring element,
  • Eliminating all other regions of foreground pixels.

Effect of opening using a 3×3 square structuring element

  • opening can be very useful for separating out particularly shaped objects from the background,
  • opening is far from being a universal 2-D object recognizer/segmenter.
  • E.g. if we use a long thin structuring element to locate a pencils in our image, any one such element will only find pencils at a particular orientation.
  • If it is necessary to find pencils at other orientations then differently oriented elements must be used to look for each desired orientation.
  • It is also necessary to be very careful that the structuring element chosen does not eliminate
    • too many desirable objects, or
    • retain too many undesirable ones, and
    • sometimes this can be a delicate or even impossible balance
9 3 opening
9.3 Opening


9 3 opening1
9.3 Opening


Separate out the circles from the lines, so that they can be counted.Opening with a disk shaped structuring element 11 pixels in diameter gives

9 3 opening2
9.3 Opening


Extracting the horizontal and vertical linesThe results of an Openingwith a 3×9 vertically and 9x3 horizontally oriented structuring elementis shown.

9 3 opening and closing2
9.3 Opening and Closing

Opening in removing salt noise:

9 3 opening and closing3
9.3 Opening and Closing

Opening in removing pepper noise:


9.3 Closing


  • Closing:
    • Smooth sections of contours, but as opposed to Opening, it generally fuses narrow breaks and long thin gulfs, eliminates small holes, and fills gaps in the contour



  • Closing is opening performed in reverse.
  • Closing is the dual of opening,
    • i.e. closing the foreground pixels with a particular structuring element, is equivalent to closing the background with the same element.
  • a dilation followed by an erosion using the same structuring element for both operations.
  • The closing operator requires two inputs:
    • an image to be closed
    • a structuring element.

Effect of closing using a 3×3 square structuring element

9 3 closing
9.3 Closing


9 3 closing exapmles
9.3 Closing: exapmles

Removing the small holes while retaining the large holes

Closingwitha 22 pixel diameter disk

  • Closing with a disk-shaped structuring element with a diameter larger than the smaller holes
9 3 closing examples
9.3 Closing: examples

Enhance binary images of objects obtained from thresholding

9 3 closing1
9.3 Closing

Closing for pepper noise:

9 3 closing2
9.3 Closing

Closing for salt noise:

9 3 opening and closing5
9.3 Opening and Closing

(a) A o B is a subset (subimage) of A.

(b) If C is a subset of D, then C o B is a subset of D o B.

(c) (A o B) o B = A o B.

(a) A is a subset (subimage) of A • B.

(b) If C is a subset of D, then C • B is a subset of D • B.

(c) (A•B)•B=A•B.

9 4 the hit or miss transformation
9.4 The Hit-or-Miss Transformation

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. It is actually the basic operation of binary morphology since almost all the other binary morphological operators can be derived from it.

9 4 the hit or miss transformation1
9.4 The Hit-or-Miss Transformation

The structuring element used in the hit-and-miss is a slight extension to the type that has been introduced for erosion and dilation, in that it can contain both foreground and background pixels, rather than just foreground pixels.

Example of the extended type of structuring element used in hit-and-miss operations. This particular element can be used to find corner points.

9 4 the hit or miss transformation2
9.4 The Hit-or-Miss Transformation

Four structuring elements used for corner finding in binary images using the hit-and-miss transform. Note that they are really all the same element, but rotated by different amounts.

After obtaining the locations of corners in each orientation, We can then simplyORall these images together to get the final result showing the locations of all right angle convex corners in any orientation.






The Hit-or-Miss Transformation