1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +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
+5 -5
View File
@@ -46,10 +46,10 @@ const char* liveCaptureHelp =
" 'g' - start capturing images\n"
" 'u' - switch undistortion on/off\n";
static void help()
static void help(char** argv)
{
printf( "This is a camera calibration sample.\n"
"Usage: calibration\n"
"Usage: %s\n"
" -w=<board_width> # the number of inner corners per one of board dimension\n"
" -h=<board_height> # the number of inner corners per another board dimension\n"
" [-pt=<pattern>] # the type of pattern: chessboard or circles' grid\n"
@@ -74,7 +74,7 @@ static void help()
" # the text file can be generated with imagelist_creator\n"
" # - name of video file with a video of the board\n"
" # if input_data not specified, a live view from the camera is used\n"
"\n" );
"\n", argv[0] );
printf("\n%s",usage);
printf( "\n%s", liveCaptureHelp );
}
@@ -343,7 +343,7 @@ int main( int argc, char** argv )
"{@input_data|0|}");
if (parser.has("help"))
{
help();
help(argv);
return 0;
}
boardSize.width = parser.get<int>( "w" );
@@ -383,7 +383,7 @@ int main( int argc, char** argv )
inputFilename = parser.get<string>("@input_data");
if (!parser.check())
{
help();
help(argv);
parser.printErrors();
return -1;
}