如何在opencv3中运行CV_DIST_L2?

2024-04-19 23:43:16 发布

您现在位置:Python中文网/ 问答频道 /正文

代码:Detect Lines Opencv in object->;正在响应中

案例1:

for xxx in contours:
   [vx,vy,x,y] = cv2.fitLine(xxx,cv2.cv.CV_DIST_L2,0,0.01,0.01)

它抛出错误-

AttributeError: module 'cv2' has no attribute 'cv'

案例2:

^{pr2}$

它抛出错误-

AttributeError: module 'cv2' has no attribute 'CV_DIST_L2'

我的机器上安装了opencv 3。我无法调试此错误。请告诉我我做错了什么?在


Tags: no代码indist错误attributecv2cv