Functions | |
void | cv::samples::addSamplesDataSearchPath (const cv::String &path) |
Override search data path by adding new search location. More... | |
void | cv::samples::addSamplesDataSearchSubDirectory (const cv::String &subdir) |
Append samples search data sub directory. More... | |
cv::String | cv::samples::findFile (const cv::String &relative_path, bool required=true, bool silentMode=false) |
Try to find requested data file. More... | |
cv::String | cv::samples::findFileOrKeep (const cv::String &relative_path, bool silentMode=false) |
void cv::samples::addSamplesDataSearchPath | ( | const cv::String & | path | ) |
#include <opencv2/core/utility.hpp>
Override search data path by adding new search location.
Use this only to override default behavior Passed paths are used in LIFO order.
path | Path to used samples data |
Referenced by cv::samples::findFileOrKeep().
void cv::samples::addSamplesDataSearchSubDirectory | ( | const cv::String & | subdir | ) |
#include <opencv2/core/utility.hpp>
Append samples search data sub directory.
General usage is to add OpenCV modules name (<opencv_contrib>/modules/<name>/samples/data
-> <name>/samples/data
+ modules/<name>/samples/data
). Passed subdirectories are used in LIFO order.
subdir | samples data sub directory |
Referenced by cv::samples::findFileOrKeep().
cv::String cv::samples::findFile | ( | const cv::String & | relative_path, |
bool | required = true , |
||
bool | silentMode = false |
||
) |
#include <opencv2/core/utility.hpp>
Try to find requested data file.
Search directories:
addSamplesDataSearchPath()
<source>/{,data,samples/data}
directories if build directory is detected or the current directory is in source tree.<install>/share/OpenCV
directory if install directory is detected.relative_path | Relative path to data file |
required | Specify "file not found" handling. If true, function prints information message and raises cv::Exception. If false, function returns empty result |
silentMode | Disables messages |
Referenced by cv::samples::findFileOrKeep().
|
inline |
#include <opencv2/core/utility.hpp>
References cv::samples::addSamplesDataSearchPath(), cv::samples::addSamplesDataSearchSubDirectory(), CV_EXPORTS_W, and cv::samples::findFile().