OpenCV can also be used to render text in images. In this section, we will see how to draw text by using the cv2.putText() function. Additionally, we will see all the available fonts you can use. Lastly, we will see some OpenCV functions in connection with text drawing.
Writing text
Drawing text
The cv2.putText() function has the following signature:
img = cv.putText( img, text, org, fontFace, fontScale, color, thickness=1, lineType= 8, bottomLeftOrigin=False)
This function draws the provided text string starting at the org coordinate (upper-left corner if bottomLeftOrigin = False and lower-left corner otherwise) using the font type provided by fontFace and the fontScale factor. In connection with this example, you can see...