Table of Contents

Method GetFontScaleFromHeight

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

GetFontScaleFromHeight(HersheyFonts, int, int)

Calculates the font-specific size to use to achieve a given height in pixels.

public static double GetFontScaleFromHeight(HersheyFonts fontFace, int pixelHeight, int thickness = 1)

Parameters

fontFace HersheyFonts

Font to use, see cv::HersheyFonts.

pixelHeight int

Pixel height to compute the fontScale for

thickness int

Thickness of lines used to render the text.See putText for details.

Returns

double

The fontSize to use for cv::putText