I want to draw two sided arrow between two points using opencv. I have got one function for single arrow plot which is follows
import cv2
img = cv2.imread('image.jpg', cv2.IMREAD_COLOR)
pt1 = (x1, y1)
pt2 = (x2, y2)
cv2.arrowedLine(img_, pt1, pt2, (0,0,255), 5)
cv2.imshow('Image with arrow', img)
cv2.waitKey(0)
But is there any method for plotting two sided arrows between two points? I have read the documentation but did not find any. Please guide. Thanks.
Well This may not be the best way, but with minimal effort I would use the same cv2.arrowedLine
method twice with the points order reversed as :
cv2.arrowedLine(img_, pt1, pt2, (0,0,255), 5)
cv2.arrowedLine(img_, pt2, pt1, (0,0,255), 5)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With