如何使用opencv puttext函数将文本放在图像上 [英] How can i put text on image using opencv puttext function
问题描述
hello guys
我正在使用visual studio 2010和opencv-2.4.9,我想使用puttext函数将unicode文本放在图像上但是puttext函数没有使用unicode文本(japanease,arabic等)正常工作,并在图像上显示文字为??????但puttext()英文文本正常工作。
代码段:
cv :: Mat m = img;
cv :: putText(m,名前,cv :: Point((m.cols / 2,m.rows / 2),cv :: FONT_ITALIC,.5,cv :: Scalar(180,180,180),1,CV_AA);请帮我在图像上显示unicode文字
您的帮助将不胜感激谢谢
我尝试了什么:
我正在努力visual studio 2010和opencv-2.4.9我希望使用puttext函数将unicode文本放在图像上,但puttext函数与unicode文本(japanease,arabic等)无法正常工作,而图像上的显示文本为??????但puttext()英文文本正常工作。
代码段:
cv :: Mat m = img;
cv :: putText(m,名前,cv :: Point((m.cols / 2,m.rows / 2),cv :: FONT_ITALIC,.5,cv :: Scalar(180,180,180),1,CV_AA);请帮我在图像上显示unicode文字
你的帮助将不胜感激。谢谢
hello guys
I am working on visual studio 2010 and opencv-2.4.9 and i want to put unicode text on image using puttext function but puttext function not working properly with unicode text(japanease,arabic etc) and dispaly text on image as"??????" but puttext() with english text work properly.
code snippet:
cv::Mat m=img;
cv::putText(m,"名前",cv::Point((m.cols/2,m.rows/2),cv::FONT_ITALIC,.5,cv::Scalar(180,180,180),1,CV_AA); please help me for showing unicode text on image
your help will be appreciated. thanks
What I have tried:
I am working on visual studio 2010 and opencv-2.4.9 and i want to put unicode text on image using puttext function but puttext function not working properly with unicode text(japanease,arabic etc) and dispaly text on image as"??????" but puttext() with english text work properly.
code snippet:
cv::Mat m=img;
cv::putText(m,"名前",cv::Point((m.cols/2,m.rows/2),cv::FONT_ITALIC,.5,cv::Scalar(180,180,180),1,CV_AA); please help me for showing unicode text on image
your help will be appreciated. thanks
推荐答案
看起来 puttext
无法呈现此类字符,请参阅puttext和unicode text(chinese,japanese,...) [ ^ ]。
It looks that puttext
is not able to render such characters, see "puttext and unicode text (chinese, japanese, ...)"[^].
这篇关于如何使用opencv puttext函数将文本放在图像上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!