Download presentation
Presentation is loading. Please wait.
Published bySharon O’Neal’ Modified over 9 years ago
1
Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C. Computer and Robot Vision I Chapter 3 Binary Machine Vision: Region Analysis Presented by: 傅楸善 & 陳弘毅 0922489262 r04922099@ntu.edu.tw 指導教授 : 傅楸善 博士
2
DC & CV Lab. CSIE NTU 3.0 Outline Region properties Signature segmentation properties
3
DC & CV Lab. CSIE NTU 3.2 Map of Region Properties 1. Basic properties 2. Extremal Points 3. Spatial Moments 4. Mixed Spatial Gray Level Moments
4
DC & CV Lab. CSIE NTU 3.2 Map of Region Properties
5
DC & CV Lab. CSIE NTU 3.2 Map of Region Properties 1. Basic properties Microtexture properties ( Co-occurrence) 1) texture second moment 2) texture entropy 3) texture contrast 4) texture homogeneity 5) texture correlation
6
DC & CV Lab. CSIE NTU 3.2 Region Properties bounding rectangle: smallest rectangle circumscribes the region area: centroid: 1 1 1 1 111 1 1 1 1 1111 111100 0 0 0000 0 0 0 0 0 0 0 123456 1 2 3 4 5 6 00000 0 0 0 0 0 0 0 00 00000000 0 0 0 0 0 0 7 7 0 0 1 1
7
DC & CV Lab. CSIE NTU 3.2 Region Properties (cont’) border pixel: has some neighboring pixel outside the region : 4-connected perimeter: if 8-connectivity for inside and outside : 8-connected perimeter: if 4-connectivity for inside and outside
8
DC & CV Lab. CSIE NTU 3.2 Region Properties (cont’) N8(r,c) R ( 1, 0 )
9
DC & CV Lab. CSIE NTU 3.2 Region Properties (cont’) N8(r,c) R ( 1, 1 )
10
DC & CV Lab. CSIE NTU 3.2 Region Properties (cont’) N4(r,c) R ( 1, 0 )
11
DC & CV Lab. CSIE NTU 3.2 Region Properties (cont’) N4(r,c) R ( 1, 1 )
12
DC & CV Lab. CSIE NTU 3.2 Region Properties (cont’) length of perimeter, successive pixels neighbors where k+1 is computed modulo K i.e.
13
DC & CV Lab. CSIE NTU 3.2 Region Properties (cont’) P4
14
DC & CV Lab. CSIE NTU 3.2 Region Properties (cont’) P8
15
DC & CV Lab. CSIE NTU 3.2 Region Properties (cont’) where k+1 is computed modulo K length of perimeter |P 8 | K = 0,1,2,3,
16
DC & CV Lab. CSIE NTU 3.2 Region Properties (cont’) mean distance R from the centroid to the shape boundary standard deviation R of distances from centroid to boundary
17
DC & CV Lab. CSIE NTU 3.2 Region Properties (cont’)
18
DC & CV Lab. CSIE NTU 3.2 Region Properties (cont’)
19
DC & CV Lab. CSIE NTU 3.2 Region Properties (cont’)
20
DC & CV Lab. CSIE NTU 3.2 Region Properties (cont’)
21
DC & CV Lab. CSIE NTU 3.2 Region Properties (cont’) Haralick shows that has properties: 1. digital shape circular, increases monotonically 2. similar for similar digital/continuous shapes 3. orientation (rotation) and area (scale) independent
22
DC & CV Lab. CSIE NTU 3.2 Region Properties (cont’) Average gray level (intensity) Gray level (intensity) variance
23
DC & CV Lab. CSIE NTU 3.2 Region Properties (cont’) microtexture properties: A function of co- occurrence matrix S: set of pixels in designated spatial relationship e.g. 4-neighbors Define the region’s co-occurrence matrix P by
24
DC & CV Lab. CSIE NTU 3.2 Region Properties (cont’)
25
DC & CV Lab. CSIE NTU 3.2 Region Properties (cont’)
26
DC & CV Lab. CSIE NTU 3.2 Region Properties (cont’) 0 0 1 2 3 01230123
27
DC & CV Lab. CSIE NTU
28
DC & CV Lab. CSIE NTU 3.2 Region Properties (cont’) texture second moment (Haralick, Shanmugam, and Dinstein, 1973) GLCM:Grey-Level Co-Occurrence Matrix
29
texture entropy DC & CV Lab. CSIE NTU
30
DC & CV Lab. CSIE NTU 3.2 Region Properties (cont’) texture contrast
31
DC & CV Lab. CSIE NTU 3.2 Region Properties (cont’) texture homogeneity where k is some small constant
32
texture correlation where DC & CV Lab. CSIE NTU
33
DC & CV Lab. CSIE NTU 3.2 Map of Region Properties 2. Extremal Points Definition 1) points 2) axes 3) length 4) orientation Four cases 1) linelike shape 2) Triangular shape 3) square and rectangular shape 4) octagonal shape
34
DC & CV Lab. CSIE NTU 3.2.1 Extremal Points Eight distinct extremal pixels: 1) topmost left 2) topmost right 3) rightmost top 4) rightmost bottom 5) bottommost right 6) bottommost left 7) leftmost bottom 8) leftmost top
35
DC & CV Lab. CSIE NTU 3.2.1 Extremal Points (cont’)
36
DC & CV Lab. CSIE NTU 3.2.1 Extremal Points (cont’) different extremal points may be coincident
37
DC & CV Lab. CSIE NTU 3.2.1 Extremal Points (cont’) association of the name of the eight extremal points with their coordinates
38
DC & CV Lab. CSIE NTU 3.2.1 Extremal Points (cont’) association of the name of an external coordinate with its definition
39
DC & CV Lab. CSIE NTU 3.2.1 Extremal Points (cont’) directly define the coordinates of the extremal points:
40
DC & CV Lab. CSIE NTU 3.2.1 Extremal Points (cont’) extremal points occur in opposite pairs: topmost left bottommost right topmost right bottommost left rightmost top leftmost bottom rightmost bottom leftmost top each opposite extremal point pair: defines an axis axis properties: length, orientation
41
DC & CV Lab. CSIE NTU 3.2.1 Extremal Points (cont’) the length covered by two pixels horizontally adjacent 1: distance between pixel centers 2: from left edge of left pixel to right edge of right pixel
42
DC & CV Lab. CSIE NTU 3.2.1 Extremal Points (cont’) distance calculation: add a small increment to the Euclidean distance
43
DC & CV Lab. CSIE NTU 3.2.1 Extremal Points (cont’) length going from left edge of left pixel to right edge of right pixel θ x
44
DC & CV Lab. CSIE NTU 3.2.1 Extremal Points (cont’) orientation taken counterclockwise w.r.t. column (horizontal) axis
45
DC & CV Lab. CSIE NTU 3.2.1 Extremal Points (cont’) orientation for the axes axes paired: with and with
46
DC & CV Lab. CSIE NTU
47
DC & CV Lab. CSIE NTU 3.2.1 Extremal Points (cont’) calculation of the axis length and orientation of a linelike shape
48
DC & CV Lab. CSIE NTU 3.2.1 Extremal Points (cont’) distance between ith and jth extremal point average value of = 1.12, largest error 0.294 = - 1.12
49
DC & CV Lab. CSIE NTU calculations for length of sides base and altitude for a triangle
50
DC & CV Lab. CSIE NTU calculations for length of sides base and altitude for a triangle
51
DC & CV Lab. CSIE NTU calculation for the orientation of an example rectangle
52
DC & CV Lab. CSIE NTU calculation for the orientation of an example rectangle
53
DC & CV Lab. CSIE NTU 3.2.1 Extremal Points (cont’) axes and their mates that arise from octagonal-shaped regions
54
DC & CV Lab. CSIE NTU 3.2.1 Extremal Points (cont’)
55
DC & CV Lab. CSIE NTU 3.2 Map of Region Properties 3. Spatial Moments 1) Second-order row moment 2) Second-order mixed moment 3) Second-order column moment 4) Second-order mixed gray level spatial moment
56
DC & CV Lab. CSIE NTU 3.2.2 Spatial Moments( 矩 ) Second-order row moment Second-order mixed moment Second-order column moment
57
If a region R is an ellipse whose center is the origin A relationship given by DC & CV Lab. CSIE NTU
58
DC & CV Lab. CSIE NTU 3.2.3 Mixed Spatial Gray Level Moments (cont’) region properties: position, shape, gray level properties Second-order mixed gray level spatial moments
59
3.2.3 Mixed Spatial Gray Level Moments The mixed gray level spatial moments can be used to determine the least-squares gray level intensity planes to the observed gray level spatial pattern of the region R DC & CV Lab. CSIE NTU
60
DC & CV Lab. CSIE NTU 3.2.3 Mixed Spatial Gray Level Moments (cont’) connected components labeling of the image in Fig 2.2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 01 02 03 04 05 06 07 08 09 10 11 12 13
61
DC & CV Lab. CSIE NTU all the properties measured from each of the regions 3.2.3 Mixed Spatial Gray Level Moments (cont’)
62
DC & CV Lab. CSIE NTU 3.2.3 Mixed Spatial Gray Level Moments (cont’)
63
DC & CV Lab. CSIE NTU 3.3 Signature Properties Signature or Projection Area Centroid Second moment Bounding rectangle Rectangle: orientation & position Circle: position
64
DC & CV Lab. CSIE NTU 3.3 Signature Properties vertical projection horizontal projection diagonal projection from lower left to upper right diagonal projection from upper left to lower right
65
DC & CV Lab. CSIE NTU 3.3 Signature Properties
66
DC & CV Lab. CSIE NTU 3.3 Signature Properties (cont’) Compute properties from projections Area, centroid of the region, second moments area
67
DC & CV Lab. CSIE NTU 3.3 Signature Properties (cont’) rmin: top row of bounding rectangle rmax; bottom row of bounding rectangle cmin: leftmost column of bounding rectangle cmax: rightmost column of bounding rectangle
68
DC & CV Lab. CSIE NTU 3.3 Signature Properties (cont’) row centroid column centroid diagonal centroid another diagonal centroid
69
DC & CV Lab. CSIE NTU 3.3 Signature Properties (cont’) second row moment from horizontal projection second column moment from vertical projection second diagonal moment
70
DC & CV Lab. CSIE NTU 3.3 Signature Properties (cont’)
71
DC & CV Lab. CSIE NTU 3.3 Signature Properties
72
DC & CV Lab. CSIE NTU 3.3 Signature Properties (cont’) second diagonal moment related to second mixed moment can be obtained from projection second diagonal moment related to
73
DC & CV Lab. CSIE NTU 3.3 Signature Properties (cont’) second mixed moment can be obtained from projection mixed moment obtained directly from and
74
DC & CV Lab. CSIE NTU 3.3.1 Signature Analysis to Determine the Center and Orientation of a Rectangle signature analysis: important because of easy, fast implementation surface mount device (SMD) inspection: position and orientation of parts
75
DC & CV Lab. CSIE NTU 3.3.1 Signature Analysis to Determine the Center and Orientation of a Rectangle (cont’) determine center of rectangle by corner location side lengths w, h orientation angle
76
DC & CV Lab. CSIE NTU geometry for determining the translation of the center of a rectangle h/2 -w/2
77
DC & CV Lab. CSIE NTU partition rectangle into six regions formed by two vertical lines a known distance g apart and one horizontal line
78
DC & CV Lab. CSIE NTU 3.3.1 Signature Analysis to Determine the Center and Orientation of a Rectangle (cont’)
79
DC & CV Lab. CSIE NTU
80
DC & CV Lab. CSIE NTU where rotation angle 3.3.1 Signature Analysis to Determine the Center and Orientation of a Rectangle (cont’)
81
DC & CV Lab. CSIE NTU 3.3.2 Using Signature to Determine the Center of a Circle (cont’) circle projected onto the four quadrants of the projection index image
82
DC & CV Lab. CSIE NTU
83
DC & CV Lab. CSIE NTU
84
DC & CV Lab. CSIE NTU 3.3.2 Using Signature to Determine the Center of a Circle (cont’) each quadrant area from histogram of the masked projection positive if A + B > C + D negative otherwise where positive if B + D > A + C, negative otherwise
85
DC & CV Lab. CSIE NTU 3.4 Summary region properties from connected components or signature analysis
86
DC & CV Lab. CSIE NTU Histogram Equalization (Homework) a method in image processing of contrast adjustment using the image's histogram pixel transformation r, s: original, new intensity, T: transformation T( r ) single-valued, monotonically increasing for
87
DC & CV Lab. CSIE NTU
88
DC & CV Lab. CSIE NTU histogram equalization histogram linearization number of pixels with intensity j n: total number of pixels for every pixel if then Histogram Equalization (Homework)
89
DC & CV Lab. CSIE NTU Project due Oct. 20 Write a program to do histogram equalization Histogram Equalization (Homework)
90
DC & CV Lab. CSIE NTU End
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.