Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer and Robot Vision I

Similar presentations


Presentation on theme: "Computer and Robot Vision I"— Presentation transcript:

1 Computer and Robot Vision I
Chapter 6 Neighborhood Operators Presented by: 林德垣 指導教授: 傅楸善 博士 Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

2 6.1 Introduction neighborhood operator: workhorse of low- level vision
neighborhood operator: performs conditioning, labeling, grouping DC & CV Lab. CSIE NTU

3 6.1 Introduction The output of a neighborhood operator at a given pixel position is a function of the position, of the input pixel value at the position, of the values of the input pixels in some neighborhood around the given input position, and possibly of some values of previously generated output pixels DC & CV Lab. CSIE NTU

4 6.1 Introduction numeric domain: arithmetic operations, +, -, min, max
symbolic domain: Boolean operations, AND, OR, NOT, table-look-up nonrecursive neighborhood operators: output is function of input recursive neighborhood operators: output depends partly on previous output DC & CV Lab. CSIE NTU

5 6.1 Introduction neighborhood might be small and asymmetric or large
DC & CV Lab. CSIE NTU

6 6.1 Introduction : set of neighboring pixel positions around position
general nonrecursive neighborhood operator : input , output DC & CV Lab. CSIE NTU

7 6.1 Introduction linear operator: one common nonrecursive neighborhood operator output: possibly position-dependent linear combination of inputs DC & CV Lab. CSIE NTU

8 6.1 Introduction shift-invariant: position invariant: action same regardless of position composition of shift-invariant operators: shift-invariant [e.g.] N satisfies a Shift invariance: (r’, c’) ∈ N(r,c) (r’- u, c’-v) ∈ N(r-u, c-v) , for all (u,v) DC & CV Lab. CSIE NTU

9 6.1 Introduction cross-correlation of with
: weight function: kernel or mask of weights : domain of DC & CV Lab. CSIE NTU

10 6.1 Introduction common masks for noise cleaning, (a) box filter
DC & CV Lab. CSIE NTU

11 6.1 Introduction common masked for noise cleaning DC & CV Lab.
CSIE NTU

12 6.1 Introduction Different N x N filter effects comparison
Original Image 3 x 3 5 x 5 9 x 9 15 x 15 35 x 35 DC & CV Lab. CSIE NTU

13 6.1 Introduction application of mask with weights to image 7.69
DC & CV Lab. CSIE NTU

14 6.1 Introduction convolution of with
convolution: close relative to cross-correlation convolution: linear shift-invariant if mask symmetric, convolution, and correlation the same DC & CV Lab. CSIE NTU

15 6.2 Symbolic Neighborhood Operators
indexing of neighborhoods DC & CV Lab. CSIE NTU

16 6.2.1 Region-Growing Operator
: projection, outputs first or second argument : background background pixel labeled first nonbackground label DC & CV Lab. CSIE NTU

17 6.2.1 Region-Growing Operator
4-connected: output: DC & CV Lab. CSIE NTU

18 6.2.1 Region-Growing Operator
8-connected: output: DC & CV Lab. CSIE NTU

19 6.2.1 Region-Growing Operator
DC & CV Lab. CSIE NTU

20 6.2.1 Region-Growing Operator
DC & CV Lab. CSIE NTU

21 6.2.1 Region-Growing Operator
DC & CV Lab. CSIE NTU

22 6.2.1 Region-Growing Operator
DC & CV Lab. CSIE NTU

23 6.2.1 Region-Growing Operator
DC & CV Lab. CSIE NTU

24 6.2.2 Nearest Neighbor Sets and Influence Zones
influence zones: nearest neighbor sets influence zones: iteratively region-growing DC & CV Lab. CSIE NTU

25 6.2.2 Nearest Neighbor Sets and Influence Zones
4-neighborhood for city-block distance e.g. ( i , j ), ( k , l ) : | ( k – i ) | + | ( l – j ) | 8-neighborhood for max distance (of horizontal and vertical distances) e.g. ( i , j ), ( k , l ) : max( | k – i | , | l – j | ) alternate 4, 8-neighborhood for Euclidean distance DC & CV Lab. CSIE NTU

26 Take a Break DC & CV Lab. CSIE NTU

27 6.2.3 Region-Shrinking Operator
region-shrinking: changes all border pixels to background region-shrinking: can change connectivity region-shrinking: can entirely delete region if repeatedly applied DC & CV Lab. CSIE NTU

28 6.2.3 Region-Shrinking Operator
: whether or not arguments identical : background border: has different neighbor and becomes background DC & CV Lab. CSIE NTU

29 6.2.3 Region-Shrinking Operator
4-connected: output: DC & CV Lab. CSIE NTU

