Draws a text string
img = cv.putText(img, txt, org)
[...] = cv.putText(..., 'OptionName', optionValue, ...)
Input
- img Image.
- txt Text string to be drawn.
- org Bottom-left corner of the text string in the image
[x,y]
.
Output
- img Output image, same size and type as input
img
.
Options
- FontFace Font type to use. One of the following:
- HersheySimplex Normal size sans-serif (default)
- HersheyPlain Small size sans-serif
- HersheyDuplex Normal size sans-serif; more complex than
HersheySimplex
- HersheyComplex Normal size serif; more complex than
HersheyDuplex
- HersheyTriplex Normal size serif; more complex than
HersheyComplex
- HersheyComplexSmall Smaller version of
HersheyComplex
- HersheyScriptSimplex Handwriting style
- HersheyScriptComplex More complex variant of
HersheyScriptSimplex
- FontStyle Font style. One of:
- FontScale Font scale factor that is multiplied by the font-specific
base size. default 1.0
- Color 3-element floating-point vector specifying text color.
- Thickness Thickness of the lines used to draw a text. default 1.
- LineType Line type (see cv.line). One of:
- 4 4-connected line
- 8 8-connected line (default)
- AA anti-aliased line
- BottomLeftOrigin When true, the image data origin is at the
bottom-left corner. Otherwise, it is at the top-left corner. default false
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 cv.getTextSize for a text rendering code example.