Library/opencv

opencv font

퓨림노 2012. 11. 23. 17:41


영상에 글자 출력 for Android Native code


CvFont m_font; // OpenCV font
 // get fps and Output
    if(IS_DEBUG){
    	fTime = (cvGetTickCount() - fTime)/(cvGetTickFrequency()*1000);
    	DPRINTF("Excution Time = %g ms", fTime);

    	char outputString[30] = {0,};
    	sprintf( outputString, "fps = %lf", fTime );
    	putText( *pMatRgb, outputString, Point(10, 30), FONT_HERSHEY_SIMPLEX, 1.0, CV_RGB(0,255,0), 2.0);
    }

// init Font - 혹시나 모를 초기화 
void InitcvFont() {
	cvInitFont( &m_font, CV_FONT_HERSHEY_SIMPLEX|CV_FONT_ITALIC, 0.5, 0.5, 0, 1 );
}
// 끝