opencv - 그림 에 문자 표시 (중국어 포함 하지 않 음)

5091 단어 opencv
http://blog.csdn.net/ycc892009/article/details/6516528
1
#include <cv.h> 2 #include <highgui.h> 3 #include <windows.h> 4 5 int main(int argc, char* argv[]) 6 { 7 // LOAD IMAGE color 8 IplImage *src = cvLoadImage("e://lena.jpg", CV_LOAD_IMAGE_COLOR); 9 10 // create windows 11 cvNamedWindow("image", CV_WINDOW_AUTOSIZE); 12 13 //the font variable 14 CvFont font; 15 double hScale=1; 16 double vScale=1; 17 int lineWidth=2;// 18 TCHAR showMsg[]="hello image!"; 19 // 20 cvInitFont(&font,CV_FONT_HERSHEY_SIMPLEX|CV_FONT_ITALIC, hScale,vScale,0,lineWidth);//21 // cvPoint x,y 22 cvPutText(src,showMsg,cvPoint(200,200),&font,CV_RGB(255,0,0));// 23 24 // show image 25 cvShowImage("image", src); 26 cvWaitKey(0); 27 cvDestroyWindow("image"); 28 cvReleaseImage(&src); 29 printf("Hello World!/n"); 30 return 0; 31 }

좋은 웹페이지 즐겨찾기