Presentation is loading. Please wait.

Presentation is loading. Please wait.

Morphological Image Processing Md. Rokanujjaman Assistant Professor Dept of Computer Science and Engineering Rajshahi University.

Similar presentations


Presentation on theme: "Morphological Image Processing Md. Rokanujjaman Assistant Professor Dept of Computer Science and Engineering Rajshahi University."— Presentation transcript:

1 Morphological Image Processing Md. Rokanujjaman Assistant Professor Dept of Computer Science and Engineering Rajshahi University

2 What are Morphological Operations? Morphological operations come from the word “morphing” in Biology which means “changing a shape”. Morphing Image morphological operations are used to manipulate object shapes such as thinning, thickening, and filling. Binary morphological operations are derived from set operations.

3 Basic Set Operations Concept of a set in binary image morphology: Each set may represent one object. Each pixel (x,y) has its status: belong to a set or not belong to a set.

4 Translation and Reflection Operations A (A) z z = (z 1,z 2 ) TranslationReflection B

5 Logical Operations* *For binary images only

6 Structuring Element The two most common structuring elements (given a Cartesian grid) are the 4-connected and 8-connected sets, N 4 and N 8. They are illustrated in Figure. Figure: The standard structuring elements N 4 and N 8.

7 Binary Images For a binary image, white pixels are normally taken to represent foreground regions, while black pixels denote background. (Note that in some implementations this convention is reversed, and so it is very important to set up input images with the correct polarity for the implementation being used). Then the set of coordinates corresponding to that image is simply the set of two- dimensional Euclidean coordinates of all the foreground pixels in the image, with an origin normally taken in one of the corners so that all coordinates have positive elements.

8 Fundamental Morphological Operations Erosion and dilation work (at least conceptually) by translating the structuring element to various points in the input image, and examining the intersection between the translated kernel coordinates and the input image coordinates. For instance, in the case of erosion, the output coordinate set consists of just those points to which the origin of the structuring element can be translated, while the element still remains entirely `within' the input image. Virtually all other mathematical morphology operators can be defined in terms of combinations of erosion and dilation along with set operators such as intersection and union. Some of the more important are opening, closing and skeletonization.

9 Fitting and Hitting When we place a structuring element in a binary image, each of its pixels is associated with the corresponding pixel of the neighborhood under the structuring element. In this sense, a morphological operation resembles a “binary correlation”. The operation is logical rather than arithmetic in nature. The structuring element is said to fit the image if, for each of its pixels that is set to 1, the corresponding image pixel is also 1. The structuring element is said to hit, an image if for any of its pixels that is set to 1, the corresponding image pixel is also 1.

10 Dilation Operations A = Object to be dilated B = Structuring element = Empty set Dilate means “extend” Or The dilation A by B is the set of all displacements z, such that reflection of B and A overlap by at least one element.

11 Dilation Operations (cont.) Structuring Element (B) Original image (A) Reflection Intersect pixelCenter pixel

12 Dilation Operations (cont.) Result of Dilation Boundary of the “center pixels” where intersects A

13 Example: Application of Dilation “Repair” broken characters

14 Erosion Operation A = Object to be eroded B = Structuring element Erosion means “trim” Or, The erosion of A by B is the set of all points z such that B translated by z is contained in A

15 Erosion Operations (cont.) Structuring Element (B) Original image (A) Intersect pixelCenter pixel

16 Erosion Operations (cont.) Result of Erosion Boundary of the “center pixels” where B is inside A

17 Example: Application of Dilation and Erosion Remove small objects such as noise

18 Duality Between Dilation and Erosion Proof: where c = complement

19 Opening Operation = Combination of all parts of A that can completely contain B Opening eliminates narrow and small details and corners. The process of erosion followed by dilation is called opening. It has the effect of eliminating small and thin objects, breaking the objects at thin points and smoothing the boundaries/contours of the objects.

20 Example of Opening

21 Closing Operation Closing fills narrow gaps and notches The process of dilation followed by erosion is called closing. It has the effect of filling small and thin holes, connecting nearby objects and smoothing the boundaries/contours of the objects.

22 Example of Closing

23 Example: Application of Morphological Operations Finger print enhancement

24 Hit-or-Miss Transformation * where X = shape to be detected W = window that can contain X Hit-or-miss transform can be used for shape detection/ Template matching.

25 Hit-or-Miss Transformation (cont.) *

26 Boundary Extraction Original image Boundary The boundaries/edges of a region/shape can be extracted by first applying erosion on A by B and subtracting the eroded A from A.

27 Region Filling Original image Results of region filling where X 0 = seed pixel p Region filling can be performed by using the following definition. Given a symmetric structuring element B, one of the non-boundary pixels (X) is consecutively diluted and its intersection with the complement of A is taken as follows: Terminates when X k = X k-1

28 Extraction of Connected Components where X 0 = seed pixel p Terminates when X k = X k-1

29 Convex Hull * Convex hull has no concave part. Convex hull Algorithm: where

30 Example: Convex Hull

31 Thinning * *

32 Example: Thinning Make an object thinner.

33 Thickening *..... Make an object thicker *

34 Skeletons Dot lines are skeletons of this structure

35 Skeletons (cont.) with where k times and

36 Skeletons

37 Thank You


Download ppt "Morphological Image Processing Md. Rokanujjaman Assistant Professor Dept of Computer Science and Engineering Rajshahi University."

Similar presentations


Ads by Google