It's impossible to ignore drawing text and shapes on an image when the subject is OpenCV and computer vision in general. For countless reasons, you will need to draw (output) some text or shapes on the output images. For example, you may want to write a program that prints the date of the image (or images) on it. Or you may want to draw a square around faces in the image after performing a face detection. Even though Qt framework also provides quite powerful functions to deal with such tasks, it is also possible to use OpenCV itself to draw on images. In this section, you will learn about using OpenCV drawing functions one by one, which are surprisingly very easy to use, along with example codes and output results.
Drawing functions in OpenCV accept an input and output image, quite understandably, along with a few parameters which are common to most of them...