Move cv::Scalar_ to types.hpp

This commit is contained in:
Andrey Kamaev
2013-03-27 14:58:57 +04:00
parent 6ceca90c44
commit 5e7ab8baf3
13 changed files with 131 additions and 110 deletions

View File

@@ -322,16 +322,18 @@ static void DrawEtalon(IplImage *img, CvPoint2D32f *corners,
int i;
int x, y;
CvPoint prev_pt;
static const CvScalar rgb_colors[] = {
{{0,0,255}},
{{0,128,255}},
{{0,200,200}},
{{0,255,0}},
{{200,200,0}},
{{255,0,0}},
{{255,0,255}} };
static const CvScalar rgb_colors[] =
{
CvScalar(0,0,255),
CvScalar(0,128,255),
CvScalar(0,200,200),
CvScalar(0,255,0),
CvScalar(200,200,0),
CvScalar(255,0,0),
CvScalar(255,0,255)
};
static const CvScalar gray_colors[] = {
{{80}}, {{120}}, {{160}}, {{200}}, {{100}}, {{140}}, {{180}}
CvScalar(80), CvScalar(120), CvScalar(160), CvScalar(200), CvScalar(100), CvScalar(140), CvScalar(180)
};
const CvScalar* colors = img->nChannels == 3 ? rgb_colors : gray_colors;

View File

@@ -546,13 +546,13 @@ void CvCalibFilter::DrawPoints( CvMat** dstarr )
static const CvScalar line_colors[] =
{
{{0,0,255}},
{{0,128,255}},
{{0,200,200}},
{{0,255,0}},
{{200,200,0}},
{{255,0,0}},
{{255,0,255}}
CvScalar(0,0,255),
CvScalar(0,128,255),
CvScalar(0,200,200),
CvScalar(0,255,0),
CvScalar(200,200,0),
CvScalar(255,0,0),
CvScalar(255,0,255)
};
const int colorCount = sizeof(line_colors)/sizeof(line_colors[0]);

View File

@@ -833,7 +833,7 @@ draw_subdiv_facet( CvSubdiv2D * subdiv, IplImage * dst, IplImage * src, CvSubdiv
{
CvSubdiv2DPoint *pt = cvSubdiv2DEdgeDst( cvSubdiv2DRotateEdge( edge, 1 ));
CvPoint ip = cvPoint( cvRound( pt->pt.x ), cvRound( pt->pt.y ));
CvScalar color = {{0,0,0,0}};
CvScalar color(0);
//printf("count = %d, (%d,%d)\n", ip.x, ip.y );