OpenCV contains a very easy-to-use function named putText to draw, or print, text on images. This function requires an image as the input/output parameter, which means the source image itself will be updated. So, be sure to make a copy of your original image in memory before calling this function. You also need to provide this function with an origin point, which is simply the point where the text will be printed. The font of the text must be one of the entries in the HersheyFonts enum, which can take one (or a combination) of the following values:
- FONT_HERSHEY_SCRIPT_COMPLEX ...