【发布时间】:2015-12-23 07:52:39
【问题描述】:
我有这段代码可以用 python 在 opencv 中查找轮廓
im = cv2.imread('test.jpg')
imgray = cv2.cvtColor(im,cv2.COLOR_BGR2GRAY)
ret,thresh = cv2.threshold(imgray,127,255,0)
image, contours, hierarchy = cv2.findContours(thresh,cv2.RETR_TREE,cv2.CHAIN_APPROX_SIMPLE)
当我尝试运行它时,我收到一条错误消息
"ValueError: 需要两个以上的值才能解压"
感谢任何帮助。
【问题讨论】: