61 cvCircle(pIplImage, cvPoint(
int(center.
x + 0.5),
int(center.
y + 0.5)),
int(radius + 0.5), CV_RGB(b, g, r), thickness);
62 cvReleaseImageHeader(&pIplImage);
68 cvEllipse(pIplImage, cvPoint(
int(ellipse.
center.
x + 0.5),
int(ellipse.
center.
y + 0.5)), cvSize(
int(ellipse.
radius_x + 0.5),
int(ellipse.
radius_y + 0.5)), -ellipse.
angle *
FLOAT_RAD2DEG, 0.0, 360.0, CV_RGB(b, g, r), thickness);
69 cvReleaseImageHeader(&pIplImage);
75 cvLine(pIplImage, cvPoint(
int(line.
p1.
x + 0.5),
int(line.
p1.
y + 0.5)), cvPoint(
int(line.
p2.
x + 0.5),
int(line.
p2.
y + 0.5)), CV_RGB(b, g, r), thickness);
76 cvReleaseImageHeader(&pIplImage);
82 cvLine(pIplImage, cvPoint(
int(p1.
x + 0.5),
int(p1.
y + 0.5)), cvPoint(
int(p2.
x + 0.5),
int(p2.
y + 0.5)), CV_RGB(b, g, r), thickness);
83 cvReleaseImageHeader(&pIplImage);
89 cvRectangle(pIplImage, cvPoint(region.
min_x, region.
min_y), cvPoint(region.
max_x, region.
max_y), CV_RGB(b, g, r), thickness);
90 cvReleaseImageHeader(&pIplImage);
97 printf(
"error: at least to points must be provided for PrimitivesDrawerCV::DrawConvexPolygon\n");
101 CvPoint *
points =
new CvPoint[nPoints];
102 for (
int i = 0,
index = 0; i < nPoints; i++,
index += 2)
104 points[i].x = pPoints[
index];
105 points[i].y = pPoints[index + 1];
111 cvFillConvexPoly(pIplImage, points, nPoints, CV_RGB(b, g, r));
114 for (
int i = 0; i < nPoints - 1; i++)
115 cvLine(pIplImage, points[i], points[i + 1], CV_RGB(b, g, r), thickness);
117 if (points[0].
x != points[nPoints - 1].
x || points[0].
y != points[nPoints - 1].
y)
118 cvLine(pIplImage, points[nPoints - 1], points[0], CV_RGB(b, g, r), thickness);
120 cvReleaseImageHeader(&pIplImage);
128 cvInitFont(&font, CV_FONT_VECTOR0, scale_x, scale_y, 0, thickness);
130 cvPutText(pIplImage, pText, cvPoint(
int(x + 0.5),
int(y + 0.5)), &font, CV_RGB(b, g, r));
131 cvReleaseImageHeader(&pIplImage);
void DrawEllipse(CByteImage *pImage, const Ellipse2d &ellipse, int r=255, int g=255, int b=255, int thickness=1)
Deprecated.
Vec2d center
The center of the ellipse.
void DrawCircle(CByteImage *pImage, const Vec2d &mid_point, double radius, int r=255, int g=255, int b=255, int thickness=1)
Deprecated.
void PutText(CByteImage *pImage, const char *pText, double x, double y, double scale_x, double scale_y, int r=255, int g=255, int b=255, int thickness=1)
Draws text into a CByteImage.
Data structure for the representation of 8-bit grayscale images and 24-bit RGB (or HSV) color images ...
void DrawConvexPolygon(CByteImage *pImage, int *pPoints, int nPoints, int r=255, int g=255, int b=255, int thickness=1)
Draws a polygon into a CByteImage.
GLsizei const GLfloat * points
float angle
The rotiation angle of the ellipse, given in radians.
void DrawRegion(CByteImage *pImage, const MyRegion ®ion, int r=255, int g=255, int b=255, int thickness=1)
Deprecated.
float radius_y
The radius in vertical direction of the ellipse (vertical refers to when angle = 0).
Data structure for the representation of a 2D ellipse.
float radius_x
The radius in horizontal direction of the ellipse (horizontal refers to when angle = 0)...
GLdouble GLdouble GLdouble r
Data structure for the representation of a 2D vector.
IplImage * Adapt(const CByteImage *pImage, bool bAllocateMemory=false)
Converts a CByteImage to an IplImage.
void DrawLine(CByteImage *pImage, const PointPair2d &line, int r=255, int g=255, int b=255, int thickness=1)
Deprecated.