Ask Your Question
0

Python-tutorials mistakes

asked 2014-08-20 15:02:47 -0500

ej gravatar image

updated 2014-08-21 00:51:07 -0500

berak gravatar image

I've seen the camera python-opencv pose estimation tutorial the following use in cv2.line:

    img = cv2.line(img, corner, tuple(imgpts[1].ravel()), (0,255,0), 5)

which didn't work, because cv2.line returns None. It worked fine when I just removed the assigning.

In addition, I think similar problem in the same tutorial:

corners2 = cv2.cornerSubPix(gray,corners,(11,11),(-1,-1),criteria)

which gives None according to the API. I guess it just suppose to update corners.

I'm really new to OpenCV, so I am not sure but I think those are mistakes (or old version) which need to be fixed, especially in a beginner tutorials.

Can I fix them without working with push/pull through git?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-08-21 00:52:43 -0500

berak gravatar image

no, those are not mistakes or bugs. it's a version mismatch.

above code is for opencv3.0, you're probably running 2.4.9

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Stats

Asked: 2014-08-20 15:02:47 -0500

Seen: 98 times

Last updated: Aug 21 '14