Morphological Operation

15
Morphological Operation What if your images are binary masks? Binary image processing is a well- studied field, based on set theory, called Mathematical Morphology Slides from Alexei Efros

description

Morphological Operation. What if your images are binary masks? Binary image processing is a well-studied field, based on set theory, called Mathematical Morphology. Slides from Alexei Efros. Preliminaries. Preliminaries. Preliminaries. Basic Concepts in Set Theory. - PowerPoint PPT Presentation

Transcript of Morphological Operation

Page 1: Morphological Operation

Morphological OperationWhat if your images are binary masks?

Binary image processing is a well-studied field, based on set theory, called Mathematical Morphology

Slides from Alexei Efros

Page 2: Morphological Operation

Preliminaries

Page 3: Morphological Operation

Preliminaries

Page 4: Morphological Operation

Preliminaries

Page 5: Morphological Operation

Basic Concepts in Set Theory

A is a set in , a=(a1,a2) an element of A, aAIf not, then aA: null (empty) setTypical set specification: C={w|w=-d, for d D}A subset of B: ABUnion of A and B: C=ABIntersection of A and B: D=ABDisjoint sets: AB= Complement of A:Difference of A and B: A-B={w|w A, w B}=

Z 2

Ac {w |w A}

ABc

Page 6: Morphological Operation

Dilation and ErosionTwo basic operations:

• A is the image, B is the “structural element”, a mask akin to a kernel in convolution

Dilation :

(all shifts of B that have a non-empty overlap with A)

Erosion :

(all shifts of B that are fully contained within A)

}])[(|{

})(|{

AABzBA

ABzBA

z

z

})(|{ ABzBA z

Page 7: Morphological Operation

Dilation

Page 8: Morphological Operation

Dilation

Page 9: Morphological Operation

Erosion

Page 10: Morphological Operation

Erosion

Original image Eroded image

Page 11: Morphological Operation

Erosion

Eroded once Eroded twice

Page 12: Morphological Operation

Opening and ClosingOpening : smoothes the contour of an object, breaks narrow

isthmuses, and eliminates thin protrusions

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

Prove to yourself that they are not the same thing. Play around with bwmorph in Matlab.

BBABA )(

BBABA )(

Page 13: Morphological Operation

OPENING: The original image eroded twice and dilated twice (opened). Most noise is removed

Opening and Closing

CLOSING: The original image dilated and then eroded. Most holes are filled.

Page 14: Morphological Operation

Boundary Extraction

)()( BAAA

Page 15: Morphological Operation

Boundary Extraction