Functions for drawing 2D primitives into a CByteImage using OpenCV. More...
Functions | |
void | DrawCircle (CByteImage *pImage, const Vec2d &mid_point, double radius, int r=255, int g=255, int b=255, int thickness=1) |
Deprecated. | |
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. | |
void | DrawEllipse (CByteImage *pImage, const Ellipse2d &ellipse, int r=255, int g=255, int b=255, int thickness=1) |
Deprecated. | |
void | DrawLine (CByteImage *pImage, const PointPair2d &line, int r=255, int g=255, int b=255, int thickness=1) |
Deprecated. | |
void | DrawLine (CByteImage *pImage, const Vec2d &p1, const Vec2d &p2, int r=255, int g=255, int b=255, int thickness=1) |
Deprecated. | |
void | DrawRegion (CByteImage *pImage, const MyRegion ®ion, 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. |
Functions for drawing 2D primitives into a CByteImage using OpenCV.
Deprecated. Use PrimitivesDrawer instead. Only filling of some primitives and PrimitivesDrawerCV::PutText are not yet implemented in PrimitivesDrawer.
void PrimitivesDrawerCV::DrawCircle | ( | CByteImage * | pImage, |
const Vec2d & | mid_point, | ||
double | radius, | ||
int | r = 255 , |
||
int | g = 255 , |
||
int | b = 255 , |
||
int | thickness = 1 |
||
) |
Deprecated.
Use PrimitivesDrawer::DrawCircle(CByteImage*, const Vec2d&, float, int, int, int, int, bool) instead.
Definition at line 58 of file PrimitivesDrawerCV.cpp.
void PrimitivesDrawerCV::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.
The provided points must build a polygon in the given order.
If the polygon is to be filled (thickness = -1), then the points must build a convex polygon.
If thickness >= 1, then it is recommended to use PrimitivesDrawer::DrawConvexPolygon(CByteImage*, const Vec2d*, int, int, int, int, int) instead.
[out] | pImage | The target image, the polygon will be drawn in here. Must be of type CByteImage::eGrayScale or CByteImage::eRGB24. |
[in] | pPoints | An array of points containing the 2D point coordinates in the following order: x-coordinate 1st point, y-coordinate 1st point, x-coordinate 2nd point, y-coordinate 2nd point, and so on. Must contain 2 * nPoints integer values. |
[in] | nPoints | The number of points. Must be >= 2. |
[in] | r | The red component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255. |
[in] | g | The green component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255. |
[in] | b | The blue component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255. |
[in] | thickness | If thickness = -1, then the polygon will be filled. Otherwise (thickness >= 1) this parameter specifies the thickness of the lines to be drawn. If thickness >= 1, then the polygon will be closed if the first and last point are not equal. |
Definition at line 93 of file PrimitivesDrawerCV.cpp.
void PrimitivesDrawerCV::DrawEllipse | ( | CByteImage * | pImage, |
const Ellipse2d & | ellipse, | ||
int | r = 255 , |
||
int | g = 255 , |
||
int | b = 255 , |
||
int | thickness = 1 |
||
) |
Deprecated.
Use PrimitivesDrawer::DrawEllipse(CByteImage*, const Ellipse2d&, int, int, int, int) instead.
Definition at line 65 of file PrimitivesDrawerCV.cpp.
void PrimitivesDrawerCV::DrawLine | ( | CByteImage * | pImage, |
const PointPair2d & | line, | ||
int | r = 255 , |
||
int | g = 255 , |
||
int | b = 255 , |
||
int | thickness = 1 |
||
) |
Deprecated.
Use PrimitivesDrawer::DrawLine(CByteImage*, const PointPair2d&, int, int, int, int) instead.
Definition at line 72 of file PrimitivesDrawerCV.cpp.
void PrimitivesDrawerCV::DrawLine | ( | CByteImage * | pImage, |
const Vec2d & | p1, | ||
const Vec2d & | p2, | ||
int | r = 255 , |
||
int | g = 255 , |
||
int | b = 255 , |
||
int | thickness = 1 |
||
) |
Deprecated.
Use PrimitivesDrawer::DrawLine(CByteImage*, const Vec2d&, const Vec2d&, int, int, int, int) instead.
Definition at line 79 of file PrimitivesDrawerCV.cpp.
void PrimitivesDrawerCV::DrawRegion | ( | CByteImage * | pImage, |
const MyRegion & | region, | ||
int | r = 255 , |
||
int | g = 255 , |
||
int | b = 255 , |
||
int | thickness = 1 |
||
) |
Deprecated.
Use PrimitivesDrawer::Region(CByteImage*, const MyRegion&, int, int, int, int) instead.
Definition at line 86 of file PrimitivesDrawerCV.cpp.
void PrimitivesDrawerCV::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.
[out] | pImage | The target image, the text will be drawn in here. Must be of type CByteImage::eGrayScale or CByteImage::eRGB24. |
[in] | pText | The text to be written. |
[in] | x | The x-coordinate of the bootem left corner of the text area in the target image. |
[in] | y | The y-coordinate of the bottom left corner of the text area in the target image. |
[in] | scale_x | The scaling in x direction. Must be > 0. scale_x = 1.0 is a good value to start with. |
[in] | scale_y | The scaling in y direction. Must be > 0. scale_y = 1.0 is a good value to start with. |
[in] | r | The red component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255. |
[in] | g | The green component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255. |
[in] | b | The blue component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255. |
[in] | thickness | The thickness of the letters. Must be >= 1. |
Definition at line 125 of file PrimitivesDrawerCV.cpp.