The helps in writing text on images.
More...
#include <text.h>
|
static void | putText (cv::Mat &img, const std::string &text, cv::Point origin, int fontFace, double fontScale, cv::Scalar color, int thickness=1, int lineType=8, bool bottomLeftOrigin=false) |
| Utility for drawing text with line breaks.
|
|
static void | putCenteredText (cv::Mat &img, const std::string &text, int fontFace, double fontScale, cv::Scalar color, int thickness=1, int lineType=8) |
| Utility for drawing vertically & horizontally centered text with line breaks.
|
|
The helps in writing text on images.
◆ putCenteredText()
static void Text::putCenteredText |
( |
cv::Mat & |
img, |
|
|
const std::string & |
text, |
|
|
int |
fontFace, |
|
|
double |
fontScale, |
|
|
cv::Scalar |
color, |
|
|
int |
thickness = 1 , |
|
|
int |
lineType = 8 |
|
) |
| |
|
static |
Utility for drawing vertically & horizontally centered text with line breaks.
- Parameters
-
img | Image |
text | Text string to be drawn. |
fontFace | Font type. One of FONT_HERSHEY_SIMPLEX, FONT_HERSHEY_PLAIN, FONT_HERSHEY_DUPLEX, FONT_HERSHEY_COMPLEX, FONT_HERSHEY_TRIPLEX, FONT_HERSHEY_COMPLEX_SMALL, FONT_HERSHEY_SCRIPT_SIMPLEX, or FONT_HERSHEY_SCRIPT_COMPLEX, where each of the font ID’s can be combined with FONT_ITALIC to get the slanted letters. |
fontScale | Font scale factor that is multiplied by the font-specific base size. |
color | Text color. |
thickness | Thickness of the lines used to draw a text. |
lineType | Line type. See the line for details. Otherwise, it is in the top-left corner. |
- Returns
- None; image is modified in place
◆ putText()
static void Text::putText |
( |
cv::Mat & |
img, |
|
|
const std::string & |
text, |
|
|
cv::Point |
origin, |
|
|
int |
fontFace, |
|
|
double |
fontScale, |
|
|
cv::Scalar |
color, |
|
|
int |
thickness = 1 , |
|
|
int |
lineType = 8 , |
|
|
bool |
bottomLeftOrigin = false |
|
) |
| |
|
static |
Utility for drawing text with line breaks.
- Parameters
-
img | Image |
text | Text string to be drawn. |
origin | Bottom-left corner of the first line of the text string in the image. |
fontFace | Font type. One of FONT_HERSHEY_SIMPLEX, FONT_HERSHEY_PLAIN, FONT_HERSHEY_DUPLEX, FONT_HERSHEY_COMPLEX, FONT_HERSHEY_TRIPLEX, FONT_HERSHEY_COMPLEX_SMALL, FONT_HERSHEY_SCRIPT_SIMPLEX, or FONT_HERSHEY_SCRIPT_COMPLEX, where each of the font ID’s can be combined with FONT_ITALIC to get the slanted letters. |
fontScale | Font scale factor that is multiplied by the font-specific base size. |
color | Text color. |
thickness | Thickness of the lines used to draw a text. |
lineType | Line type. See the line for details. |
bottomLeftOrigin | When true, the image data origin is in the bottom-left corner. Otherwise, it is in the top-left corner. |
- Returns
- None; image is modified in place
The documentation for this class was generated from the following file: