Course Content
Fundamentals of Image Manipulation with Python
Draw a Line
In OpenCV
, the cv2.line()
function is used to draw a line on an image. The function takes five required parameters:
- the image to be modified;
- the starting point of the line (specified as a tuple of x and y coordinates);
- the ending point of the line (specified as a tuple of x and y coordinates);
- the color of the line (specified as a tuple of Red, Green, Blue values);
- the thickness of the line.
Task
- Use the correct function to draw a line on
image1
.
Mark tasks as Completed
Switch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?
Thanks for your feedback!
In OpenCV
, the cv2.line()
function is used to draw a line on an image. The function takes five required parameters:
- the image to be modified;
- the starting point of the line (specified as a tuple of x and y coordinates);
- the ending point of the line (specified as a tuple of x and y coordinates);
- the color of the line (specified as a tuple of Red, Green, Blue values);
- the thickness of the line.
Task
- Use the correct function to draw a line on
image1
.
Mark tasks as Completed
Switch to desktop for real-world practiceContinue from where you are using one of the options below
Section 1. Chapter 10
AVAILABLE TO ULTIMATE ONLY