代码:检测对象中的 Opencv 线-> Amid 响应
情况1:
for xxx in contours:
[vx,vy,x,y] = cv2.fitLine(xxx,cv2.cv.CV_DIST_L2,0,0.01,0.01)
Run Code Online (Sandbox Code Playgroud)
它抛出错误 -
AttributeError:模块“cv2”没有属性“cv”
案例2:
for xxx in contours:
[vx,vy,x,y] = cv2.fitLine(xxx,cv2.CV_DIST_L2,0,0.01,0.01)
Run Code Online (Sandbox Code Playgroud)
它抛出错误 -
属性错误:模块“cv2”没有属性“CV_DIST_L2”
我已经opencv 3安装在我的机器上。我无法调试此错误。请让我知道我犯了什么错误?