Lines Matching refs:quads
156 static int icvGenerateQuads( CvCBQuad **quads, CvCBCorner **corners,
163 static void icvFindQuadNeighbors( CvCBQuad *quads, int quad_count );
165 static int icvFindConnectedQuads( CvCBQuad *quads, int quad_count,
173 CvCBQuad **quads, CvSize pattern_size );
175 static int icvOrderFoundConnectedQuads( int quad_count, CvCBQuad **quads,
182 static int icvTrimCol(CvCBQuad **quads, int count, int col, int dir);
184 static int icvTrimRow(CvCBQuad **quads, int count, int row, int dir);
187 static int icvAddOuterQuad(CvCBQuad *quad, CvCBQuad **quads, int quad_count,
190 static void icvRemoveQuadFromGroup(CvCBQuad **quads, int count, CvCBQuad *q0);
233 CvCBQuad *quads = 0, **quad_group = 0; in cvFindChessboardCorners() local
322 cvFree(&quads); in cvFindChessboardCorners()
372 quad_count = icvGenerateQuads( &quads, &corners, storage, thresh_img, flags ); in cvFindChessboardCorners()
388 pt1 = quads[i].corners[k]->pt; in cvFindChessboardCorners()
389 pt2 = quads[i].corners[(k+1)%4]->pt; in cvFindChessboardCorners()
407 icvFindQuadNeighbors( quads, quad_count ); in cvFindChessboardCorners()
418 count = icvFindConnectedQuads( quads, quad_count, quad_group, group_idx, storage ); in cvFindChessboardCorners()
427 … count = icvOrderFoundConnectedQuads(count, quad_group, &quad_count, &quads, &corners, in cvFindChessboardCorners()
438 if (quads[i].group_idx == group_idx) in cvFindChessboardCorners()
443 if (quads[i].ordered) in cvFindChessboardCorners()
445 pt1 = quads[i].corners[k]->pt; in cvFindChessboardCorners()
446 pt2 = quads[i].corners[(k+1)%4]->pt; in cvFindChessboardCorners()
557 cvFree(&quads); in cvFindChessboardCorners()
564 cvFree(&quads); in cvFindChessboardCorners()
625 icvOrderFoundConnectedQuads( int quad_count, CvCBQuad **quads, in icvOrderFoundConnectedQuads() argument
636 if (quads[i]->count == 4) in icvOrderFoundConnectedQuads()
638 start = quads[i]; in icvOrderFoundConnectedQuads()
736 quad_count = icvTrimCol(quads,quad_count,col_min,-1); in icvOrderFoundConnectedQuads()
741 quad_count = icvTrimCol(quads,quad_count,col_max,+1); in icvOrderFoundConnectedQuads()
752 quad_count = icvTrimRow(quads,quad_count,row_min,-1); in icvOrderFoundConnectedQuads()
757 quad_count = icvTrimRow(quads,quad_count,row_max,+1); in icvOrderFoundConnectedQuads()
768 if (quads[i]->count == 4) in icvOrderFoundConnectedQuads()
770 int col = quads[i]->col; in icvOrderFoundConnectedQuads()
771 int row = quads[i]->row; in icvOrderFoundConnectedQuads()
785 CvCBQuad *neighbor = quads[i]->neighbors[j]; in icvOrderFoundConnectedQuads()
793 icvOrderQuad(neighbor, quads[i]->corners[j], (j+2)%4); in icvOrderFoundConnectedQuads()
809 if (quads[i]->count < 4 && quads[i]->ordered) in icvOrderFoundConnectedQuads()
811 int added = icvAddOuterQuad(quads[i],quads,quad_count,all_quads,*all_count,corners); in icvOrderFoundConnectedQuads()
827 if (quads[i]->ordered == false) in icvOrderFoundConnectedQuads()
832 if (quads[i]->neighbors[j] && quads[i]->neighbors[j]->ordered) in icvOrderFoundConnectedQuads()
838 icvRemoveQuadFromGroup(quads,rcount,quads[i]); in icvOrderFoundConnectedQuads()
857 icvAddOuterQuad( CvCBQuad *quad, CvCBQuad **quads, int quad_count, in icvAddOuterQuad() argument
871 quads[quad_count] = q; in icvAddOuterQuad()
927 icvTrimCol(CvCBQuad **quads, int count, int col, int dir) in icvTrimCol() argument
934 if (quads[i]->ordered) in icvTrimCol()
935 PRINTF("index: %d cur: %d\n", col, quads[i]->col); in icvTrimCol()
937 if (quads[i]->ordered && quads[i]->col == col) in icvTrimCol()
941 if (quads[i]->neighbors[1]) in icvTrimCol()
943 icvRemoveQuadFromGroup(quads,rcount,quads[i]->neighbors[1]); in icvTrimCol()
946 if (quads[i]->neighbors[2]) in icvTrimCol()
948 icvRemoveQuadFromGroup(quads,rcount,quads[i]->neighbors[2]); in icvTrimCol()
954 if (quads[i]->neighbors[0]) in icvTrimCol()
956 icvRemoveQuadFromGroup(quads,rcount,quads[i]->neighbors[0]); in icvTrimCol()
959 if (quads[i]->neighbors[3]) in icvTrimCol()
961 icvRemoveQuadFromGroup(quads,rcount,quads[i]->neighbors[3]); in icvTrimCol()
972 icvTrimRow(CvCBQuad **quads, int count, int row, int dir) in icvTrimRow() argument
979 if (quads[i]->ordered) in icvTrimRow()
980 PRINTF("index: %d cur: %d\n", row, quads[i]->row); in icvTrimRow()
982 if (quads[i]->ordered && quads[i]->row == row) in icvTrimRow()
986 if (quads[i]->neighbors[2]) in icvTrimRow()
988 icvRemoveQuadFromGroup(quads,rcount,quads[i]->neighbors[2]); in icvTrimRow()
991 if (quads[i]->neighbors[3]) in icvTrimRow()
993 icvRemoveQuadFromGroup(quads,rcount,quads[i]->neighbors[3]); in icvTrimRow()
999 if (quads[i]->neighbors[0]) in icvTrimRow()
1001 icvRemoveQuadFromGroup(quads,rcount,quads[i]->neighbors[0]); in icvTrimRow()
1004 if (quads[i]->neighbors[1]) in icvTrimRow()
1006 icvRemoveQuadFromGroup(quads,rcount,quads[i]->neighbors[1]); in icvTrimRow()
1022 icvRemoveQuadFromGroup(CvCBQuad **quads, int count, CvCBQuad *q0) in icvRemoveQuadFromGroup() argument
1028 CvCBQuad *q = quads[i]; in icvRemoveQuadFromGroup()
1050 CvCBQuad *q = quads[i]; in icvRemoveQuadFromGroup()
1053 quads[i] = quads[count-1]; in icvRemoveQuadFromGroup()
1507 static void icvFindQuadNeighbors( CvCBQuad *quads, int quad_count ) in icvFindQuadNeighbors() argument
1516 CvCBQuad* cur_quad = &quads[idx]; in icvFindQuadNeighbors()
1545 if( quads[k].neighbors[j] ) in icvFindQuadNeighbors()
1548 dx = pt.x - quads[k].corners[j]->pt.x; in icvFindQuadNeighbors()
1549 dy = pt.y - quads[k].corners[j]->pt.y; in icvFindQuadNeighbors()
1554 dist <= quads[k].edge_len*thresh_scale ) in icvFindQuadNeighbors()
1558 float ediff = cur_quad->edge_len - quads[k].edge_len; in icvFindQuadNeighbors()
1560 ediff > 32*quads[k].edge_len) in icvFindQuadNeighbors()
1566 closest_quad = &quads[k]; in icvFindQuadNeighbors()
1609 CvCBQuad* q = &quads[k]; in icvFindQuadNeighbors()