• 00
  • :
  • 00
  • :
  • 00

解决python3中cv2读取中文路径的问题

python3:
 
img_path =  ' '
 
im = cv2.imdecode(np.fromfile(img_path,dtype = np.uint8),-1)
 
save_path =  ' '
 
cv2.imencode('.jpg',im)[1].tofile(save_path)
 
 
python2.7:
 
img_path = ' '
 
im = cv2.imread(img_path.decode(‘utf-8'))

 

posted @ 2021-01-07 20:44  Garson_Zhang  阅读(315)  评论(0编辑  收藏  举报