willsonlincake 发表于 2022-4-15 12:46:34

Python OpenCV画线

import cv2

image = cv2.imread('testimage.jpg')
height, width, channels = image.shape
startpoint = (0, 0)
endpoint = (height, width)
thickness = 9
color = (255, 0, 0)
image = cv2.line(image, startpoint, endpoint, color, thickness)
cv2.imshow('Line', image)
页: [1]
查看完整版本: Python OpenCV画线