1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-28 23:03:03 +04:00

using argv[0] represent binary executable files' name in help() function

in sample codes instead of cpp files' name.
This commit is contained in:
MoonChasing
2020-02-23 21:38:04 +08:00
parent 8b5efc6f4c
commit 98db891851
30 changed files with 218 additions and 207 deletions
+7 -7
View File
@@ -34,13 +34,13 @@ using namespace std;
using namespace cv;
static void help()
static void help(char** argv)
{
cout << "\nThis program demonstrates how to use MSER to detect extremal regions\n"
"Usage:\n"
" ./detect_mser <image1(without parameter a synthetic image is used as default)>\n"
"Press esc key when image window is active to change descriptor parameter\n"
"Press 2, 8, 4, 6, +, -, or 5 keys in openGL windows to change view or use mouse\n";
"Usage:\n"
<< argv[0] << " <image1(without parameter a synthetic image is used as default)>\n"
"Press esc key when image window is active to change descriptor parameter\n"
"Press 2, 8, 4, 6, +, -, or 5 keys in openGL windows to change view or use mouse\n";
}
struct MSERParams
@@ -405,7 +405,7 @@ int main(int argc, char *argv[])
cv::CommandLineParser parser(argc, argv, "{ help h | | }{ @input | | }");
if (parser.has("help"))
{
help();
help(argv);
return 0;
}
@@ -431,7 +431,7 @@ int main(int argc, char *argv[])
for (int i = 0; i<=numeric_limits<uint16_t>::max(); i++)
palette.push_back(Vec3b((uchar)rand(), (uchar)rand(), (uchar)rand()));
help();
help(argv);
MSERParams params;