Skip to content
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

can't run #2

Open
ShiK1 opened this issue Jan 22, 2019 · 1 comment
Open

can't run #2

ShiK1 opened this issue Jan 22, 2019 · 1 comment

Comments

@ShiK1
Copy link

ShiK1 commented Jan 22, 2019

in color_block_finder
bimg, contours, hier = cv2.findContours(img_bin, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
ValueError: not enough values to unpack (expected 3, got 2)
@alimteach
Copy link

如果用opencv4.0版本以上的把 ’color_feature.py‘和’test_color_feature.py‘里面的 “bimg, contours, hier = cv2.findContours(img_bin, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)”改为: tmp = cv2.findContours(img_bin,cv2.RETR_CCOMP,cv2.CHAIN_APPROX_SIMPLE) contours = tmp[0] if len(tmp) == 2 else tmp[1]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants