opencv-python 读入带有中文的图片路径

windows 下读入带有中文的图片路径
使用cv2.imread() 不能读入。
使用如下代码可以。

def cv_imread(filePath):
cv_img = cv2.imdecode(np.fromfile(filePath, dtype=np.uint8), cv2.IMREAD_COLOR)
if cv2_img is not None:
cv_img=cv2.cvtColor(cv_img,cv2.COLOR_RGB2BGR)
return cv_img
原文地址:https://www.cnblogs.com/rabitvision/p/10795970.html