Created
October 21, 2019 08:44
-
-
Save yptheangel/8a02f429f3a5aa127bfdcafc3d5d155f to your computer and use it in GitHub Desktop.
draw_text_with_background_opencv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int baseline[]={0}; | |
Size textSize=getTextSize("Hello World", FONT_HERSHEY_DUPLEX, 1,1,baseline); | |
int textwidth=textSize.get(0); | |
int textheight=textSize.get(1); | |
rectangle(yourMat, new Point(x1 + 2, y2 - 2), new Point(x1 + 2+textwidth, y2 - 2-textheight),RGB(255,255,0), FILLED,0,0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment