Ask Your Question
0

Python-tutorials mistakes

asked Aug 20 '14

ej gravatar image

updated Aug 21 '14

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?

Preview: (hide)

1 answer

Sort by » oldest newest most voted
1

answered Aug 21 '14

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

Preview: (hide)

Question Tools

Stats

Asked: Aug 20 '14

Seen: 290 times

Last updated: Aug 21 '14