小编Abh*_*t n的帖子

如何在 opencv 3 中运行 CV_DIST_L2?

代码:检测对象中的 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安装在我的机器上。我无法调试此错误。请让我知道我犯了什么错误?

python edge-detection opencv3.0

4
推荐指数
1
解决办法
4284
查看次数

标签 统计

edge-detection ×1

opencv3.0 ×1

python ×1