March 2019
Intermediate to advanced
532 pages
13h 2m
English
The signature for this function is as follows:
cv.arrowedLine(img, pt1, pt2, color, thickness=1, lineType=8, shift=0, tipLength=0.1)
This function allows you to create an arrow, which points from the first point defined by pt1 to the second point defined by pt2. The length of the arrow tip can be controlled by the tipLength parameter, which is defined in relation to the segment length (distance between pt1 and pt2):
cv2.arrowedLine(image, (50, 50), (200, 50), colors['red'], 3, 8, 0, 0.1)cv2.arrowedLine(image, (50, 120), (200, 120), colors['green'], 3, cv2.LINE_AA, 0, 0.3)cv2.arrowedLine(image, (50, 200), (200, 200), colors['blue'], 3, 8, 0, 0.3)
As you can see, three arrows are defined. See the next screenshot, where these ...