Lines Matching refs:quads
128 static int icvGenerateQuads( CvCBQuad **quads, CvCBCorner **corners,
135 static void icvFindQuadNeighbors( CvCBQuad *quads, int quad_count );
137 static int icvFindConnectedQuads( CvCBQuad *quads, int quad_count,
145 CvCBQuad **quads, CvSize pattern_size );
147 static int icvOrderFoundConnectedQuads( int quad_count, CvCBQuad **quads,
153 static int icvTrimCol(CvCBQuad **quads, int count, int col, int dir);
155 static int icvTrimRow(CvCBQuad **quads, int count, int row, int dir);
157 static int icvAddOuterQuad(CvCBQuad *quad, CvCBQuad **quads, int quad_count,
160 static void icvRemoveQuadFromGroup(CvCBQuad **quads, int count, CvCBQuad *q0);
217 CvCBQuad *quads = 0, **quad_group = 0; in cvFindChessboardCorners() local
287 …CV_CALL( quad_count = icvGenerateQuadsEx( &quads, &corners, storage, img, thresh_img, dilations, f… in cvFindChessboardCorners()
330 … CV_CALL( quad_count = icvGenerateQuads( &quads, &corners, storage, thresh_img, flags )); in cvFindChessboardCorners()
347 pt1 = quads[i].corners[k]->pt; in cvFindChessboardCorners()
348 pt2 = quads[i].corners[(k+1)%4]->pt; in cvFindChessboardCorners()
367 CV_CALL( icvFindQuadNeighbors( quads, quad_count )); in cvFindChessboardCorners()
376 … CV_CALL( count = icvFindConnectedQuads( quads, quad_count, quad_group, group_idx, storage )); in cvFindChessboardCorners()
385 … count = icvOrderFoundConnectedQuads(count, quad_group, &quad_count, &quads, &corners, in cvFindChessboardCorners()
396 if (quads[i].group_idx == group_idx) in cvFindChessboardCorners()
401 if (quads[i].ordered) in cvFindChessboardCorners()
403 pt1 = quads[i].corners[k]->pt; in cvFindChessboardCorners()
404 pt2 = quads[i].corners[(k+1)%4]->pt; in cvFindChessboardCorners()
448 cvFree( &quads ); in cvFindChessboardCorners()
461 cvFree( &quads ); in cvFindChessboardCorners()
539 icvOrderFoundConnectedQuads( int quad_count, CvCBQuad **quads, in icvOrderFoundConnectedQuads() argument
551 if (quads[i]->count == 4) in icvOrderFoundConnectedQuads()
553 start = quads[i]; in icvOrderFoundConnectedQuads()
658 quad_count = icvTrimCol(quads,quad_count,col_min,-1); in icvOrderFoundConnectedQuads()
663 quad_count = icvTrimCol(quads,quad_count,col_max,+1); in icvOrderFoundConnectedQuads()
674 quad_count = icvTrimRow(quads,quad_count,row_min,-1); in icvOrderFoundConnectedQuads()
679 quad_count = icvTrimRow(quads,quad_count,row_max,+1); in icvOrderFoundConnectedQuads()
690 if (quads[i]->count == 4) in icvOrderFoundConnectedQuads()
692 int col = quads[i]->col; in icvOrderFoundConnectedQuads()
693 int row = quads[i]->row; in icvOrderFoundConnectedQuads()
707 CvCBQuad *neighbor = quads[i]->neighbors[j]; in icvOrderFoundConnectedQuads()
715 icvOrderQuad(neighbor, quads[i]->corners[j], (j+2)%4); in icvOrderFoundConnectedQuads()
731 if (quads[i]->count < 4 && quads[i]->ordered) in icvOrderFoundConnectedQuads()
733 int added = icvAddOuterQuad(quads[i],quads,quad_count,all_quads,*all_count,corners); in icvOrderFoundConnectedQuads()
749 if (quads[i]->ordered == false) in icvOrderFoundConnectedQuads()
754 if (quads[i]->neighbors[j] && quads[i]->neighbors[j]->ordered) in icvOrderFoundConnectedQuads()
760 icvRemoveQuadFromGroup(quads,rcount,quads[i]); in icvOrderFoundConnectedQuads()
779 icvAddOuterQuad( CvCBQuad *quad, CvCBQuad **quads, int quad_count, in icvAddOuterQuad() argument
793 quads[quad_count] = q; in icvAddOuterQuad()
849 icvTrimCol(CvCBQuad **quads, int count, int col, int dir) in icvTrimCol() argument
856 if (quads[i]->ordered) in icvTrimCol()
857 PRINTF("index: %d cur: %d\n", col, quads[i]->col); in icvTrimCol()
859 if (quads[i]->ordered && quads[i]->col == col) in icvTrimCol()
863 if (quads[i]->neighbors[1]) in icvTrimCol()
865 icvRemoveQuadFromGroup(quads,rcount,quads[i]->neighbors[1]); in icvTrimCol()
868 if (quads[i]->neighbors[2]) in icvTrimCol()
870 icvRemoveQuadFromGroup(quads,rcount,quads[i]->neighbors[2]); in icvTrimCol()
876 if (quads[i]->neighbors[0]) in icvTrimCol()
878 icvRemoveQuadFromGroup(quads,rcount,quads[i]->neighbors[0]); in icvTrimCol()
881 if (quads[i]->neighbors[3]) in icvTrimCol()
883 icvRemoveQuadFromGroup(quads,rcount,quads[i]->neighbors[3]); in icvTrimCol()
894 icvTrimRow(CvCBQuad **quads, int count, int row, int dir) in icvTrimRow() argument
901 if (quads[i]->ordered) in icvTrimRow()
902 PRINTF("index: %d cur: %d\n", row, quads[i]->row); in icvTrimRow()
904 if (quads[i]->ordered && quads[i]->row == row) in icvTrimRow()
908 if (quads[i]->neighbors[2]) in icvTrimRow()
910 icvRemoveQuadFromGroup(quads,rcount,quads[i]->neighbors[2]); in icvTrimRow()
913 if (quads[i]->neighbors[3]) in icvTrimRow()
915 icvRemoveQuadFromGroup(quads,rcount,quads[i]->neighbors[3]); in icvTrimRow()
921 if (quads[i]->neighbors[0]) in icvTrimRow()
923 icvRemoveQuadFromGroup(quads,rcount,quads[i]->neighbors[0]); in icvTrimRow()
926 if (quads[i]->neighbors[1]) in icvTrimRow()
928 icvRemoveQuadFromGroup(quads,rcount,quads[i]->neighbors[1]); in icvTrimRow()
944 icvRemoveQuadFromGroup(CvCBQuad **quads, int count, CvCBQuad *q0) in icvRemoveQuadFromGroup() argument
950 CvCBQuad *q = quads[i]; in icvRemoveQuadFromGroup()
972 CvCBQuad *q = quads[i]; in icvRemoveQuadFromGroup()
975 quads[i] = quads[count-1]; in icvRemoveQuadFromGroup()
1450 static void icvFindQuadNeighbors( CvCBQuad *quads, int quad_count ) in icvFindQuadNeighbors() argument
1459 CvCBQuad* cur_quad = &quads[idx]; in icvFindQuadNeighbors()
1488 if( quads[k].neighbors[j] ) in icvFindQuadNeighbors()
1491 dx = pt.x - quads[k].corners[j]->pt.x; in icvFindQuadNeighbors()
1492 dy = pt.y - quads[k].corners[j]->pt.y; in icvFindQuadNeighbors()
1497 dist <= quads[k].edge_len*thresh_scale ) in icvFindQuadNeighbors()
1501 float ediff = cur_quad->edge_len - quads[k].edge_len; in icvFindQuadNeighbors()
1503 ediff > 32*quads[k].edge_len) in icvFindQuadNeighbors()
1509 closest_quad = &quads[k]; in icvFindQuadNeighbors()
1552 CvCBQuad* q = &quads[k]; in icvFindQuadNeighbors()