我收到此错误:
OpenCV 错误:未知函数中不支持的格式或格式组合(),文件 C:\slave\WinInstallerMegaPack\src\opencv\modules\imgproc\src\canny.cpp,第 67 行 Traceback(最后一次调用):edges= cv2 .Canny(frame,100,100) cv2.error : C:\slave\WinInstallerMegaPack\srx\opencv\modules\imgproc\src\canny.cpp:67: 错误: (-210)
当我运行此代码时:
import cv2
import numpy as np
cap = cv2.VideoCapture(0)
while(1):
_, frame = cap.read()
cv2.imshow('Original',frame)
edges = cv2.Canny(frame,100,100)
cv2.imshow('Edges',edges)
k = cv2.waitKey(5) & 0xFF
if k == 27:
break
cv2.destroyAllWindows()
cap.release()