diff --git a/modules/core/include/opencv2/core/utility.hpp b/modules/core/include/opencv2/core/utility.hpp index db8c42976f..e491352bcf 100644 --- a/modules/core/include/opencv2/core/utility.hpp +++ b/modules/core/include/opencv2/core/utility.hpp @@ -773,7 +773,7 @@ The sample below demonstrates how to use CommandLineParser: The keys parameter is a string containing several blocks, each one is enclosed in curly braces and describes one argument. Each argument contains three parts separated by the `|` symbol: --# argument names is a space-separated list of option synonyms (to mark argument as positional, prefix it with the `@` symbol) +-# argument names is a list of option synonyms separated by standard space characters ' ' (to mark argument as positional, prefix it with the `@` symbol) -# default value will be used if the argument was not provided (can be empty) -# help message (can be empty) @@ -796,6 +796,8 @@ For example: Note that there are no default values for `help` and `timestamp` so we can check their presence using the `has()` method. Arguments with default values are considered to be always present. Use the `get()` method in these cases to check their actual value instead. +Note that whitespace characters other than standard spaces are considered part of the string. +Additionally, leading and trailing standard spaces around the help messages are ignored. String keys like `get("@image1")` return the empty string `""` by default - even with an empty default value. Use the special `` default value to enforce that the returned string must not be empty. (like in `get("@image2")`)