How can I draw a line with rectangular corners with OpenCV line, I don't want to use OpenCV's rectangle for some reason. I have posted my code below and output as well, In the output line is curved at the endpoint and start points, I require it as a rectangle.
I searched a lot for that, but it seems no one had that problem before.
import cv2
thickness = 24
img1 = cv2.imread("AMIR4.jpg")
cv2.line(img1, (190,55), (85,55), (255,0,0), (thickness))
cv2.imshow("image", img1)
cv2.waitKey(0)
Sample:
CodePudding user response: