Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Use format() to fromat your text, and use it like sprintf.

For example,

int value=10;
string someText = format("Dimension: %d", value);
putText(frame, someText, textOrg, fontFace, fontScale, Scalar::all(255), thickness,8);
imshow("frame",frame);

and use CV_8UC3 instead CV_8UC1 if you need colour image.