Click or drag to resize

Cv2GetTextSize Method

returns bounding box of the text string

Namespace:  OpenCvSharp
Assembly:  OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax
public static Size GetTextSize(
	string text,
	HersheyFonts fontFace,
	double fontScale,
	int thickness,
	out int baseLine
)

Parameters

text
Type: SystemString
Input text string.
fontFace
Type: OpenCvSharpHersheyFonts
Font to use, see #HersheyFonts.
fontScale
Type: SystemDouble
Font scale factor that is multiplied by the font-specific base size.
thickness
Type: SystemInt32
Thickness of lines used to render the text. See #putText for details.
baseLine
Type: SystemInt32
baseLine y-coordinate of the baseline relative to the bottom-most text

Return Value

Type: Size
The size of a box that contains the specified text.
See Also