560 likes | 783 Views
Chapter 9. Morphological Image Processing. Preview. Morphology About the form and structure of animals and plants Mathematical morphology Using set theory Extract image component Representation and description of region shape. Z 2 and Z 3.
E N D
Chapter 9 Morphological Image Processing
Preview • Morphology • About the form and structure of animals and plants • Mathematical morphology • Using set theory • Extract image component • Representation and descriptionof region shape
Z2 and Z3 set in mathematic morphology represent objects in an image binary image (0 = white, 1 = black) : the element of the set is the coordinates (x,y) of pixel belong to the object Z2 gray-scaled image : the element of the set is the coordinates (x,y) of pixel belong to the object and the gray levels Z3 3
Logic operations on binary images • Functionally complete operations • AND, OR, NOT
Special set operationsfor morphology translation reflection
Structuring element (SE) • small set to probe the image under study • for each SE, define origin. • shape and size must be adapted to geometric • properties for the objects 7
Outline • erosion and Dilation • Opening and closing • Hit-or-miss transformation • Some basic morphological algorithms • Extensions to gray-scale images
Erosion Does the structuring element fit the set? erosion of a set A by structuring element B: all z in A such that B is in A when origin of B=z shrink the object 10
Dilation Does the structuring element hit the set? dilation of a set A by structuring element B: all z in A such that B hits A when origin of B=z grow the object 13
Application of dilation: bridging gaps in images Structuring element Effects: increase size, fill gap max. gap=2 pixels
Application of erosion: eliminate irrelevant detail Squares of size 1,3,5,7,9,15 pels Erode with 13x13 square original image erosion dilation
Outline • Preliminaries • Dilation and erosion • Opening and closing • Hit-or-miss transformation • Some basic morphological algorithms • Extensions to gray-scale images
Opening • Dilation: expands image w.r.t structuring elements • Erosion: shrink image • erosion+dilation = original image ? • Opening= erosion + dilation
Opening (cont.) Find contour Fill in contour Smooth the contour of an image, breaks narrow isthmuses, eliminates thin protrusions
Closing • Dilation+erosion = erosion + dilation ? • Closing = dilation + erosion
Closing (cont.) Find contour Fill in contour Smooth the object contour, fuse narrow breaks and long thin gulfs, eliminate small holes, and fill in gaps
Properties of opening and closing • Opening • Closing
Noisy image Remove outer noise opening closing Remove inner noise
Outline • Preliminaries • Dilation and erosion • Opening and closing • Hit-or-miss transformation • Some basic morphological algorithms • Extensions to gray-scale images
Hit-or-miss transformation • Find the location of certain shape X erosion Find the set of pixels that contain shape X
Hit-or-miss transformation Detect object via background Erosion with (W-X)
Hit-or-miss transformation • Eliminate un-necessary parts AND
Basic morphological algorithms • Extract image components that are useful in the representation and description of shape • Boundary extraction • Region filling • Extract of connected components • Convex hull • Thinning • Thickening • Skeleton • Pruning
Region filling • How? • Idea: place a point inside the region, then dilate that point iteratively Until Bound the growth
Extraction of connected components • Idea: start from a point in the connected component, and dilate it iteratively Until
original thresholding erosion
Convex hull A set A is said to be convex if the straight line segment joining any two points in A lies entirely within A. The convex hull of a set A is the smallest convex set containing A. 41
Convex hull 42
Thinning 43
Thickening 2. Ac 1. A 4. complement the result in 3 3. Thinning Ac 44
Skeletons How to define a Skeletons? Maximum disk Set A 1. The largest disk Centered at a pixel 2. Touch the boundary of A at two or more places Recall: Balls of erosion!
Skeletons 46
Pruning H = 3x3 structuring element of 1’s 50