Lines Matching defs:neighbors
104 struct CvCBCorner* neighbors[4]; // Neighbor corners
113 int count; // Number of quad neighbors
116 bool ordered; // true if corners/neighbors are ordered counter-clockwise
118 // neighbors and corners are synced, i.e., neighbor 0 shares corner 0
120 struct CvCBQuad *neighbors[4]; // Pointers of quad neighbors
366 // Find quad's neighbors
597 CvCBQuad *neighbor = q->neighbors[i];
691 { // ok, look at neighbors
707 CvCBQuad *neighbor = quads[i]->neighbors[j];
752 for (int j=0; j<4; j++) // any neighbors that are ordered?
754 if (quads[i]->neighbors[j] && quads[i]->neighbors[j]->ordered)
786 if (!quad->neighbors[i]) // ok, create and add neighbor
797 quad->neighbors[i] = q;
799 q->neighbors[j] = quad;
801 q->count = 1; // number of neighbors
825 if (quad->neighbors[(i+3)%4] &&
826 quad->neighbors[(i+3)%4]->ordered &&
827 quad->neighbors[(i+3)%4]->neighbors[i] &&
828 quad->neighbors[(i+3)%4]->neighbors[i]->ordered )
830 CvCBQuad *qn = quad->neighbors[(i+3)%4]->neighbors[i];
832 q->neighbors[(j+1)%4] = qn;
833 qn->neighbors[(i+1)%4] = q;
863 if (quads[i]->neighbors[1])
865 icvRemoveQuadFromGroup(quads,rcount,quads[i]->neighbors[1]);
868 if (quads[i]->neighbors[2])
870 icvRemoveQuadFromGroup(quads,rcount,quads[i]->neighbors[2]);
876 if (quads[i]->neighbors[0])
878 icvRemoveQuadFromGroup(quads,rcount,quads[i]->neighbors[0]);
881 if (quads[i]->neighbors[3])
883 icvRemoveQuadFromGroup(quads,rcount,quads[i]->neighbors[3]);
908 if (quads[i]->neighbors[2])
910 icvRemoveQuadFromGroup(quads,rcount,quads[i]->neighbors[2]);
913 if (quads[i]->neighbors[3])
915 icvRemoveQuadFromGroup(quads,rcount,quads[i]->neighbors[3]);
921 if (quads[i]->neighbors[0])
923 icvRemoveQuadFromGroup(quads,rcount,quads[i]->neighbors[0]);
926 if (quads[i]->neighbors[1])
928 neighbors[1]);
953 if( q->neighbors[j] == q0 )
955 q->neighbors[j] = 0;
958 if( q0->neighbors[k] == q )
960 q0->neighbors[k] = 0;
1003 tempq = quad->neighbors[3];
1007 quad->neighbors[i] = quad->neighbors[i-1];
1010 quad->neighbors[0] = tempq;
1105 if( q->neighbors[j] == q0 )
1107 q->neighbors[j] = 0;
1110 if( q0->neighbors[k] == q )
1112 q0->neighbors[k] = 0;
1166 CvCBQuad *neighbor = q->neighbors[i];
1220 if( q->neighbors[j] )
1225 // - a quad with two neighbors - with ROW2
1237 if( q->neighbors[(j+1)&3] )
1243 if( a->neighbors[k] == b )
1245 if( b->neighbors[k] == a )
1248 a->neighbors[a->count++] = b;
1249 b->neighbors[b->count++] = a;
1273 // if we do not have such, start with a corner of a quad with two neighbors.
1287 c = cur->neighbors[k];
1318 c = cur->neighbors[k];
1323 if( c->neighbors[kk] == below )
1363 c = cur->neighbors[k];
1368 if( c->neighbors[kk] && c->neighbors[kk]->row == i-1 )
1456 // find quad neighbors
1475 if( cur_quad->neighbors[i] )
1488 if( quads[k].neighbors[j] )
1526 if( cur_quad->neighbors[j] == closest_quad )
1542 if( closest_quad->neighbors[j] == cur_quad )
1557 if( !q->neighbors[j] )
1577 cur_quad->neighbors[i] = closest_quad;
1581 closest_quad->neighbors[closest_corner_idx] = cur_quad;