30 6.2.3 Region-Shrinking Operator
8-connected: output: DC & CV Lab. CSIE NTU

31 6.2.3 Region-Shrinking Operator
region shrinking: related to binary erosion except on labeled region DC & CV Lab. CSIE NTU

32 6.2.3 Region-Shrinking Operator
DC & CV Lab. CSIE NTU

33 6.2.3 Region-Shrinking Operator
DC & CV Lab. CSIE NTU

34 6.2.3 Region-Shrinking Operator
DC & CV Lab. CSIE NTU

35 6.2.3 Region-Shrinking Operator
DC & CV Lab. CSIE NTU

36 6.2.4 Mark-Interior/Border-Pixel Operator
mark-interior/border-pixel operator marks all interior pixels with the label and all border pixels with the label DC & CV Lab. CSIE NTU

37 6.2.4 Mark-Interior/Border-Pixel Operator
: whether or not arguments identical : recognizes whether or not its argument is symbol DC & CV Lab. CSIE NTU

38 6.2.4 Mark-Interior/Border-Pixel Operator
4-connected: output: DC & CV Lab. CSIE NTU

39 6.2.4 Mark-Interior/Border-Pixel Operator
8-connected: output: DC & CV Lab. CSIE NTU

40 6.2.5 Connectivity Number Operator
connectivity number: nonrecursive and symbolic data domain connectivity number: classify the way pixel connected to neighbors six values of connectivity: five for border, one for interior border: isolated, edge, connected, branching, crossing DC & CV Lab. CSIE NTU

41 6.2.5 Connectivity Number Operator
DC & CV Lab. CSIE NTU

42 6.2.5 Connectivity Number Operator
corner neighborhood DC & CV Lab. CSIE NTU

43 6.2.5 Connectivity Number Operator
DC & CV Lab. CSIE NTU

44 Yokoi Connectivity Number
: corner transition : corner all , no transition : center , neighbor , nothing will happen DC & CV Lab. CSIE NTU

45 Yokoi Connectivity Number
5: no transition all 8 neighbors 1, thus interior : 1 transition generates one connected component if center removed DC & CV Lab. CSIE NTU

46 Yokoi Connectivity Number
DC & CV Lab. CSIE NTU

47 Yokoi Connectivity Number
d b c e d b c DC & CV Lab. CSIE NTU

48 Yokoi Connectivity Number
d b c e d b c DC & CV Lab. CSIE NTU

49 Yokoi Connectivity Number
lena.64*64 DC & CV Lab. CSIE NTU

50 Yokoi Connectivity Number
lena.yokoi DC & CV Lab. CSIE NTU

51 Yokoi Connectivity Number
8-connectivity, only slightly different : center and corner transition : corner no transition, all : itself and two 4-neighbors , corner DC & CV Lab. CSIE NTU

52 Yokoi Connectivity Number
DC & CV Lab. CSIE NTU

53 Rutovitz Connectivity Number
Rutovitz connectivity: number of transitions from one symbol to another Rutovitz connectivity number: sometimes called crossing number h(a,b,c) = { 1, if (a=b and a <> c) or (a<>b and a =c) 0, otherwise } a1 = h( X0, X1, X6) a2 = h( X0, X6, X2) a3 = h( X0, X2, X7) a4 = h( X0, X7, X3) a5 = h( X0, X3, X8) a6 = h( X0, X8, X4) a7 = h( X0, X4, X5) a8 = h( X0, X5, X1) DC & CV Lab. CSIE NTU

54 Take a Break DC & CV Lab. CSIE NTU

55 6.2.6 Connected Shrink Operator
connected shrink: recursive operator, symbolic data domain connected shrink: deletes border pixels without disconnecting regions DC & CV Lab. CSIE NTU

56 6.2.6 Connected Shrink Operator
Top-down, left-right scan: deletes edge pixels not right-boundary DC & CV Lab. CSIE NTU

57 這邊是示意圖,後面有計算範例 DC & CV Lab. CSIE NTU

58 6.2.6 Connected Shrink Operator
: determines whether corner connected DC & CV Lab. CSIE NTU

59 6.2.6 Connected Shrink Operator
: background output symbol DC & CV Lab. CSIE NTU

60 6.2.6 Connected Shrink Operator
DC & CV Lab. CSIE NTU

61 6.2.6 Connected Shrink Operator
1 h (b, c, d, e) = { 1, if c= b and (d <> b or e<>b) 0, otherwise } Output symbol y = f (1 , 0 , 0 , 0 , 1) = g DC & CV Lab. CSIE NTU

62 6.2.6 Connected Shrink Operator
g 1 DC & CV Lab. CSIE NTU

