Functions
PrimitivesDrawerCV Namespace Reference

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. More...
 
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. More...
 
void DrawEllipse (CByteImage *pImage, const Ellipse2d &ellipse, int r=255, int g=255, int b=255, int thickness=1)
 Deprecated. More...
 
void DrawLine (CByteImage *pImage, const PointPair2d &line, int r=255, int g=255, int b=255, int thickness=1)
 Deprecated. More...
 
void DrawLine (CByteImage *pImage, const Vec2d &p1, const Vec2d &p2, int r=255, int g=255, int b=255, int thickness=1)
 Deprecated. More...
 
void DrawRegion (CByteImage *pImage, const MyRegion &region, int r=255, int g=255, int b=255, int thickness=1)
 Deprecated. More...
 
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. More...
 

Detailed Description

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.

Function Documentation

void PrimitivesDrawerCV::DrawCircle ( CByteImage pImage,
const Vec2d mid_point,
double  radius,
int  r = 255,
int  g = 255,
int  b = 255,
int  thickness = 1 
)
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.

Parameters
[out]pImageThe target image, the polygon will be drawn in here. Must be of type CByteImage::eGrayScale or CByteImage::eRGB24.
[in]pPointsAn 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]nPointsThe number of points. Must be >= 2.
[in]rThe red component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]gThe green component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]bThe blue component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]thicknessIf 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 
)
void PrimitivesDrawerCV::DrawLine ( CByteImage pImage,
const PointPair2d line,
int  r = 255,
int  g = 255,
int  b = 255,
int  thickness = 1 
)
void PrimitivesDrawerCV::DrawLine ( CByteImage pImage,
const Vec2d p1,
const Vec2d p2,
int  r = 255,
int  g = 255,
int  b = 255,
int  thickness = 1 
)
void PrimitivesDrawerCV::DrawRegion ( CByteImage pImage,
const MyRegion region,
int  r = 255,
int  g = 255,
int  b = 255,
int  thickness = 1 
)

Deprecated.

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.

Parameters
[out]pImageThe target image, the text will be drawn in here. Must be of type CByteImage::eGrayScale or CByteImage::eRGB24.
[in]pTextThe text to be written.
[in]xThe x-coordinate of the bootem left corner of the text area in the target image.
[in]yThe y-coordinate of the bottom left corner of the text area in the target image.
[in]scale_xThe scaling in x direction. Must be > 0. scale_x = 1.0 is a good value to start with.
[in]scale_yThe scaling in y direction. Must be > 0. scale_y = 1.0 is a good value to start with.
[in]rThe red component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]gThe green component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]bThe blue component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]thicknessThe thickness of the letters. Must be >= 1.

Definition at line 125 of file PrimitivesDrawerCV.cpp.



asr_ivt
Author(s): Allgeyer Tobias, Hutmacher Robin, Kleinert Daniel, Meißner Pascal, Scholz Jonas, Stöckle Patrick
autogenerated on Mon Dec 2 2019 03:47:29