如下所示:
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\'))
以上这篇解决python3中cv2读取中文路径的问题就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。
继续阅读与本文标签相同的文章
上一篇 :
易语言设置窗口慢慢出现的代码
-
面试的时候突然遇到答不上的问题怎么办?
2026-05-19栏目: 教程
-
CPU缓存和内存屏障
2026-05-19栏目: 教程
-
还不懂MySQL索引?这1次彻底搞懂B+树和B-树
2026-05-19栏目: 教程
-
DispatcherServlet
2026-05-19栏目: 教程
-
Java描述设计模式(04):抽象工厂模式
2026-05-19栏目: 教程
