概述
文章目录
- 文字结构
- 文字输出
文字结构
- 函数:
CvFont()
- 定义:
/** Font structure */
typedef struct CvFont
{
const char* nameFont; //Qt:nameFont
CvScalar color; //Qt:ColorFont -> cvScalar(blue_component, green_component, red_component[, alpha_component])
int font_face; //Qt: bool italic /** =CV_FONT_* */
const int* ascii; //!< font data and metrics
const int* greek;
const int* cyrillic;
float hscale, vscale;
float shear; //!< slope coefficient: 0 - normal, >0 - italic
int thickness; //!< Qt: weight /** letters thickness */
float dx; //!< horizontal interval between letters
int line_type; //!< Qt: PointSize
}
CvFont;
文字输出
-
- 函数:
cvInitFont()
- 定义:
CVAPI(void) cvInitFont( CvFont* font, int font_face, double hscale, double vscale, double shear CV_DEFAULT(0), int thickness CV_DEFAULT(1), int line_type CV_DEFAULT(8));
- 函数:
-
- 函数:
getTextSize()
- 定义:
CV_EXPORTS_W Size getTextSize(const String& text, int fontFace, double fontScale, int thickness, CV_OUT int* baseLine);
- 函数:
-
- 函数:
putText()
- 定义
CV_EXPORTS_W void putText( InputOutputArray img, const String& text, Point org, int fontFace, double fontScale, Scalar color, int thickness = 1, int lineType = LINE_8, bool bottomLeftOrigin = false );
- 描述
/** @brief Draws a text string. The function cv::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. @param img Image. @param text Text string to be drawn. @param org Bottom-left corner of the text string in the image. @param fontFace Font type, see #HersheyFonts. @param fontScale Font scale factor that is multiplied by the font-specific base size. @param color Text color. @param thickness Thickness of the lines used to draw a text. @param lineType Line type. See #LineTypes @param bottomLeftOrigin When true, the image data origin is at the bottom-left corner. Otherwise, it is at the top-left corner. */
- 函数:
最后
以上就是高大康乃馨为你收集整理的# OpenCV 显示文字相关函数的全部内容,希望文章能够帮你解决# OpenCV 显示文字相关函数所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复