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
+4 -4
View File
@@ -11,7 +11,7 @@
using namespace std;
using namespace cv;
static void help()
static void help(char** argv)
{
cout
<< "\n------------------------------------------------------------------\n"
@@ -19,8 +19,8 @@ static void help()
<< "That is, cv::Mat M(...); cout << M; Now works.\n"
<< "Output can be formatted to OpenCV, matlab, python, numpy, csv and \n"
<< "C styles Usage:\n"
<< "./cvout_sample\n"
<< "------------------------------------------------------------------\n\n"
<< argv[0]
<< "\n------------------------------------------------------------------\n\n"
<< endl;
}
@@ -30,7 +30,7 @@ int main(int argc, char** argv)
cv::CommandLineParser parser(argc, argv, "{help h||}");
if (parser.has("help"))
{
help();
help(argv);
return 0;
}
Mat I = Mat::eye(4, 4, CV_64F);