putText
import { putText } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
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.
The fontScale parameter is a scale factor that is multiplied by the base font size:
- When scale > 1, the text is magnified.
- When 0 < scale < 1, the text is minimized.
- When scale < 0, the text is mirrored or reversed.
putText(img: Mat, text: EmbindString, org: Point, fontFace: number, fontScale: number, color: Scalar, thickness: number, lineType: number, bottomLeftOrigin: boolean): void;4 available overloads
putText(img: Mat, text: EmbindString, org: Point, fontFace: number, fontScale: number, color: Scalar): void;putText(img: Mat, text: EmbindString, org: Point, fontFace: number, fontScale: number, color: Scalar, thickness: number): void;putText(img: Mat, text: EmbindString, org: Point, fontFace: number, fontScale: number, color: Scalar, thickness: number, lineType: number): void;putText(img: Mat, text: EmbindString, org: Point, fontFace: number, fontScale: number, color: Scalar, thickness: number, lineType: number, bottomLeftOrigin: boolean): void;imgInput/output value, modified by the native operation. Image.
textText string to be drawn.
orgBottom-left corner of the text string in the image.
fontFaceFont type, see #HersheyFonts.
fontScaleFont scale factor that is multiplied by the font-specific base size.
colorText color.
thicknessThickness of the lines used to draw a text.
lineTypeLine type. See #LineTypes
bottomLeftOriginWhen true, the image data origin is at the bottom-left corner. Otherwise, it is at the top-left corner.
These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.