Can we load a custom TrueType font and use it with cv2.putText function ?
cv2.putText
font = cv2.FONT_HERSHEY_SIMPLEX cv2.putText(img,'OpenCV',(10,500), font, 4,(255,255,255),2,cv2.LINE_AA)
For new viewers, OpenCV supports custom fonts since OpenCV 3.0.0 via the FreeType2 class. See here some nice sample code: https://docs.opencv.org/4.1.1/d9/dfa/classcv_1_1freetype_1_1FreeType2.html
1.4m articles
1.4m replys
5 comments
57.0k users