[−][src]Function opencv::highgui::add_text
pub fn add_text(
img: &Mat,
text: &str,
org: Point,
name_font: &str,
point_size: i32,
color: Scalar,
weight: i32,
style: i32,
spacing: i32
) -> Result<()>
Draws a text on the image.
Parameters
- img: 8-bit 3-channel image where the text should be drawn.
- text: Text to write on an image.
- org: Point(x,y) where the text should start on an image.
- nameFont: Name of the font. The name should match the name of a system font (such as Times). If the font is not found, a default one is used.
- pointSize: Size of the font. If not specified, equal zero or negative, the point size of the font is set to a system-dependent default value. Generally, this is 12 points.
- color: Color of the font in BGRA where A = 255 is fully transparent.
- weight: Font weight. Available operation flags are : cv::QtFontWeights You can also specify a positive integer for better control.
- style: Font style. Available operation flags are : cv::QtFontStyles
- spacing: Spacing between characters. It can be negative or positive.
C++ default parameters
- point_size: -1
- color: Scalar::all(0)
- weight: QT_FONT_NORMAL
- style: QT_STYLE_NORMAL
- spacing: 0