Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

how do we interpret the "baseline" output of cv2.getTextSize?

If I do this for example:
cv2.getTextSize('blahblah', cv2.FONT_HERSHEY_SIMPLEX, 2, 2)
it returns ((262, 43), 19)

so the width and height of the text in pixels are 262 and 43, but what is the 19?

Here it says it "corresponds to the y coordinate of the baseline relative to the bottom of the text" but this still doesn’t make it clear to me, as I’m not sure what the "baseline" is here?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

The baseline here is the yellow line in the figure on page 124. It is the line on which the letters sit. That is according to

Pay attention to how the three little points (red,cyan, and green) are drawn and also to how the yellow baseline is shown.

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading