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
Swipe to start coding
- Use the correct function to draw a line on
image1
.
Solution
Mark tasks as Completed
Everything was clear?
Thanks for your feedback!
SectionΒ 1. ChapterΒ 10
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Suggested prompts:
Ask me questions about this topic
Summarize this chapter
Show real-world examples
Awesome!
Completion rate improved to 9.09
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
Swipe to start coding
- Use the correct function to draw a line on
image1
.
Solution
Mark tasks as Completed
Everything was clear?
Thanks for your feedback!
SectionΒ 1. ChapterΒ 10