Add Shapes

Learn to add shapes to images.

Imagine we want to put a certain shape, such as a rectangle, around a specific portion of an image to draw the viewer’s attention. It takes a very long time to add borders to all the images. Instead, we can use OpenCV to draw the required shapes on those images much more easily.

In this lesson, we’ll draw different shapes on the image below. We’ll draw a circle around one of the balls, a rectangle around a button, and a line on the diagonal.

Get hands-on with 1200+ tech skills courses.