Reputation: 71
Code:Detect Lines Opencv in object -> Amid response
Case1:
for xxx in contours:
[vx,vy,x,y] = cv2.fitLine(xxx,cv2.cv.CV_DIST_L2,0,0.01,0.01)
It throws error -
AttributeError: module 'cv2' has no attribute 'cv'
Case2:
for xxx in contours:
[vx,vy,x,y] = cv2.fitLine(xxx,cv2.CV_DIST_L2,0,0.01,0.01)
It throws error -
AttributeError: module 'cv2' has no attribute 'CV_DIST_L2'
I have opencv 3
installed in my machine. I am not able to debug this error. Please let me know what mistake am I doing?
Upvotes: 5
Views: 4501