using argv[0] represent binary executable files' name in help() function
in sample codes instead of cpp files' name.
This commit is contained in:
@@ -10,12 +10,13 @@ using namespace std;
|
||||
using namespace cv;
|
||||
|
||||
|
||||
static void help()
|
||||
static void help(char** argv)
|
||||
{
|
||||
cout << "\n This program demonstrates how to use BLOB to detect and filter region \n"
|
||||
"Usage: \n"
|
||||
" ./detect_blob <image1(detect_blob.png as default)>\n"
|
||||
"Press a key when image window is active to change descriptor";
|
||||
<< "Usage: \n"
|
||||
<< argv[0]
|
||||
<< " <image1(detect_blob.png as default)>\n"
|
||||
<< "Press a key when image window is active to change descriptor";
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +75,7 @@ int main(int argc, char *argv[])
|
||||
cv::CommandLineParser parser(argc, argv, "{@input |detect_blob.png| }{h help | | }");
|
||||
if (parser.has("h"))
|
||||
{
|
||||
help();
|
||||
help(argv);
|
||||
return 0;
|
||||
}
|
||||
fileName = parser.get<string>("@input");
|
||||
@@ -120,7 +121,7 @@ int main(int argc, char *argv[])
|
||||
uchar c3 = (uchar)rand();
|
||||
palette.push_back(Vec3b(c1, c2, c3));
|
||||
}
|
||||
help();
|
||||
help(argv);
|
||||
|
||||
|
||||
// These descriptors are going to be detecting and computing BLOBS with 6 different params
|
||||
|
||||
Reference in New Issue
Block a user