How to put Chinses into Mat use opencv android sdk
How to put Chinese into Mat use opencv android sdk,it always appear garbled
putText() only supports (a small subset of) ascii, no unicode or utf.
it's a debugging facility, not meant to be used for a real program, so it's very limited.
you can (re-) build the opencv android SDK with the freetype module from opencv_contrib, and then use freetype::putText() with chinese encoding, but maybe you also have to look for alternative methods on android here.
Asked: 2019-07-01 02:35:21 -0600
Seen: 492 times
Last updated: Jul 03 '19
what are you trying to do ? can you try to explain ? show some code ?
in general, opencv does not support unicode for filenames, putText(), etc, only ascii.
I just want to write Chinese to Mat use android sdk, like
Imgproc.putText(mat, "中文", point, Imgproc.FONT_HERSHEY_COMPLEX, 1, new Scalar(0, 255, 255));
,but the text display int the frame is "??",I want to know how to fix the problem,can you help me?