I found several FreeType related functions, e.g. cv::freetype::FreeType2::putText()
, in the documentation. Is there a Python equivalent?
I remember that used to work from python just fine. the docs don’t mention python signatures but the bindings are there.
you create the object with that create...
function, then you use its methods.
be aware that the freetype module of OpenCV (contrib) has (at least) a bug. right-to-left text is rendered wrong. for OpenCV v5, the regular putText is planned to eventually be backed by “proper” font rendering, not just this built-in hershey vector stuff.
According to No attribute 'freetype' · Issue #117 · opencv/opencv-python · GitHub
“freetype is not supported in the pre-built wheels and you cannot enable it unless you build OpenCV from sources.”
good point.
I managed to build opencv myself (on windows), which required me to build freetype and harfbuzz too.