美文网首页
OpenCV解决中文不适配

OpenCV解决中文不适配

作者: 湯木 | 来源:发表于2020-11-04 22:08 被阅读0次
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解决中文不适配

      本文链接:https://www.haomeiwen.com/subject/hfynvktx.html