python opencv line
python opencv line
import cv2 # Load the image img = cv2.imread('path/to/image.jpg') # Draw a red line from (0, 0) to (100, 100) with a thickness of 5 pixels cv2.line(img, (0, 0), (100, 100), (0, 0, 255), 5) # Display the image with the line cv2.imshow('Image with Line', img) cv2.waitKey(0) cv2.destroyAllWindows()
#####################
QQ 3087438119