opencv绘制多边形

import cv2
import numpy as np
img=cv2.imread('test.jpg')
pts = np.array([[10,5],[20,30],[70,20],[50,10]], np.int32)
pts = pts.reshape((-1,1,2))
cv2.polylines(img,[pts],True,(0,255,255))
发布了183 篇原创文章 · 获赞 79 · 访问量 34万+

猜你喜欢

转载自blog.csdn.net/dlhlSC/article/details/91413247