Skip to content

Commit

Permalink
unrevert claibinit
Browse files Browse the repository at this point in the history
  • Loading branch information
AndresRReina committed Jan 31, 2017
1 parent 6e6fcfc commit 5d7511f
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions algorithms/src/claibinit_mod.h
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ int cvFindChessboardCorners( const void* arr, CvSize pattern_size,
for (int k=0; k<4; k++)
{
CvPoint2D32f pt1, pt2;
CvScalar color = CV_RGB(30,255,30);
//CvScalar color = CV_RGB(30,255,30);
pt1 = quads[i].corners[k]->pt;
pt2 = quads[i].corners[(k+1)%4]->pt;
pt2.x = (pt1.x + pt2.x)/2;
Expand Down Expand Up @@ -452,7 +452,7 @@ int cvFindChessboardCorners( const void* arr, CvSize pattern_size,
for (int k=0; k<4; k++)
{
CvPoint2D32f pt1, pt2;
CvScalar color = CV_RGB(30,255,30);
//CvScalar color = CV_RGB(30,255,30);
if (quads[i].ordered)
color = CV_RGB(255,30,30);
pt1 = quads[i].corners[k]->pt;
Expand Down Expand Up @@ -1848,32 +1848,32 @@ cvDrawChessboardCorners( CvArr* _image, CvSize pattern_size,

if( !found )
{
CvScalar color(0,0,255);
/*CvScalar color(0,0,255);
if( cn == 1 )
color = cvScalarAll(200);
color.val[0] *= scale;
color.val[1] *= scale;
color.val[2] *= scale;
color.val[3] *= scale;
color.val[3] *= scale;*/

for( i = 0; i < count; i++ )
{
CvPoint pt;
/*CvPoint pt;
pt.x = cvRound(corners[i].x*(1 << shift));
pt.y = cvRound(corners[i].y*(1 << shift));
cvLine( image, cvPoint( pt.x - r, pt.y - r ),
cvPoint( pt.x + r, pt.y + r ), color, 1, line_type, shift );
cvLine( image, cvPoint( pt.x - r, pt.y + r),
cvPoint( pt.x + r, pt.y - r), color, 1, line_type, shift );
cvCircle( image, pt, r+(1<<shift), color, 1, line_type, shift );
cvCircle( image, pt, r+(1<<shift), color, 1, line_type, shift );*/
}
}
else
{
int x, y;
CvPoint prev_pt = {0, 0};
const int line_max = 7;
static const CvScalar line_colors[line_max] =
/*static const CvScalar line_colors[line_max] =
{
CvScalar(0,0,255),
CvScalar(0,128,255),
Expand All @@ -1882,32 +1882,32 @@ cvDrawChessboardCorners( CvArr* _image, CvSize pattern_size,
CvScalar(200,200,0),
CvScalar(255,0,0),
CvScalar(255,0,255)
};
};*/

for( y = 0, i = 0; y < pattern_size.height; y++ )
{
CvScalar color = line_colors[y % line_max];
/*CvScalar color = line_colors[y % line_max];
if( cn == 1 )
color = cvScalarAll(200);
color.val[0] *= scale;
color.val[1] *= scale;
color.val[2] *= scale;
color.val[3] *= scale;
color.val[3] *= scale;*/

for( x = 0; x < pattern_size.width; x++, i++ )
{
CvPoint pt;
pt.x = cvRound(corners[i].x*(1 << shift));
pt.y = cvRound(corners[i].y*(1 << shift));

if( i != 0 )
cvLine( image, prev_pt, pt, color, 1, line_type, shift );
/*if( i != 0 )
cvLine( image, prev_pt, pt, color, 1, line_type, shift );*/

cvLine( image, cvPoint(pt.x - r, pt.y - r),
/*cvLine( image, cvPoint(pt.x - r, pt.y - r),
cvPoint(pt.x + r, pt.y + r), color, 1, line_type, shift );
cvLine( image, cvPoint(pt.x - r, pt.y + r),
cvPoint(pt.x + r, pt.y - r), color, 1, line_type, shift );
cvCircle( image, pt, r+(1<<shift), color, 1, line_type, shift );
cvCircle( image, pt, r+(1<<shift), color, 1, line_type, shift );*/
prev_pt = pt;
}
}
Expand Down

0 comments on commit 5d7511f

Please sign in to comment.