putText1
import { putText1 } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Draws a text string using specified font.
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 function returns the coordinates in pixels from where the text can be continued.
putText1(img: Mat, text: EmbindString, org: Point, color: Scalar, fface: FontFace, size: number, weight: number, flags: number, wrap: Range): Point;4 available overloads
putText1(img: Mat, text: EmbindString, org: Point, color: Scalar, fface: FontFace, size: number): Point;putText1(img: Mat, text: EmbindString, org: Point, color: Scalar, fface: FontFace, size: number, weight: number): Point;putText1(img: Mat, text: EmbindString, org: Point, color: Scalar, fface: FontFace, size: number, weight: number, flags: number): Point;putText1(img: Mat, text: EmbindString, org: Point, color: Scalar, fface: FontFace, size: number, weight: number, flags: number, wrap: Range): Point;imgInput/output value, modified by the native operation. Image.
textText string to be drawn.
orgBottom-left corner of the first character of the printed text (see PUT_TEXT_ALIGN_... though)
colorText color.
ffaceThe font to use for the text
sizeFont size in pixels (by default) or pts
weightFont weight, 100..1000, where 100 is "thin" font, 400 is "regular", 600 is "semibold", 800 is "bold" and beyond that is "black". The parameter is ignored if the font is not a variable font or if it does not provide variation along 'wght' axis. If the weight is 0, then the weight, currently set via setInstance(), is used.
flagsVarious flags, see PUT_TEXT_...
wrapThe optional text wrapping range: In the case of left-to-right (LTR) text if the printed character would cross wrap.end boundary, the "cursor" is set to wrap.start. In the case of right-to-left (RTL) text it's vice versa. If the parameters is not set, [org.x, img.cols] is used for LTR text and [0, org.x] is for RTL one.
The Point result.
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.