轮廓检测中cv.findContours报错ValueError: not enough values to unpack (expected 3, got 2)
代码报错ValueError: not enough values to unpack (expected 3, got 2)原因是新版本只返回两个参数了
原代码
image, contours, hierarchy = cv.findContours(canny,cv.RETR_TREE,cv.CHAIN_APPROX_NONE)
去掉第一个参数。替换如下
contours, hierar
第三方账号登入
QQ 微博 微信