getFontScaleFromHeight
import { getFontScaleFromHeight } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
ARGUMENTSfontFace, pixelHeight, thickness
FUNCTIONgetFontScaleFromHeight
RETURN TYPEnumber
Calculates the font-specific size to use to achieve a given height in pixels.
See: cv::putText
getFontScaleFromHeight(fontFace: number, pixelHeight: number, thickness: number): number;2 available overloads
getFontScaleFromHeight(fontFace: number, pixelHeight: number): number;getFontScaleFromHeight(fontFace: number, pixelHeight: number, thickness: number): number;fontFaceFont to use, see cv::HersheyFonts.
pixelHeightPixel height to compute the fontScale for
thicknessThickness of lines used to render the text.See putText for details.
Returns
The fontSize to use for cv::putText
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.