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
+3 -3
View File
@@ -5,11 +5,11 @@
using namespace cv;
using namespace std;
static void help()
static void help(char** argv)
{
cout << "\nThis sample program demonstrates the use of the convexHull() function\n"
<< "Call:\n"
<< "./convexhull\n" << endl;
<< argv[0] << endl;
}
int main( int argc, char** argv )
@@ -17,7 +17,7 @@ int main( int argc, char** argv )
CommandLineParser parser(argc, argv, "{help h||}");
if (parser.has("help"))
{
help();
help(argv);
return 0;
}
Mat img(500, 500, CV_8UC3);