读取图片:
img = cv2.imdecode(np.fromfile(inputpath,dtype=np.uint8), -1)
保存图片:
cv2.imencode('.jpg',rotated_img)[1].tofile(outpath) #'.jpg'按自己需要填写图片格式
读取图片:
img = cv2.imdecode(np.fromfile(inputpath,dtype=np.uint8), -1)
保存图片:
cv2.imencode('.jpg',rotated_img)[1].tofile(outpath) #'.jpg'按自己需要填写图片格式