View Source Evision.Samples (Evision v0.1.8)

Link to this section Summary

cv.samples

Override search data path by adding new search location

Append samples search data sub directory

Try to find requested data file

Try to find requested data file

Positional Arguments
Keyword Arguments
  • silentMode: bool.

Python prototype (for reference):

Positional Arguments
Keyword Arguments
  • silentMode: bool.

Python prototype (for reference):

Link to this section cv.samples

Link to this function

addSamplesDataSearchPath(path)

View Source

Override search data path by adding new search location

Positional Arguments
  • path: String.

    Path to used samples data

Use this only to override default behavior Passed paths are used in LIFO order.

Python prototype (for reference):

addSamplesDataSearchPath(path) -> None
Link to this function

addSamplesDataSearchSubDirectory(subdir)

View Source

Append samples search data sub directory

Positional Arguments
  • subdir: String.

    samples 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.

Python prototype (for reference):

addSamplesDataSearchSubDirectory(subdir) -> None

Try to find requested data file

Positional Arguments
  • relative_path: String.

    Relative path to data file

Keyword Arguments
  • required: bool.

    Specify "file not found" handling. If true, function prints information message and raises cv::Exception. If false, function returns empty result

  • silentMode: bool.

    Disables messages

Search directories:

  1. Directories passed via addSamplesDataSearchPath()
  2. OPENCV_SAMPLES_DATA_PATH_HINT environment variable
  3. OPENCV_SAMPLES_DATA_PATH environment variable If parameter value is not empty and nothing is found then stop searching.
  4. Detects build/install path based on: a. current working directory (CWD) b. and/or binary module location (opencv_core/opencv_world, doesn't work with static linkage)
  5. Scan <source>/{,data,samples/data} directories if build directory is detected or the current directory is in source tree.
  6. Scan <install>/share/OpenCV directory if install directory is detected. @see cv::utils::findDataFile @return Returns path (absolute or relative to the current directory) or empty string if file is not found

Python prototype (for reference):

findFile(relative_path[, required[, silentMode]]) -> retval
Link to this function

findFile(relative_path, opts)

View Source

Try to find requested data file

Positional Arguments
  • relative_path: String.

    Relative path to data file

Keyword Arguments
  • required: bool.

    Specify "file not found" handling. If true, function prints information message and raises cv::Exception. If false, function returns empty result

  • silentMode: bool.

    Disables messages

Search directories:

  1. Directories passed via addSamplesDataSearchPath()
  2. OPENCV_SAMPLES_DATA_PATH_HINT environment variable
  3. OPENCV_SAMPLES_DATA_PATH environment variable If parameter value is not empty and nothing is found then stop searching.
  4. Detects build/install path based on: a. current working directory (CWD) b. and/or binary module location (opencv_core/opencv_world, doesn't work with static linkage)
  5. Scan <source>/{,data,samples/data} directories if build directory is detected or the current directory is in source tree.
  6. Scan <install>/share/OpenCV directory if install directory is detected. @see cv::utils::findDataFile @return Returns path (absolute or relative to the current directory) or empty string if file is not found

Python prototype (for reference):

findFile(relative_path[, required[, silentMode]]) -> retval
Link to this function

findFileOrKeep(relative_path)

View Source
Positional Arguments
Keyword Arguments
  • silentMode: bool.

Python prototype (for reference):

findFileOrKeep(relative_path[, silentMode]) -> retval
Link to this function

findFileOrKeep(relative_path, opts)

View Source
Positional Arguments
Keyword Arguments
  • silentMode: bool.

Python prototype (for reference):

findFileOrKeep(relative_path[, silentMode]) -> retval

Link to this section Functions

Link to this function

addSamplesDataSearchPath!(path)

View Source

Raising version of addSamplesDataSearchPath/1.

Link to this function

addSamplesDataSearchSubDirectory!(subdir)

View Source

Raising version of addSamplesDataSearchSubDirectory/1.

Link to this function

findFile!(relative_path)

View Source

Raising version of findFile/1.

Link to this function

findFile!(relative_path, opts)

View Source

Raising version of findFile/2.

Link to this function

findFileOrKeep!(relative_path)

View Source

Raising version of findFileOrKeep/1.

Link to this function

findFileOrKeep!(relative_path, opts)

View Source

Raising version of findFileOrKeep/2.