关于assert im_orig.shape[2] == 3, "3ch image is expected"
环境:python3.4,opencv3
大家如果用selective_search函数搜索目标的话,有时候会出现该错误“assert im_orig.shape[2] == 3, "3ch image is expected”,不考虑你导入的图片不存在后,主要原因是你二次灰度化了,测试代码如下:
image_path = "tmp.png"
# 用cv2读取图片,如果tmp
原创
2018-02-01 16:40:09 ·
1557 阅读 ·
0 评论