读取图像,解决imread不能读取中文路径的问题 image_new = cv2.imdecode(np.fromfile(pic_path, dtype=np.uint8,), -1) 由于python3字符串采用utf-8编码,cv2.imread将utf-8当作本地码(如GBK)。