赞
踩
原先代码
cv2.imwrite(path_name, image)
但是path_name中含有中文,程序能够运行但是此路径文件夹仍为空
这时应将代码改成
cv2.imencode('.jpg',image)[1].tofile(path_name)
原先代码
img = cv2.imread(path_name)
若path_name中含中文则改成
img=cv2.imdecode(np.fromfile(path_name,dtype=np.uint8),-1)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。