Presentation is loading. Please wait.

Presentation is loading. Please wait.

Morphological Filtering

Similar presentations


Presentation on theme: "Morphological Filtering"— Presentation transcript:

1 Morphological Filtering

2 Morphological Filtering
Spatial Filtering Morphological operators: are used to change image data to reflect new geometric structure. Basics of Morphological Filtering To kinds : Binary Morphology Grey Level Morphology

3 Libraries of Structuring Elements
Application specific structuring elements created by the user

4 Binary Morphology Binary images often suffer from noise (specifically salt- and-pepper noise) Binary regions also suffer from noise (isolated black pixels in a white region). Can also have cracks, picket fence , etc. Dilation and erosion are two binary morphological operations that can assist with these problems.

5 Dilation Dilation is used for expanding an element A by using structuring element B. The dilation operator takes two pieces of data as input A binary image, which is to be dilated A structuring element (or kernel), which determines the behavior of the morphological operation

6 Main Applications of Dilation
Expand shapes Fills in holes, crack, valleys between spiky regions Smoothes object boundaries. Adds an extra outer ring of pixels onto object boundary, ie, object becomes slightly larger. (sets background pixels adjacent to object's contour to object's value) smoothes small negative grey level regions

7 Main Applications of Dilation

8 Dilation – A More interesting Example cracks

9 Dilation

10 Dilation fills holes Fills in holes. Smoothes object boundaries.
Adds an extra outer ring of pixels onto object boundary, ie, object becomes slightly larger.

11 Dilation example

12 Dilation explained pixed by pixel
Denotes origin of B i.e. its (0,0) Denotes origin of A i.e. its (0,0)

13 Dilation explained by shape of A
Shape of A repeated without shift B Shape of A repeated with shift A

14 Structuring Element for Dilation
Length 6 Length 5

15 Structuring Element for Dilation

16 Structuring Element for Dilation
Single point in Image replaced with this in the Result

17 Structuring Element for Dilation

18 Illustration of Extensitivity of Dilation
B Replaced with

19 Definition of Dilation: Mathematically
Let A and B are subsets in 2-D space. A: image undergoing analysis, B: Structuring element, denotes dilation

20 Dilation explained pixed by pixel
(0,1) + (0,0)= (0,1) (1,2) + (0,0)= (1,2) (1,3) + (0,0)= (1,3) (1,4) + (0,0)= (1,4) (2,2) + (0,0)= (2,2) (0,1) + (1,0)= (1,1) (1,2) + (1,0)= (2,2) (1,3) + (1,0)= (2,3) (1,4) + (1,0)= (2,4) (2,2) + (1,0)= (3,2)

21 Mathematical Properties of Dilation
Commutative Associative Linearity Containment Decomposition of structuring element

22 More Properties of Dilation
Translation Invariance Linearity Containment Decomposition of structuring element

23 Dilation Question: Suppose that the structuring element is a 3x3 square with the origin at its center evaluate the new image 1 { (-1,-1), (0,-1), (1,-1), (-1,0), (0,0), (1,0), ( 1,1), (0,1), (1,1) } B = A =

24 Dilation

25 In MATLAB Codes Dilation image:
strel:This function creates amorphological structuring element. SE=strel(‘shape’,parameters) Dilation image: imdilate: This function Dilate the image. I2=imerode(‘image’,SE) shape parameters ‘disk’ R ‘line’ Len,deg ‘square’ w ‘rectangle’ [m n]

26 Codes Example1: A = imread(‘Image.tif'); figure,imshow(A);
se = strel('disk',3); A2 = imdilate(A, se); imshow(A), figure,imshow(A2); Example 2: A = imread('broken-text.tif'); B = [0 1 0; 1 1 1; 0 1 0]; A2 = imdilate(A,B); imshow(A),figure,imshow(A2)

27 Example of Dilation with various sizes of structuring elements
Pablo Picasso, Pass with the Cape, 1960


Download ppt "Morphological Filtering"

Similar presentations


Ads by Google