首页 > 解决方案 > 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

解决方案


opencv 需要绝对路径,验证pos目录是否在根目录中或相应地修改给定路径。

在你的数据上调用应用程序opencv_annotation -images /data/image_folder/ -annotations /data/annotations.txt。请记住,该工具喜欢绝对路径,因为相对路径会搞砸处理。

更新版本也需要这种语法(你已经使用过):

opencv_annotation --images=/data/image_folder/ --annotations=/data/annotations.txt

请检查您使用的版本以确定正确的语法是什么。


推荐阅读