OpenCV解决中文不适配

def cv_imread(image_path):
    cv_img = cv2.imdecode(np.fromfile(image_path, dtype=np.uint8), -1)
    return cv_img


def cv_imwrite(write_path, img):
    cv2.imencode('.jpg', img, )[1].tofile(write_path)
    return

你可能感兴趣的:(OpenCV解决中文不适配)