63 6.2.7 Pair Relationship Operator
pair relationship: nonrecursive operator, symbolic data domain : determines whether first argument equals label DC & CV Lab. CSIE NTU

64 6.2.7 Pair Relationship Operator
4-connected mode, output : not deletable if Yokoi number or no neighbor : possibly deletable if Yokoi number and some neighbor DC & CV Lab. CSIE NTU

65 6.2.8 Thinning Operator thinning operator is composition of three operators: Mark-Interior/Border-Pixel The pair relationship Connected shrink DC & CV Lab. CSIE NTU

66 6.2.8 Thinning Operator DC & CV Lab. CSIE NTU

67 6.2.8 Thinning Operator lena.thin DC & CV Lab. CSIE NTU

68 6.2.8 Thinning Operator lena.thin DC & CV Lab. CSIE NTU

69 Take a Break DC & CV Lab. CSIE NTU

70 6.2.9 Distance Transformation Operator
distance transformation: produces distance to closest border pixel DC & CV Lab. CSIE NTU

71 6.2.9 Distance Transformation Operator
nonrecursive, iterative, start with : background : border, because distance to border is : interior pixels DC & CV Lab. CSIE NTU

72 6.2.9 Distance Transformation Operator
iteration: label with all with neighbor DC & CV Lab. CSIE NTU

73 6.2.9 Distance Transformation Operator
equivalent algorithm: nonrecursive iterative : if no neighbor labeled, still interior, leave it alone : self interior but neighbor labeled : already labeled, won’t change value since later route farther 4-connected: output DC & CV Lab. CSIE NTU

74 6.2.9 Distance Transformation Operator
distance transformation: produces distance to closest background recursive, two-pass DC & CV Lab. CSIE NTU

75 6.2.9 Distance Transformation Operator
first pass: left-right, top-bottom : if background still background, since min: min of upper and left neighbors and add 4-connected output DC & CV Lab. CSIE NTU

76 6.2.9 Distance Transformation Operator
second pass: right-left, bottom-up 4-connected output DC & CV Lab. CSIE NTU

77 6.2.9 Distance Transformation Operator
DC & CV Lab. CSIE NTU

78 6.2.9 Distance Transformation Operator
after pass 1 DC & CV Lab. CSIE NTU

79 6.2.9 Distance Transformation Operator
pass 1 DC & CV Lab. CSIE NTU

80 Take a Break DC & CV Lab. CSIE NTU

81 Radius of Fusion DC & CV Lab. CSIE NTU

82 Radius of Fusion DC & CV Lab. CSIE NTU

83 6.2.11 Number of Shortest Paths
number of shortest paths for each 0-pixel: to binary-1 pixel set given binary image : can be 4-neighborhood or 8-neighborhood : nonzero, stays unchanged since shortest paths counted : if zero then sum of neighboring shortest paths DC & CV Lab. CSIE NTU

84 6.2.11 Number of Shortest Paths
DC & CV Lab. CSIE NTU

85 6.2.11 Number of Shortest Paths
DC & CV Lab. CSIE NTU

86 6.2.11 Number of Shortest Paths
DC & CV Lab. CSIE NTU

87 Take a Break DC & CV Lab. CSIE NTU

88 6.3 Extremum-Related Neighborhood Operators
DC & CV Lab. CSIE NTU

89 6.3.1 Non-Minima-Maxima Operator
non-minima-maxima: nonrecursive operator, symbolic output DC & CV Lab. CSIE NTU

90 6.3.1 Non-Minima-Maxima Operator
a pixel can be neighborhood maximum not relative maximum DC & CV Lab. CSIE NTU

91 6.3.1 Non-Minima-Maxima Operator
DC & CV Lab. CSIE NTU

92 6.3.1 Non-Minima-Maxima Operator
4-connected: output pixel DC & CV Lab. CSIE NTU

93 6.3.2 Relative Extrema Operator
relative extrema operators relative maximum and minimum operators relative extrema recursive operator, numeric data domain input not changed;output modified top-down, left-right scan then bottom-up, right-left scan until no change DC & CV Lab. CSIE NTU

94 6.3.2 Relative Extrema Operator
output value: of highest extrema reachable by monotonic path relative extrema pixels: output same as input pixels DC & CV Lab. CSIE NTU

95 6.3.2 Relative Extrema Operator
pixel designations for the normal and reverse scans P285 課本的ab圖有錯 DC & CV Lab. CSIE NTU

96 6.3.2 Relative Extrema Operator
DC & CV Lab. CSIE NTU

97 6.3.2 Relative Extrema Operator
two primitive functions and : use new maximum value when ascending : keep original maximum when descending DC & CV Lab. CSIE NTU

98 6.3.2 Relative Extrema Operator
4-connected, output : top-down , left-right : bottom-up , right-left DC & CV Lab. CSIE NTU

