Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 6 Skeleton & Morphological Operation. Image Processing for Pattern Recognition Feature Extraction Acquisition Preprocessing Classification Post.

Similar presentations


Presentation on theme: "Chapter 6 Skeleton & Morphological Operation. Image Processing for Pattern Recognition Feature Extraction Acquisition Preprocessing Classification Post."— Presentation transcript:

1 Chapter 6 Skeleton & Morphological Operation

2 Image Processing for Pattern Recognition Feature Extraction Acquisition Preprocessing Classification Post Processing Scaling Centering Enhancement Filtering (Transform) Binarization (Thresholding) Edge detection Thinning

3 3 Binary Image Skeleton

4 4 Pattern Skeleton skeleton  An important step in representing the structural shape of a OOI (object of interest) is to reduce it to a graph composed of lines or arc patterns. e.g. characters, fingerprints, circuit diagram, drawing etc. This reduction is most commonly achieved by reducing the region to its skeleton.  The skeleton of the objects can be obtained by (a) Medial axis transform (b) Thinning

5 5 Skeletonization & Thinning  Skeletonization is a process for reducing foreground regions in a binary image to a skeletal remnant that largely preserves the extent and connectivity of the original region while throwing away most of the original foreground pixels.  Under this definition it is clear that thinning produces a sort of skeleton.

6 6 Medial Axis Transform (MAT)  The terms medial axis transform (MAT) and skeletonization are often used interchangeably but we will distinguish between them slightly. The skeleton is simply a binary image showing the simple skeleton.  The MAT on the other hand is a gray-level image where each point on the skeleton has an intensity which represents its distance to a boundary in the original object.

7 7 Medial Axis Transform (MAT)  Every point is specified by giving its distance from the nearest boundary point 1 1.4 1 1 0 1 Euclidean= 1 2 1 2 1 22 0 1 City block= 1 1 1 1 1 11 0 1 Chessboard=

8 8 Medial Axis Transform (MAT) The skeleton is defined as the set of points whose distance from the nearest boundary is locally maximum.

9 9 MAT Algorithm - Perform distance transform: starting from original image k=1,2,… where distance between (m,n) and (i,j) - Repeat until k=max. thickness of the region.

10 10 MAT Algorithm - Skeleton is given by the set of points: - The original object can be recovered by remembering the skeleton and also the distance from the nearest boundary.

11 11

12 12Thinning - The thinned version consists of one pixel width. - Lie roughly along their medial axes. - Requirement: connectedness must be preserved.

13 13 Algorithm:(SPTA) N.J.Naccache & R.Shinghal,”SPTA:A proposed algorithm for thinning binary patterns”,IEEE Transf. On Systems,Man & Cybernetics,Vol.SMC-14,No.13,May/June 1984.pp.409-418.

14 14 Some definitions: 1. Cross point: 2. End-point: only 1 black 8-neighbour:

15 15 Some definitions: 3. Break point: Match one of the following: “-” one or more of these point contain black pixel.

16 16 The Algorithm consists of 2 phases: (a) Smoothing: Remove irregularities and salt-and-pepper noise Remove p in and

17 17 (b) Thinning - During each iteration, “flag” those edge points that are not end-point or break-point (preserve connectedness). - At the end of iteration, all flagged point removed.

18 18 Consider 4 types of edge points: Left edge point : n 4 = white(0) Right edge point: n 0 = white(0) Top edge point: n 2 = white(0) Left edge point: n 6 =white(0) A point can be more than one type of edge point.

19 19 Consider left edge point (without lost of generality): if a pixel matches one of the following, the pixel not flagged. X,Y = don’t care

20 20 For (a), (b), (c): (1) if all X’s are white, p is an end-point. (2) if at least one of X’s is dark – break point. For (d), if at least 1 X and at least 1 Y are dark, then p is a break point. Otherwise, assume all X=0, at least 1Y is dark, then p is a either end-point or break-point.

21 21 w1,w2,w3 - p is an end point ; w4 - p is a break point; w5,w6 - may cause excessive erosion if deleted. (especially for slant edge) w7,w8 – containing meaningful feature, such as or ◆. [Note that noise is removed in the 1st phase already]

22 22 A left safe point is a left edge point which matches any one of (a) to (d), or the following expression s 4 is false. Where n i is TRUE if it is dark and unflagged.

23 23 Similarly, A right safe point: Top safe point: Bottom safe point:

24 24 Each iteration consists of 2 pass:.1st pass - flag left edge point & right edge point.2nd pass – flag top edge point & bottom edge point.

25 25

26 26 Binary Image Morphology

27 27

28 28

29 29

30 30

31 31

32 32

33 33

34 34

35 35

36 36

37 37

38 38

39 39

40 40

41 41

42 42

43 43

44 44

45 45 You can use morphological opening to remove small objects from an image while preserving the shape and size of larger objects in the image.

46 46 This example uses open to filter out the smaller objects in an image.

47 47 This examples closes an image to merge together the small features in the image that are close together.

48 48 boundary The boundary of a set A, denoted, can be obtained by first eroding A with B, where B is a suitable structuring element, and then performing the set difference between A and its erosion. That is Typically, B would be a matrix of 1s.

49 49 skeleton The skeleton of a set can be expressed in terms of erosions and openings. Thus, it can be shown that where B is a structuring element, indicates k successive erosions of A, and K is the last iterative step before A erodes to an empty set.

50 50 Gray-value morphological processing  The techniques of morphological filtering can be extended to gray-level images.  To simplify matters we will restrict our presentation to structuring elements, B, that comprise a finite number of pixels and are convex and bounded, ex. disc SE. Now, however, the structuring element has gray values associated with every coordinate position.

51 51 Gray-level dilation, DG (*), is given by: For a given output coordinate [m,n], the structuring element is summed with a shifted version of the image and the maximum encountered over all shifts within the J x K domain of B is used as the result. Erosion -

52 52 Opening - Closing -

53 53 Bottomhat: Subtracts the original image from a morphologically closed version of the image. Can be used to find intensity troughs in an image. Tophat: Subtracts a morphologically opened image from the original image. Can be used to enhance contrast in an image.

54 54 Top-hat and bottom-hat filtering can be used together to enhance contrast in an image.


Download ppt "Chapter 6 Skeleton & Morphological Operation. Image Processing for Pattern Recognition Feature Extraction Acquisition Preprocessing Classification Post."

Similar presentations


Ads by Google