반응형
** C/C++에서 opencv로 영상에 text 글자 삽입하기 **
CvFont font;
char buffer[64];
// cvInitFont(CvFont*, int fontFace, double Hscale, double Vscale, double Shear, int thickness, int lineType);
cvInitFont(&font, CV_FONT_HERSHEY_SIMPLEX, 0.5, 0.5, 0, 1.5, CV_AA);
// display just character
cvPutText(screenRGB, "Target Speed:", cvPoint(10, 80), &font, cvScalar(0, 0, 255, 0));
// display the value of the float variable
int ret = snprintf(buffer, sizeof buffer, "%f", variable);
cvPutText(screenRGB, buffer, cvPoint(130, 80), &font, cvScalar(255, 0, 0, 0));
'Opencv' 카테고리의 다른 글
[Opencv] How to install opencv on ubuntu version 2 (0) | 2018.03.29 |
---|---|
how to read/save an image as bmp in python (0) | 2017.08.11 |
how to put text message on images using opencv library on python (0) | 2017.07.27 |
How to use SEEDS for superpixel segmentation (0) | 2017.07.19 |
[opencv] how to install opencv on ubuntu (0) | 2017.07.18 |