当前位置:主页 > 软件编程 > Python代码 >

解决Python下imread,imwrite不支持中文的问题

时间:2021-05-08 09:07:09 | 栏目:Python代码 | 点击:

由以下函数代替该功能:

def cv_imread(file_path):
 cv_img=cv2.imdecode(np.fromfile(file_path,dtype=np.uint8),-1)
 return cv_img
def cv_imwrite(filename,src):
 cv2.imencode('.jpg',src)[1].tofile(filename)

您可能感兴趣的文章:

相关文章