Ain Shams University in Cairo Faculty of Computer and Information Sciences Scientific Computing Department
Machine Vision For Postgraduate Students Academic Year 2012/2013, 1st Term
Chapter 6: Binary Shape Analysis Prepared by: Eman Fateen Under Supervision: Dr. Mohammed Abdel-Megeed Salem Scientific Computing Department Faculty of Computer and Information Sciences Ain Shams University 1
Introduction
Connected components labeling ?!!
2
Introduction
3
Introduction X
4
Introduction X
Y
5
Introduction X
Y
6
Introduction • Connected Component of value v is a set of pixels, each having value v , and such that every pair of pixels in the set are connected with respect to v.
7
Introduction • Connected Component labeling of a binary image B is a labeled image LB in which the value of each pixel is the label of its connected component.
8
Introduction • Label is a symbol that uniquely names an entity.
9
Introduction
10
Introduction
11
Object Labeling and counting
12
Object Labeling and counting
13
Object Labeling and counting • Labeling may be achieved by scanning the image sequentially until a 1 is encountered on the first object. • A note is then made of the scanning position, and a "propagation" routine is initiated to label the whole of the object with a 1. Since the original image space is already in use, a separate image space has to be allocated for labeling. • Next, the scan is resumed, ignoring all points already labeled, until another object is found. • This is labeled with a 2 in the separate image space. This procedure is continued until the whole image has been scanned and all the objects have been labeled. 14
Object Labeling and counting do for all points in image if point is in object and next to a propagating region labeled N label this point N also until no further change;
15
Object Labeling and counting H start with binary image containing objects in A-space // clear label space [[P0 = 0;]] // start with no objects N = 0; /* look for objects using a sequential scan and propagate labels through them */ do { // search for an unlabeled object found = false; [[+ if ((AO == 1) && (PO == 0) && not found) { N = N + 1 ; PO = N; found = true; } +]]
if (found) // label the object just found do{ finished = true; [[ if ((AO == 1) && (PO == 0) && ((PI == N) II (P2 == N) II (P3 == N) II (P4 == N) II (P5 == N) II (P6 == N) II (P7 == N) II (P8 == N))) { PO = N ; finished = false; } ]] } until finished; } until not found; // i.e. no (more) objects // N is the number of objects found and 16 labeled
Object Labeling and counting H start with binary image containing objects in A-space // clear label space [[P0 = 0;]] // start with no objects N = 0; /* look for objects using a sequential scan and propagate labels through them */ do { // search for an unlabeled object found = false; [[+ if ((AO == 1) && (PO == 0) && not found) { N = N + 1 ; PO = N; found = true; } +]] 17
Object Labeling and counting H start with binary image containing objects in A-space // clear label space [[P0 = 0;]] // start with no objects N = 0; /* look for objects using a sequential scan and propagate labels through them */ do { // search for an unlabeled object found = false; [[+ if ((AO == 1) && (PO == 0) && not found) { N = N + 1 ; PO = N; found = true; } +]] 18
Object Labeling and counting H start with binary image containing objects in A-space // clear label space [[P0 = 0;]] // start with no objects N = 0; /* look for objects using a sequential scan and propagate labels through them */ do { // search for an unlabeled object found = false; [[+ if ((AO == 1) && (PO == 0) && not found) { N = N + 1 ; PO = N; found = true; } +]] 19
Object Labeling and counting H start with binary image containing objects in A-space // clear label space [[P0 = 0;]] // start with no objects N = 0; /* look for objects using a sequential scan and propagate labels through them */ do { // search for an unlabeled object found = false; [[+ if ((AO == 1) && (PO == 0) && not found) { N = N + 1 ; PO = N; found = true; } +]] 20
Object Labeling and counting H start with binary image containing objects in A-space // clear label space [[P0 = 0;]] // start with no objects N = 0; /* look for objects using a sequential scan and propagate labels through them */ do { // search for an unlabeled object found = false; [[+ if ((AO == 1) && (PO == 0) && not found) { N = N + 1 ; PO = N; found = true; } +]] 21
Object Labeling and counting H start with binary image containing objects in A-space // clear label space [[P0 = 0;]] // start with no objects N = 0; /* look for objects using a sequential scan and propagate labels through them */ do { // search for an unlabeled object found = false; [[+ if ((AO == 1) && (PO == 0) && not found) { N = N + 1 ; PO = N; found = true; } +]] 22
Object Labeling and counting H start with binary image containing objects in A-space // clear label space [[P0 = 0;]] // start with no objects N = 0; /* look for objects using a sequential scan and propagate labels through them */ do { // search for an unlabeled object found = false; [[+ if ((AO == 1) && (PO == 0) && not found) { N = N + 1 ; PO = N; found = true; } +]] 23
Object Labeling and counting if (found) // label the object just found do{ finished = true; [[ if ((AO == 1) && (PO == 0) && ((PI == N) II (P2 == N) II (P3 == N) II (P4 == N) II (P5 == N) II (P6 == N) II (P7 == N) II (P8 == N))) { PO = N ; finished = false;}]] } until finished; } until not found; // i.e. no (more) objects // N is the number of objects found and labeled 24
Object Labeling and counting if (found) // label the object just found do{ finished = true; [[ if ((AO == 1) && (PO == 0) && ((PI == N) II (P2 == N) II (P3 == N) II (P4 == N) II (P5 == N) II (P6 == N) II (P7 == N) II (P8 == N))) { PO = N ; finished = false;}]] } until finished; } until not found; // i.e. no (more) objects // N is the number of objects found and labeled 25
Object Labeling and counting if (found) // label the object just found do{ finished = true; [[ if ((AO == 1) && (PO == 0) && ((PI == N) II (P2 == N) II (P3 == N) II (P4 == N) II (P5 == N) II (P6 == N) II (P7 == N) II (P8 == N))) { PO = N ; finished = false;}]] } until finished; } until not found; // i.e. no (more) objects // N is the number of objects found and labeled 26
Object Labeling and counting if (found) // label the object just found do{ finished = true; [[ if ((AO == 1) && (PO == 0) && ((PI == N) II (P2 == N) II (P3 == N) II (P4 == N) II (P5 == N) II (P6 == N) II (P7 == N) II (P8 == N))) { PO = N ; finished = false;}]] } until finished; } until not found; // i.e. no (more) objects // N is the number of objects found and labeled 27
Object Labeling and counting if (found) // label the object just found do{ finished = true; [[ if ((AO == 1) && (PO == 0) && ((PI == N) II (P2 == N) II (P3 == N) II (P4 == N) II (P5 == N) II (P6 == N) II (P7 == N) II (P8 == N))) { PO = N ; finished = false;}]] } until finished; } until not found; // i.e. no (more) objects // N is the number of objects found and labeled 28
Object Labeling and counting if (found) // label the object just found do{ finished = true; [[ if ((AO == 1) && (PO == 0) && ((PI == N) II (P2 == N) II (P3 == N) II (P4 == N) II (P5 == N) II (P6 == N) II (P7 == N) II (P8 == N))) { PO = N ; finished = false;}]] } until finished; } until not found; // i.e. no (more) objects // N is the number of objects found and labeled 29
Object Labeling and counting if (found) // label the object just found do{ finished = true; [[ if ((AO == 1) && (PO == 0) && ((PI == N) II (P2 == N) II (P3 == N) II (P4 == N) II (P5 == N) II (P6 == N) II (P7 == N) II (P8 == N))) { PO = N ; finished = false;}]] } until finished; } until not found; // i.e. no (more) objects // N is the number of objects found and labeled 30
Object Labeling and counting if (found) // label the object just found do{ finished = true; [[ if ((AO == 1) && (PO == 0) && ((PI == N) II (P2 == N) II (P3 == N) II (P4 == N) II (P5 == N) II (P6 == N) II (P7 == N) II (P8 == N))) { PO = N ; finished = false;}]] } until finished; } until not found; // i.e. no (more) objects // N is the number of objects found and labeled 31
Object Labeling and counting if (found) // label the object just found do{ finished = true; [[ if ((AO == 1) && (PO == 0) && ((PI == N) II (P2 == N) II (P3 == N) II (P4 == N) II (P5 == N) II (P6 == N) II (P7 == N) II (P8 == N))) { PO = N ; finished = false;}]] } until finished; } until not found; // i.e. no (more) objects // N is the number of objects found and labeled 32
Object Labeling and counting if (found) // label the object just found do{ finished = true; [[ if ((AO == 1) && (PO == 0) && ((PI == N) II (P2 == N) II (P3 == N) II (P4 == N) II (P5 == N) II (P6 == N) II (P7 == N) II (P8 == N))) { PO = N ; finished = false;}]] } until finished; } until not found; // i.e. no (more) objects // N is the number of objects found and labeled 33
Object Labeling and counting H start with binary image containing objects in A-space // clear label space [[P0 = 0;]] // start with no objects N = 0; /* look for objects using a sequential scan and propagate labels through them */ do { // search for an unlabeled object found = false; [[+ if ((AO == 1) && (PO == 0) && not found) { N = N + 1 ; PO = N; found = true; } +]] 34
Object Labeling and counting H start with binary image containing objects in A-space // clear label space [[P0 = 0;]] // start with no objects N = 0; /* look for objects using a sequential scan and propagate labels through them */ do { // search for an unlabeled object found = false; [[+ if ((AO == 1) && (PO == 0) && not found) { N = N + 1 ; PO = N; found = true; } +]] 35
Object Labeling and counting H start with binary image containing objects in A-space // clear label space [[P0 = 0;]] // start with no objects N = 0; /* look for objects using a sequential scan and propagate labels through them */ do { // search for an unlabeled object found = false; [[+ if ((AO == 1) && (PO == 0) && not found) { N = N + 1 ; PO = N; found = true; } +]] 36
Object Labeling and counting H start with binary image containing objects in A-space // clear label space [[P0 = 0;]] // start with no objects N = 0; /* look for objects using a sequential scan and propagate labels through them */ do { // search for an unlabeled object found = false; [[+ if ((AO == 1) && (PO == 0) && not found) { N = N + 1 ; PO = N; found = true; } +]] 37
Object Labeling and counting H start with binary image containing objects in A-space // clear label space [[P0 = 0;]] // start with no objects N = 0; /* look for objects using a sequential scan and propagate labels through them */ do { // search for an unlabeled object found = false; [[+ if ((AO == 1) && (PO == 0) && not found) { N = N + 1 ; PO = N; found = true; } +]] 38
Object Labeling and counting if (found) // label the object just found do{ finished = true; [[ if ((AO == 1) && (PO == 0) && ((PI == N) II (P2 == N) II (P3 == N) II (P4 == N) II (P5 == N) II (P6 == N) II (P7 == N) II (P8 == N))) { PO = N ; finished = false;}]] } until finished; } until not found; // i.e. no (more) objects // N is the number of objects found and labeled 39
Object Labeling and counting if (found) // label the object just found do{ finished = true; [[ if ((AO == 1) && (PO == 0) && ((PI == N) II (P2 == N) II (P3 == N) II (P4 == N) II (P5 == N) II (P6 == N) II (P7 == N) II (P8 == N))) { PO = N ; finished = false;}]] } until finished; } until not found; // i.e. no (more) objects // N is the number of objects found and labeled 40
Object Labeling and counting if (found) // label the object just found do{ finished = true; [[ if ((AO == 1) && (PO == 0) && ((PI == N) II (P2 == N) II (P3 == N) II (P4 == N) II (P5 == N) II (P6 == N) II (P7 == N) II (P8 == N))) { PO = N ; finished = false;}]] } until finished; } until not found; // i.e. no (more) objects // N is the number of objects found and labeled 41
Object Labeling and counting if (found) // label the object just found do{ finished = true; [[ if ((AO == 1) && (PO == 0) && ((PI == N) II (P2 == N) II (P3 == N) II (P4 == N) II (P5 == N) II (P6 == N) II (P7 == N) II (P8 == N))) { PO = N ; finished = false;}]] } until finished; } until not found; // i.e. no (more) objects // N is the number of objects found and labeled 42
Object Labeling and counting if (found) // label the object just found do{ finished = true; [[ if ((AO == 1) && (PO == 0) && ((PI == N) II (P2 == N) II (P3 == N) II (P4 == N) II (P5 == N) II (P6 == N) II (P7 == N) II (P8 == N))) { PO = N ; finished = false;}]] } until finished; } until not found; // i.e. no (more) objects // N is the number of objects found and labeled 43
Object Labeling and counting if (found) // label the object just found do{ finished = true; [[ if ((AO == 1) && (PO == 0) && ((PI == N) II (P2 == N) II (P3 == N) II (P4 == N) II (P5 == N) II (P6 == N) II (P7 == N) II (P8 == N))) { PO = N ; finished = false;}]] } until finished; } until not found; // i.e. no (more) objects // N is the number of objects found and labeled 44
Object Labeling and counting if (found) // label the object just found do{ finished = true; [[ if ((AO == 1) && (PO == 0) && ((PI == N) II (P2 == N) II (P3 == N) II (P4 == N) II (P5 == N) II (P6 == N) II (P7 == N) II (P8 == N))) { PO = N ; finished = false;}]] } until finished; } until not found; // i.e. no (more) objects // N is the number of objects found and labeled 45
Object Labeling and counting H start with binary image containing objects in A-space // clear label space [[P0 = 0;]] // start with no objects N = 0; /* look for objects using a sequential scan and propagate labels through them */ do { // search for an unlabeled object found = false; [[+ if ((AO == 1) && (PO == 0) && not found) { N = N + 1 ; PO = N; found = true; } +]] 46
Object Labeling and counting H start with binary image containing objects in A-space // clear label space [[P0 = 0;]] // start with no objects N = 0; /* look for objects using a sequential scan and propagate labels through them */ do { // search for an unlabeled object found = false; [[+ if ((AO == 1) && (PO == 0) && not found) { N = N + 1 ; PO = N; found = true; } +]] 47
Object Labeling and counting H start with binary image containing objects in A-space // clear label space [[P0 = 0;]] // start with no objects N = 0; /* look for objects using a sequential scan and propagate labels through them */ do { // search for an unlabeled object found = false; [[+ if ((AO == 1) && (PO == 0) && not found) { N = N + 1 ; PO = N; found = true; } +]] 48
Object Labeling and counting if (found) // label the object just found do{ finished = true; [[ if ((AO == 1) && (PO == 0) && ((PI == N) II (P2 == N) II (P3 == N) II (P4 == N) II (P5 == N) II (P6 == N) II (P7 == N) II (P8 == N))) { PO = N ; finished = false;}]] } until finished; } until not found; // i.e. no (more) objects // N is the number of objects found and labeled 49
Object Labeling and counting H start with binary image containing objects in A-space // clear label space [[P0 = 0;]] // start with no objects N = 0; /* look for objects using a sequential scan and propagate labels through them */ do { // search for an unlabeled object found = false; [[+ if ((AO == 1) && (PO == 0) && not found) { N = N + 1 ; PO = N; found = true; } +]] 50
Object Labeling and counting
51
Object Labeling and counting
52
Object Labeling and counting • The above object counting and labeling routine requires a minimum of 2N-1 passes over the image space, and in practice the number will be closer to NW/2 where W is the average width of the objects.
the algorithm is inherently inefficient. • This prompts us to consider how the number of passes over the image can be reduced to save computation.
53
Object Labeling and counting • One possibility would be to scan forward through the image, propagating new labels through objects as they are discovered. • Although this would work mostly straightforwardly with convex objects, problems would be encountered with objects possessing concavities
54
Disjoint-set data structure • Disjoint-set data structure , union-find algorithm • Find: Determine which subset a particular element is in. This can be used for determining if two elements are in the same subset. • Union: Join two subsets into a single subset.
55
Disjoint-set data structure • function Find(x, parent) if x.parent != 0 x.parent := Find(x.parent) return x.parent
56
Disjoint-set data structure function Union(x, y, parent) xRoot := Find(x, parent) yRoot := Find(y, parent) if xRoot == yRoot return // x and y are not already in same set. Merge them. if xRoot.rank < yRoot.rank xRoot.parent := yRoot else if xRoot.rank > yRoot.rank yRoot.parent := xRoot else yRoot.parent := xRoot xRoot.rank := xRoot.rank + 1 57
Disjoint-set data structure 1
2
3
4
5
1
2
3
4
5
1
2
3
4
5
1
1
3
1
4
58
Disjoint-set data structure 1
2
3
4
5
1
2
3
4
5
1
2
3
4
5
1
1
3
1
4
function Find(x, parent) while x.parent != x x := x.parent return x
X=5 X.parent = 4
59
Disjoint-set data structure 1
2
3
4
5
1
2
3
4
5
1
2
3
4
5
1
1
3
1
4
function Find(x, parent) while x.parent != x x := x.parent return x
X=4 X.parent = 1
60
Disjoint-set data structure 1
2
3
4
5
1
2
3
4
5
1
2
3
4
5
1
1
3
1
4
function Find(x, parent) while x.parent != x x := x.parent return x
X=1 X.parent = 1
61
Disjoint-set data structure 1
2
3
4
5
1
1
3
1
4
function Union(x, y, parent) xRoot := Find(x, parent) yRoot := Find(y, parent) if xRoot == yRoot return
// x and y are not already in same set. Merge them.
X=3 Y=4 xRoot =3 Yroot =1
if xRoot != yRoot yRoot.parent := xRoot
62
Disjoint-set data structure 1
2
3
4
5
0
1
1
1
4
function Union(x, y, parent) xRoot := Find(x, parent) yRoot := Find(y, parent) if xRoot == yRoot return
// x and y are not already in same set. Merge them.
X=3 Y=4 xRoot =1 Yroot =1
if xRoot != yRoot yRoot.parent := xRoot
63
Object Labeling and counting First pass for row in data: for column in row: if data[row][column] is not Background neighbors = connected elements with the current element's value if neighbors is empty parent[NextLabel] = set containing NextLabel labels[row][column] = NextLabel NextLabel += 1 else Find the smallest label L = neighbors labels labels[row][column] = min(L) 64 for label in L parent [label] = union(parent[label], L)
Object Labeling and counting First pass for row in data: for column in row: if data[row][column] is not Background neighbors = connected elements with the current element's value if neighbors is empty parent[NextLabel] = set containing NextLabel labels[row][column] = NextLabel NextLabel += 1 else Find the smallest label L = neighbors labels labels[row][column] = min(L) 65 for label in L parent [label] = union(parent[label], L)
Object Labeling and counting First pass for row in data: for column in row: if data[row][column] is not Background neighbors = connected elements with the current element's value if neighbors is empty parent[NextLabel] = set containing NextLabel labels[row][column] = NextLabel NextLabel += 1 else Find the smallest label 1 L = neighbors labels 1 labels[row][column] = min(L) 66 for label in L parent [label] = union(parent[label], L)
Object Labeling and counting First pass for row in data: for column in row: if data[row][column] is not Background neighbors = connected elements with the current element's value if neighbors is empty parent[NextLabel] = set containing NextLabel labels[row][column] = NextLabel NextLabel += 1 else Find the smallest label 1 L = neighbors labels 1 labels[row][column] = min(L) 67 for label in L parent [label] = union(parent[label], L)
Object Labeling and counting First pass for row in data: for column in row: if data[row][column] is not Background neighbors = connected elements with the current element's value if neighbors is empty parent[NextLabel] = set containing NextLabel labels[row][column] = NextLabel NextLabel += 1 else Find the smallest label 1 L = neighbors labels 1 labels[row][column] = min(L) 68 for label in L parent [label] = union(lable, min(L))
Object Labeling and counting 1 1
function Union(x, y, parent) xRoot := Find(x, parent) yRoot := Find(y, parent) if xRoot == yRoot return
// x and y are not already in same set. Merge them.
X=1 Y=1 xRoot =1 Yroot =1
if xRoot != yRoot yRoot.parent := xRoot
69
Object Labeling and counting Second pass for row in data for column in row if data[row][column] is not Background labels[row][column] = find(labels[row][column])
70
Object Labeling and counting -1
-1
0
-1
-1
-1
0
-1
-1 -1 0
-1 -1 0
0 -1 0
-1 -1 0
0 0 0
-1 0 0
0 0 0
-1 -1 -1
-1 0
-1 0
-1 0
-1 -1
0 0
-1 -1
0 0
-1 -1
-1 -1
-1 -1
0 0
-1 -1
0 0
0 -1
0 -1
-1 -1
71
Object Labeling and counting 1
-1
0
-1
-1
-1
0
-1
-1 -1 0
-1 -1 0
0 -1 0
-1 -1 0
0 0 0
-1 0 0
0 0 0
-1 -1 -1
-1 0
-1 0
-1 0
-1 -1
0 0
-1 -1
0 0
-1 -1
-1 -1
-1 -1
0 0
-1 -1
0 0
0 -1
0 -1
-1 -1
1 1 72
Object Labeling and counting 1
1
0
-1
-1
-1
0
-1
-1 -1 0
-1 -1 0
0 -1 0
-1 -1 0
0 0 0
-1 0 0
0 0 0
-1 -1 -1
-1 0
-1 0
-1 0
-1 -1
0 0
-1 -1
0 0
-1 -1
-1 -1
-1 -1
0 0
-1 -1
0 0
0 -1
0 -1
-1 -1
1 1 73
Object Labeling and counting 1
1
0
2
-1
-1
0
-1
-1 -1 0
-1 -1 0
0 -1 0
-1 -1 0
0 0 0
-1 0 0
0 0 0
-1 -1 -1
-1 0
-1 0
-1 0
-1 -1
0 0
-1 -1
0 0
-1 -1
-1 -1
-1 -1
0 0
-1 -1
0 0
0 -1
0 -1
-1 -1
1
2
1
2 74
Object Labeling and counting 1
1
0
2
2
-1
0
-1
-1 -1 0
-1 -1 0
0 -1 0
-1 -1 0
0 0 0
-1 0 0
0 0 0
-1 -1 -1
-1 0
-1 0
-1 0
-1 -1
0 0
-1 -1
0 0
-1 -1
-1 -1
-1 -1
0 0
-1 -1
0 0
0 -1
0 -1
-1 -1
1
2
1
2 75
Object Labeling and counting 1
1
0
2
2
2
0
-1
-1 -1 0
-1 -1 0
0 -1 0
-1 -1 0
0 0 0
-1 0 0
0 0 0
-1 -1 -1
-1 0
-1 0
-1 0
-1 -1
0 0
-1 -1
0 0
-1 -1
-1 -1
-1 -1
0 0
-1 -1
0 0
0 -1
0 -1
-1 -1
1
2
1
2 76
Object Labeling and counting 1
1
0
2
2
2
0
3
-1 -1 0
-1 -1 0
0 -1 0
-1 -1 0
0 0 0
-1 0 0
0 0 0
-1 -1 -1
-1 0
-1 0
-1 0
-1 -1
0 0
-1 -1
0 0
-1 -1
-1 -1
-1 -1
0 0
-1 -1
0 0
0 -1
0 -1
-1 -1
1
2
3
1
2
3 77
Object Labeling and counting 1
1
0
2
2
2
0
3
1 -1 0
-1 -1 0
0 -1 0
-1 -1 0
0 0 0
-1 0 0
0 0 0
-1 -1 -1
-1 0
-1 0
-1 0
-1 -1
0 0
-1 -1
0 0
-1 -1
-1 -1
-1 -1
0 0
-1 -1
0 0
0 -1
0 -1
-1 -1
1
2
3
1
2
3 78
Object Labeling and counting 1
1
0
2
2
2
0
3
1 -1 0
1 -1 0
0 -1 0
-1 -1 0
0 0 0
-1 0 0
0 0 0
-1 -1 -1
-1 0
-1 0
-1 0
-1 -1
0 0
-1 -1
0 0
-1 -1
-1 -1
-1 -1
0 0
-1 -1
0 0
0 -1
0 -1
-1 -1
1
2
3
1
2
3 79
Object Labeling and counting 1
1
0
2
2
2
0
3
1 -1 0
1 -1 0
0 -1 0
2 -1 0
0 0 0
-1 0 0
0 0 0
-1 -1 -1
-1 0
-1 0
-1 0
-1 -1
0 0
-1 -1
0 0
-1 -1
-1 -1
-1 -1
0 0
-1 -1
0 0
0 -1
0 -1
-1 -1
1
2
3
1
2
3 80
Object Labeling and counting 1
1
0
2
2
2
0
3
1 -1 0
1 -1 0
0 -1 0
2 -1 0
0 0 0
2 0 0
0 0 0
-1 -1 -1
-1 0
-1 0
-1 0
-1 -1
0 0
-1 -1
0 0
-1 -1
-1 -1
-1 -1
0 0
-1 -1
0 0
0 -1
0 -1
-1 -1
1
2
3
1
2
3 81
Object Labeling and counting 1
1
0
2
2
2
0
3
1 -1 0
1 -1 0
0 -1 0
2 -1 0
0 0 0
2 0 0
0 0 0
3 -1 -1
-1 0
-1 0
-1 0
-1 -1
0 0
-1 -1
0 0
-1 -1
-1 -1
-1 -1
0 0
-1 -1
0 0
0 -1
0 -1
-1 -1
1
2
3
1
2
3 82
Object Labeling and counting 1
1
0
2
2
2
0
3
1 1 0
1 1 0
0 -1 0
2 -1 0
0 0 0
2 0 0
0 0 0
3 -1 -1
-1 0
-1 0
-1 0
-1 -1
0 0
-1 -1
0 0
-1 -1
-1 -1
-1 -1
0 0
-1 -1
0 0
0 -1
0 -1
-1 -1
1
2
3
1
2
3 83
Object Labeling and counting 1
1
0
2
2
2
0
3
1 1 0
1 1 0
0 1 0
2 -1 0
0 0 0
2 0 0
0 0 0
3 -1 -1
-1 0
-1 0
-1 0
-1 -1
0 0
-1 -1
0 0
-1 -1
-1 -1
-1 -1
0 0
-1 -1
0 0
0 -1
0 -1
-1 -1
1
2
3
1
1
3 84
Object Labeling and counting 1
1
0
2
2
2
0
3
1 1 0
1 1 0
0 1 0
2 1 0
0 0 0
2 0 0
0 0 0
3 -1 -1
-1 0
-1 0
-1 0
-1 -1
0 0
-1 -1
0 0
-1 -1
-1 -1
-1 -1
0 0
-1 -1
0 0
0 -1
0 -1
-1 -1
1
2
3
1
1
3 85
Object Labeling and counting 1
1
0
2
2
2
0
3
1 1 0
1 1 0
0 1 0
2 1 0
0 0 0
2 0 0
0 0 0
3 3 3
-1 0
-1 0
-1 0
-1 -1
0 0
-1 -1
0 0
-1 -1
-1 -1
-1 -1
0 0
-1 -1
0 0
0 -1
0 -1
-1 -1
1
2
3
1
1
3 86
Object Labeling and counting 1
1
0
2
2
2
0
3
1 1 0
1 1 0
0 1 0
2 1 0
0 0 0
2 0 0
0 0 0
3 3 3
4 0
4 0
4 0
4 4
0 0
5 5
0 0
3 3
6 6
6 6
0 0
4 4
0 0
0 7
0 7
3 3
1
2
3
4
5
6
7
1
1
3
4
5
6
3 87
Object Labeling and counting 1
1
0
2
2
2
0
3
1 1 0
1 1 0
0 1 0
2 1 0
0 0 0
2 0 0
0 0 0
3 3 3
4 0
4 0
4 0
4 4
0 0
5 5
0 0
3 3
6 6
6 6
0 0
4 4
0 0
0 7
0 7
3 3
1
2
3
4
5
6
7
1
1
3
4
5
6
3 88
Object Labeling and counting 1
1
0
1
1
1
0
3
1 1 0
1 1 0
0 1 0
1 1 0
0 0 0
1 0 0
0 0 0
3 3 3
4 0
4 0
4 0
4 4
0 0
5 5
0 0
3 3
6 6
6 6
0 0
4 4
0 0
0 3
0 3
3 3
1
2
3
4
5
6
7
1
1
3
4
5
6
3 89
References • Computer Vision Book by Linda Shapiro. • Wikipedia
90
91
92