python opencv读取中文路径的完美替代
import cv2
import numpy
as np
def cv2imread(img_path
):
return cv2
.imdecode
(np
.fromfile
(img_path
, dtype
=np
.uint8
), -1)
def cv2imwrite(filename
):
cv2
.imencode
('.jpg', img
)[1].tofile
(filename
)
转载请注明原文地址: https://lol.8miu.com/read-33870.html