luoyc a9c35a4807 opencv source code commit | 1 year ago | |
---|---|---|
.. | ||
include | 1 year ago | |
src | 1 year ago | |
CMakeLists.txt | 1 year ago | |
README.md | 1 year ago |
This FreeType2 wrapper module allows to draw strings with outlines and bitmaps.
harfbuzz is requested to convert UTF8 to gid(GlyphID).
freetype library is requested to rasterize given gid.
cv::Ptr<cv::freetype::FreeType2> ft2;
ft2 = cv::freetype::createFreeType2();
ft2->loadFontData(ttf_pathname, 0);
ft2->putText(mat, "hello world", cv::Point(20, 200),
30, CV_RGB(0, 0, 0), cv::FILLED, cv::LINE_AA, true);