From http://docs.opencv.org/2.4/modules/core/doc/drawing_functions.html#puttext:
fontScale – Font scale factor that is multiplied by the font-specific base size.
What is the base size for the hershey fonts? I can't find it anywhere.
There is nothing said in the documentation or anything really readable in the source code.
You can try with using getTextSize To get the size in pixels of the test string with the font you choose, I think it is not monospaced so it varies which letters you use.
When I use Python getTextSize, it returned tuple data structure.
For example,
textSize = cv2.getTextSize(text=str(act_class_info[0]), fontFace=cv2.FONT_HERSHEY_DUPLEX, fontScale=1, thickness=1)
print(textSize) # ((61, 22), 10)
It looks like (61, 22) is width of three letters and height of one letter in pixel unit. I don't know what the number 10 is meaning.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With