python3下读取、存储带有中文路径图片的方法

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_34510308/article/details/85297800

直接调用就行

#读取中文路径
def cv_imread(file_paht):
    cv_img=cv2.imdecode(np.fromfile(file_paht,dtype=np.uint8),-1)
    return cv_img
#保存中文路径
def cv_imwrite(savePath,tem):
    cv2.imencode('.jpg',tem)[1].tofile(savePath)  # 保存图片

猜你喜欢

转载自blog.csdn.net/qq_34510308/article/details/85297800