//图像和视频的输入/输出均在HighGUI 模块中
#include "stdafx.h"
#include
#include
#include
int main(int argc, char* argv[])
{
IplImage *img = cvCreateImage( cvSize( 500, 500), 8, 3 );
cvZero( img );
cvNamedWindow( "hello", 1 );
CvFont font = cvFont( 3, 3 );
while (1){
cvPutText( img, "hello xiao luo !", cvPoint( 50, 50 ), &font, CV_RGB( 255, 0, 0 ) );
cvShowImage( "hello", img );
char c = cvWaitKey( );
if ( c == 27 )
break;
}
return 0;
}
//注释:(字体大小, 线粗)
/*
CvFont cvFont( double scale, int thickness CV_DEFAULT(1) )
{
CvFont font;
cvInitFont( &font, CV_FONT_HERSHEY_PLAIN, scale, scale, 0, thickness, CV_AA );
return font;
}
*/
做一件有意义的事是很容易的事,困难的是一直坚持做,坚持那颗用不服输的心,坚持学习,坚持。。。