import numpy as npfrom cv2 import *# 读取中文路径也不会报错def myImread(path): img = imdecode(np.fromfile(path, dtype=np.uint8), -1) ## 经验证,不需要再转bgr,myImread的读图结果已经是和imread一样的 return img