Text
cvui::text()
renders a string. The signature of the function is:
void text (
cv::Mat& theWhere,
int theX,
int theY,
const cv::String& theText,
double theFontScale = 0.4,
unsigned int theColor = 0xCECECE
)
where theWhere
is the image/frame where the image will be rendered, theX
is the position X, theY
is the position Y, theText
is the text content, theFontScale
is the size of the text, and theColor
is color of the text in the format 0xRRGGBB
, e.g. 0xff0000
for red.
Below is an example of the text component. The result on the screen is shown in Figure 1.
cvui::text(frame, 90, 50, "Hello world");
Learn more
Check the main-app example for more information about text.