python中用的 是utf-8编码,而opencv用的是gbk,要用numpy先读一下,另外写文件也是一个道理。

def cv_imread(file_path = ""):
    img_mat=cv2.imdecode(np.fromfile(file_path,dtype=np.uint8),-1)
    return img_mat

相关文章:

  • 2022-02-09
  • 2022-12-23
  • 2021-12-29
  • 2022-02-09
  • 2022-02-09
  • 2022-12-23
  • 2021-07-25
猜你喜欢
  • 2022-02-09
  • 2022-02-09
  • 2022-02-09
  • 2022-02-09
  • 2022-12-23
  • 2021-05-17
  • 2021-08-10
相关资源
相似解决方案