opencv-python读取中文路径,cv2.imdecode()
问题: 使用cv2.imread读取含有中文路径的图片时,返回None。
原因: opencv不接受non-ascii的路径。
解决方法: 先用np.fromfile()读取为np.uint8格式,再使用cv2.imdecode()解码。
cv2.imdecode(buf, flags)
# buf - Input array or vector of bytes.
# flags - Th...
原创
2018-05-22 21:26:10 ·
11905 阅读 ·
0 评论