PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, July 29, 2022

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

 July 29, 2022     image, opencv, python     No comments   

Issue

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?


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



Answered By - Benjamin W.
Answer Checked By - Timothy Miller (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing