Ask Your Question
0

cv2.line python error

asked 2014-05-03 09:31:01 -0600

La Rosa gravatar image

I'm trying to draw line between 2 points but when i run the code i get this error:

SystemError: new style getargs format but argument is not a tuple

any help i'll be thankful

here is the part of code:

cv2.line(img, approx[0], approx[1],( 0, 0, 255),3)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-08-21 15:50:20 -0600

Try to convert the points to tuples:

cv2.line(img, tuple(approx[0]), tuple(approx[1]),( 0, 0, 255),3)

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-05-03 09:31:01 -0600

Seen: 2,979 times

Last updated: May 03 '14