gpt4 book ai didi

c - opencv 在视频上显示变量

转载 作者:太空宇宙 更新时间:2023-11-03 21:57:10 26 4
gpt4 key购买 nike

是否可以使用 opencv 在屏幕上覆盖 %d?

CvPutText()

试过了,但是做不到

最佳答案

假设我没有explained to you in a comment before .

int number  = 5;
char text[255];
sprintf(text, "Score %d", (int)number);

CvFont font;
double hScale=1.0;
double vScale=1.0;
int lineWidth=1;
cvInitFont(&font,CV_FONT_HERSHEY_SIMPLEX|CV_FONT_ITALIC, hScale,vScale,0,lineWidth);

cvPutText (img, text, cvPoint(200,400), &font, cvScalar(255,255,0));

关于c - opencv 在视频上显示变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9503421/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com