最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python - Why Opencv imread struggles with path names including special characters while VideoCapture had no problem - Stack Over

programmeradmin6浏览0评论

While using opencv encountered problems with path names having non-english characters which was expected but VideoCapture had no problem with such paths.

This is my file structure

main
 |
 |--test.py
 |--ımg
 |   |
 |   |-img.png
 |   |-vid.mp4

So in my folder name ımg there is and ı instead of i, while this creates and error in cv2.imread there is no problem with cv2.VideoCapture. How one method from same library can handle while other can't? Is it due to video-image diffrence or it is due to method?

The code is

import cv2
cap = cv2.VideoCapture("ımg\\vid.mp4")
frame=cv2.imread("ımg\\img.png")

You can see succesful line and error line in here

It is python3.13 and i am on windows11 on testting this.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论