Welcome to Raspberry Pi 4B repository
6.Drawing text picture
Drawing text picture
Function: cv2.putText(img, str, origin, font, size,color,thickness)
The parameters are: picture, need add text, upper left corner coordinates (integer), font, size of font, color, thickness of font.
Code:
import cv2 |
import matplotlib.pyplot as plt |
After running the following program, a picture will be displayed in the jupyterLab control interface, as shown below.