Python opencv selectROI 函数怎么使用

cap = cv2.VideoCapture(FilePath)
ret, frame = cap.read()
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)

cv2.namedWindow('img')
coords1 = cv2.selectROI("Image", gray)
cv2.destroyAllWindows()

pd1 = pd.DataFrame(data=coords1)
pd1.to_csv(outputFileName)
posted @ 2021-05-10 11:36  bH1pJ  阅读(389)  评论(0编辑  收藏  举报