-3

如何更改 OpenCV 中 cvSave 的路径和权限?

我正在进行训练,在所有阶段完成后,我收到一个错误:

OpenCV Error: Unspecified error (Could not open the file storage. Check the path and permissions) in cvSave, file /opt/local/var/macports/build/_opt_mports_dports_graphics_opencv/opencv/work/opencv-2.4.9/modules/core/src/persistence.cpp, line 5036

libc++abi.dylib: terminating with uncaught exception of type cv::Exception: /opt/local/var/macports/build/_opt_mports_dports_graphics_opencv/opencv/work/opencv-2.4.9/modules/core/src/persistence.cpp:5036: error: (-2) Could not open the file storage. Check the path and permissions in function cvSave

问题似乎与函数 cvSave 中的路径和权限有关,但我不确定如何更改这些,或者它们有什么问题。任何解决此问题的帮助表示赞赏。

4

1 回答 1

0

我通过将所有中间文件移动到新目录来修复它,并将命令更改为使用该目录。似乎它与该目录中的写权限有关。

于 2014-07-31T15:14:21.990 回答