Presentation is loading. Please wait.

Presentation is loading. Please wait.

Image Segmentation and Morphological Processing Digital Image Processing in Life- Science Aviad Baram 4-4-2012.

Similar presentations


Presentation on theme: "Image Segmentation and Morphological Processing Digital Image Processing in Life- Science Aviad Baram 4-4-2012."— Presentation transcript:

1 Image Segmentation and Morphological Processing Digital Image Processing in Life- Science Aviad Baram 4-4-2012

2 Image In Attributes out Image InImage out Processing vs Analysis Image processing: Image analysis: Enhance contrast SmoothRegionEdges “meaning”

3 Part I - Segmentation Subdivide the image into constituent regions or objects (sets) Based on properties of intensity values ▪Discontinuity – changes (e.g. edges) ▪Similarity – partition into similar regions

4 Basic set operations Union (R r ∪ R g ) Complementary (R rg c )Intersect (R r ∩R g ) Exclusive or (R r ⊕ R g )

5 Synonyms in set operations Selection ROI Make Inverse OR (Combine) AND XOR Mathematical Set (R i ) Complementary (R i c ) Union (R i ∪ R j ) Intersect (R i ∩R j ) Exclusive disjunction (R i ⊕ R j ) Binary Mask Inverse OR AND XOR

6 Automatic approaches ■ Discontinuity – Edge based methods ■ Classical gradient detectors (Sobel, Prewitt...) ■ Canny edge detector ■ Similarity - threshold Why? Human comprehension is far superior Unbiased High throughput – ImageJ macros

7 Edge detection Find the boundary of a region by identifying points, lines and edges Tools: ▪Second derivatives (Laplacian) operators ▪Very sensitive to noise ▪Double line detection (show example) ▪First derivative ▪Smoother ▪Less sensitive

8 Derivatives noise First derivative Second derivative

9 Derivatives noise First derivative Second derivative

10 Derivatives noise First derivative Second derivative

11 Laplacian double edge

12 Prewitt and Sobel DerivativeSobel -20 1 210 0

13 Laplacian of Gaussian - LoG Laplacian LoG

14 Canny edge detector angle norm Nonmaxima suppression along gradient Double threshold → use TH edge pixels as seeds to connect TL edges

15 Edge detection Summary 1 st derivative2 nd derivativeSource LoGSobelCanny

16 Similarity - Threshold Partition Image into regions ▪Global threshold ▪Adaptive threshold ▪Smaller image blocks ▪Threshold for each blocks ▪Interpolate results for each pixels

17 Global threshold - noise T1T1 T2T2 abc

18 Global threshold - background

19 Automatic global threshold Example 1 - mean: Initial estimate for T Segment into G 1 and G 2 Compute mean for G 1 and G 2 Compute new threshold G1G1 G2G2 G1G1 G2G2 Repeat until no significant change

20 Automatic global threshold Example 2 – Otsu: minimize error in pixel assignment to groups Global mean: m G Global variance: σ 2 G mean 1 mean 2 Between-class variance: σ 2 B “goodness” of TH: Calculate for all thresholds and choose the max σ 2 B smoothing images improves auto segmentation

21 Local thresholding Calculate T from “subimage” histogram (e.g. edges...) ⇒ apply to full image

22 Variable thresholding For each pixel, f(x,y), compute a threshold, T xy, based on m xy and σ xy of neighborhood S xy Mean m - meanσ - variance

23 Part II - Morphology Processing of region shapes

24 Structuring Elements

25 Erosion A⊖BA⊖B

26 Remove connecting lines Shrink regions

27 Dilation A⊕BA⊕B

28 Bridge gaps Grow regions Dilate ⇔ Erode C

29 Open A◦BA◦B Smooth contour Break narrow bridges Eliminate protrusions nX Erode → n X dilate

30 Close ABAB Smooth contour Fuse narrow breaks Eliminate small holes Fills gaps nX dilate → n X erode Open ⇔ Close C

31 Boundary extraction Subtract the eroded image from original

32 Skeletons Minimal set required for reconstruction ImageJ built in function – erode to single pixel

33 Fill holes Hole – background region surrounded by a foreground connected border

34 Hit or Miss A ⊛ B=(A ⊖ B 1 )∩(A C ⊖ B 2 ) Shape detection Probe for object Probe for background

35 Watershed ImageJ built inSegmentationGray level

36 ImageJ Set Measurement...

37 Gray level morphology ErodeDilateOpenClose

38 Examples Yael MutsafiAyelet Tetelboim


Download ppt "Image Segmentation and Morphological Processing Digital Image Processing in Life- Science Aviad Baram 4-4-2012."

Similar presentations


Ads by Google