import cv2
# with open('./1.jpg', 'rb') as f:
# img = f.read()
imgs = cv2.imread('./1.jpg')
# cv2.rectangle(img, (61,471), (199,53), (255,127,0), 2, 1 )
height=62
left=341
top=200
width=73
cv2.rectangle(imgs, (341, 200),
(341+73,200+62),
(255, 127, 0), 2, 1)
# 参数表示依次为: (图片,长方形框左上角坐标(X,Y), 长方形框右下角坐标(X+宽,Y+高), 字体颜色,字体粗细)
cv2.imshow('img', imgs)
cv2.waitKey(0)
cv2.destroyAllWindows()
python之opencv划线
最新推荐文章于 2024-04-07 08:56:03 发布