cv2.findcontours没法找到轮廓

图片反白得到轮廓但是用cv2.findcontours没办法得到反白的轮廓

img

在findcontours之前使用cv2.threshold二值化一下输入,将你的条形码变成白色的,findcontours找的是白色轮廓

现在有没有什么报错呀