opencv - opencv_annotation(-204:未找到请求的对象)
问题描述
root@debian:bin#./opencv_annotation --images=/pos/ --annotations=/pos/annotations.txt
terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(3.4.8) /home/harry/haardev/opencv/modules/core/src/glob.cpp:267: error: (-204:Requested object was not found) could not open directory: /pos in function 'glob_rec'
中止
收到上述错误后,我 chmod 4777 导演 pos/ 及其图像。我仍然收到此错误。有任何想法吗?
我正在运行 Debian 10,Buster。
另外,这个功能有多重要?谢谢!
解决方案
opencv 需要绝对路径,验证pos
目录是否在根目录中或相应地修改给定路径。
在你的数据上调用应用程序
opencv_annotation -images /data/image_folder/ -annotations /data/annotations.txt
。请记住,该工具喜欢绝对路径,因为相对路径会搞砸处理。
更新版本也需要这种语法(你已经使用过):
opencv_annotation --images=/data/image_folder/ --annotations=/data/annotations.txt
请检查您使用的版本以确定正确的语法是什么。
推荐阅读
- sql - 如果用户未输入值,则忽略该参数
- java - 使用 Spring MVC 的注解映射休眠中的问题
- c# - 如何在 C# 中检索 JWT 令牌?
- c# - PKCE 代码流中重定向页面的必要性(IdentityServer4)
- android - ViewModel 中的延迟初始化方法
- java - 延迟 Kafka Streams 消费
- javascript - 具有不同配置的相同护照 js 策略 (SAML)
- crystal-reports - Crystal Report 未在客户端计算机中打开
- php - 在 Data-Dog/AuditBundle 之前执行安全类(TokenAuthenticator)
- ios - UIViewController 的默认初始化在哪里?