mirror of
https://github.com/opencv/opencv.git
synced 2026-07-25 13:23:02 +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:
@@ -8,14 +8,14 @@
|
||||
using namespace cv;
|
||||
using namespace std;
|
||||
|
||||
static void help()
|
||||
static void help(char** argv)
|
||||
{
|
||||
cout <<
|
||||
"\nThis program demonstrates dense optical flow algorithm by Gunnar Farneback\n"
|
||||
"Mainly the function: calcOpticalFlowFarneback()\n"
|
||||
"Call:\n"
|
||||
"./fback\n"
|
||||
"This reads from video camera 0\n" << endl;
|
||||
<< argv[0]
|
||||
<< "This reads from video camera 0\n" << endl;
|
||||
}
|
||||
static void drawOptFlowMap(const Mat& flow, Mat& cflowmap, int step,
|
||||
double, const Scalar& color)
|
||||
@@ -35,11 +35,11 @@ int main(int argc, char** argv)
|
||||
cv::CommandLineParser parser(argc, argv, "{help h||}");
|
||||
if (parser.has("help"))
|
||||
{
|
||||
help();
|
||||
help(argv);
|
||||
return 0;
|
||||
}
|
||||
VideoCapture cap(0);
|
||||
help();
|
||||
help(argv);
|
||||
if( !cap.isOpened() )
|
||||
return -1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user