-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test.py - additional output needed in cv2.findContours #1
Comments
Huh, what version of opencv are you running? |
cv2.version returns 3.1.0 |
if you're running opencv3+ you will need to modify the line:
to reflect the small syntax changes to cv2.findCountours that have been made since opencv2.x
also for some really strange reason, I needed to specify where my cv2.so was (all my other programs can find it with import cv2) so I also had to add this code:
note that the above is most likely something funky with my python / opencv - this is just a workaround for me because it imports fine in anything else, if you run into this issue with all the files you're running you need to fix your installations, it sounds like you didn't make/compile opencv correctly. the opencv website has a good installation tutorial also adrian from pyimagesearch has excellent resources on this (i personally don't like using virtualenv - I originally started learning with his virtualenv set-up and it made things a bit more difficult then they had to be, but working through the issues with getting his set-up working i ended up learning a lot more!) iandees - thanks for the code brother! |
Sir, where can I get your video sample? |
cv2.findContours returns 3 values , not just 2 , which leads to a 'too many values to unpack'
i added 'contourImage, ' as a dummy before 'contours, '
The text was updated successfully, but these errors were encountered: