2

下面的函数以水平方式打印文本。我想以垂直方式打印文本。我不想使用旋转功能,因为它会增加处理时间。我怎样才能做到这一点?

void org.opencv.core.Core.putText(Mat img, String text, Point org, int fontFace, double fontScale, Scalar color, int thickness)

Draws a text string.

The function putText renders the specified text string in the image. Symbols that cannot be rendered using the specified font are replaced by question marks. See "getTextSize" for a text rendering code example.

Parameters:
img Image.
text Text string to be drawn.
org Bottom-left corner of the text string in the image.
fontFace Font type. One of FONT_HERSHEY_SIMPLEX, FONT_HERSHEY_PLAIN, FONT_HERSHEY_DUPLEX, FONT_HERSHEY_COMPLEX, FONT_HERSHEY_TRIPLEX, FONT_HERSHEY_COMPLEX_SMALL, FONT_HERSHEY_SCRIPT_SIMPLEX, or FONT_HERSHEY_SCRIPT_COMPLEX, where each of the font ID's can be combined with FONT_HERSHEY_ITALIC to get the slanted letters.
fontScale Font scale factor that is multiplied by the font-specific base size.
color Text color.
thickness Thickness of the lines used to draw a text.

另见:org.opencv.core.Core.putText ( http://docs.opencv.org/modules/core/doc/drawing_functions.html#puttext )

4

0 回答 0