How to calculate text dimensions for anti-aliased linetype?

asked 2017-01-06 08:19:04 -0600

boaz001 gravatar image

updated 2017-01-10 07:39:05 -0600

I know how to obtain the dimensions of the text using cv::getTextSize(), but this only works correctly for non-antialiased linetypes (default=8 and 4).

When using CV_AA (linetype=16) the text is partially outside the size defined by cv::getTextSize().

Edit: Should I file an issue for this on GitHub? For now I've decided to not use a anti-aliased linetype.

edit retag flag offensive close merge delete