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: 428 times
Last updated: Jul 03 '19
How to get good matches from the ORB feature detection algorithm?
How to decrease the number of processed frames from a live video camera?
Unresolved inclusion in OpenCV+Android tutorial
build problems for android_binary_package - Eclipse Indigo, Ubuntu 12.04
Which values for window size and number of pyramids are reasonable for calcOpticalFlowPyrLK?
Errors running builder 'CDT Builder' when trying to build OpenCV for android samples
ndk-build deletes native OpenCV library
Installing Sample App / OpenCV Manager
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?