Abhijith bhat n
Abhijith bhat n

Reputation: 71

How can i run CV_DIST_L2 in opencv 3?

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

Answers (1)

just try DIST_L2 without CV it should work

Upvotes: 4

Related Questions