1ZLAB_Color_Block_Finder icon indicating copy to clipboard operation
1ZLAB_Color_Block_Finder copied to clipboard

can't run

Open ShiK1 opened this issue 5 years ago • 1 comments

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)

ShiK1 avatar Jan 22 '19 12:01 ShiK1

如果用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]

alimteach avatar Oct 20 '20 13:10 alimteach