You can draw different functions in OpenCV Python by following the given code. I highly recommend you get the “Computer Vision: Models, Learning, and Inference Book” to learn Computer Vision.

How to Draw a Line in OpenCV
You can draw a line in OpenCV with This code.
How to Draw a Triangle in OpenCV
You can draw a triangle in OpenCV with This Code.
How to Draw a Rectangle in OpenCV
You can draw a rectangle in OpenCV with This Code.
How to Draw a Circle in OpenCV
You can draw a circle in OpenCV with This Code.
How to Draw an Ellipse in OpenCV
You can draw an ellipse in OpenCV with This Code.
How to Draw a Polygon in OpenCV
You can draw a polygon in OpenCV with This Code.
How to Draw a Point in OpenCV
You can draw a point in OpenCV with This Code.
How to Draw a Filled Rectangle in OpenCV
You can draw a filled rectangle in OpenCV with This Code.
How to Draw a Filled Circle in OpenCV
You can draw a filled circle in OpenCV with This Code.