Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Draw a Line | Fundamentals of Image Manipulation with Python
Fundamentals of Image Manipulation with Python
course content

Kursusindhold

Fundamentals of Image Manipulation with Python

book
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.
Opgave

Swipe to start coding

  1. Use the correct function to draw a line on image1.

Løsning

Mark tasks as Completed
Switch to desktopSkift til skrivebord for at øve i den virkelige verdenFortsæt der, hvor du er, med en af nedenstående muligheder
Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 1. Kapitel 10
AVAILABLE TO ULTIMATE ONLY
Vi beklager, at noget gik galt. Hvad skete der?
some-alt