99 6.3.2 Relative Extrema Operator
a0 = l0 a1 = h (x0, x1, a0, l1) a2 = h (x0, x2, a1, l2) 3 3,3,3,3 ) x2 , l2 x1 , l1 a0 l0, x0 x2 , l2 x1 , l1 a0 l0, x0 DC & CV Lab. CSIE NTU

100 6.3.2 Relative Extrema Operator
a0 = l0 a1 = h (x0, x1, a0, l1) a2 = h (x0, x2, a1, l2) 5 5, 5, 5, 5) x2 , l2 x1 , l1 a0 l0, x0 x2 , l2 x1 , l1 a0 l0, x0 DC & CV Lab. CSIE NTU

101 6.3.2 Relative Extrema Operator
DC & CV Lab. CSIE NTU

102 6.3.2 Relative Extrema Operator
DC & CV Lab. CSIE NTU

103 6.3.2 Relative Extrema Operator
DC & CV Lab. CSIE NTU

104 6.3.2 Relative Extrema Operator
DC & CV Lab. CSIE NTU

105 6.3.2 Relative Extrema Operator
4 重複以上動作,一直到最後,把每一個Pixel都走過一遍,至此,完成了Left-Right, Top-Down Scan DC & CV Lab. CSIE NTU

106 6.3.2 Relative Extrema Operator
a0 = l0 a1 = h (x0, x1, a0, l1) a2 = h (x0, x2, a1, l2) 6 x2 1 9 1 9 x1 l1 a0 l0 x0 l2 x0 2 x2 x1 l2 a0 l0 DC & CV Lab. CSIE NTU

107 6.3.2 Relative Extrema Operator
DC & CV Lab. CSIE NTU

108 6.3.3 Reachability Operator
successively propagating labels that can reach by monotonic paths descending reachability operator employs DC & CV Lab. CSIE NTU

109 6.3.3 Reachability Operator
g: pixels that are not relative extrema labeled background a: unchanged when neighbor is g or the same with neighbor b: become first propagated label if originally g c: common region more than one extremum can reach it by monotonic path c: already labeled and neighbor has different label, then two extrema reach a: propagate from extremum DC & CV Lab. CSIE NTU

110 6.3.3 Reachability Operator
4-connected, output a0 = l0 a1 = h (a0 , l1 , x0 , x1) a2 = h (a1 , l2 , x0 , x2) DC & CV Lab. CSIE NTU

111 6.3.3 Reachability Operator
DC & CV Lab. CSIE NTU

112 6.3.3 Reachability Operator
DC & CV Lab. CSIE NTU

113 6.3.3 Reachability Operator
DC & CV Lab. CSIE NTU

114 Take a Break DC & CV Lab. CSIE NTU

115 6.4 Linear Shift-Invariant Neighborhood Operators
convolution: commutative, associative, distributor over sums, homogeneous DC & CV Lab. CSIE NTU

116 6.4.1 Convolution and Correlation
convolution of an image f with kernel w DC & CV Lab. CSIE NTU

117 6.4.1 Convolution and Correlation
DC & CV Lab. CSIE NTU

118 6.4.1 Convolution and Correlation
DC & CV Lab. CSIE NTU

119 6.4.1 Convolution and Correlation
DC & CV Lab. CSIE NTU

120 6.4.1 Convolution and Correlation
DC & CV Lab. CSIE NTU

121 6.4.1 Convolution and Correlation
DC & CV Lab. CSIE NTU

122 6.4.1 Convolution and Correlation
DC & CV Lab. CSIE NTU

123 6.4.1 Convolution and Correlation
DC & CV Lab. CSIE NTU

124 6.4.1 Convolution and Correlation
DC & CV Lab. CSIE NTU

125 6.4.2 Separability straightforward computation:
multiplications, additions decomposition: DC & CV Lab. CSIE NTU

126 6.4.2 Separability DC & CV Lab. CSIE NTU

127 Project due Nov. 6 Write a program to generate Yokoi connectivity number You can down sample lena.bmp from 512*512 to 64*64 first. Sample pixels positions at (r, c) = (0,0), (0,8) ……, so everyone will get the same answer . DC & CV Lab. CSIE NTU

128 Project due Nov. 20 Write a program to generate thinned image.
You can down sample lena.bmp from 512*512 to 64*64 first. Sample pixels positions at (r, c) = (0,0), (0,8) ……, so everyone will get the same answer . DC & CV Lab. CSIE NTU

129 Midterm Nov. 13 extent: whatever covered up to Nov. 6 (inclusive)
DC & CV Lab. CSIE NTU


Download ppt "Computer and Robot Vision I"

Similar presentations


Ads by Google