def roi(img,vertices):
# blank mask:
mask = np.zeros_like(img)
# filling pixels inside the polygon defined by "vertices" with the fill color
cv2.fillPoly(mask, vertices, 255)
# returning the image only where mask pixels are nonzero
masked = cv2.bitwise_and(img, mask)
return masked
screencp.py 文件源码
python
阅读 28
收藏 0
点赞 0
评论 0
评论列表
文章目录