help();
CommandLineParser parser(argc, argv, keys);
- string im1_name = parser.get<string>(1);
- string im2_name = parser.get<string>(2);
+ string im1_name = parser.get<string>(0);
+ string im2_name = parser.get<string>(1);
Mat im1 = imread(im1_name, CV_LOAD_IMAGE_GRAYSCALE);
Mat im2 = imread(im2_name, CV_LOAD_IMAGE_GRAYSCALE);
float hranges[] = {0,180};
const float* phranges = hranges;
CommandLineParser parser(argc, argv, keys);
- int camNum = parser.get<int>(1);
+ int camNum = parser.get<int>(0);
cap.open(camNum);
help();
CommandLineParser parser(argc, argv, keys);
- string image = parser.get<string>(1);
- string templ = parser.get<string>(2);
+ string image = parser.get<string>(0);
+ string templ = parser.get<string>(1);
Mat img = imread(image.c_str(), 0);
Mat tpl = imread(templ.c_str(), 0);
{
help();
CommandLineParser parser(argc, argv, keys);
- string inputImage = parser.get<string>("@image");
+ string inputImage = parser.get<string>(0);
img = imread(inputImage.c_str(), 0);
if(img.empty())
help();
CommandLineParser parser(argc, argv, keys);
- string inputImage = parser.get<string>(1);
+ string inputImage = parser.get<string>(0);
// Load the source image. HighGUI use.
image = imread( inputImage, 0 );
{
help();
CommandLineParser parser(argc, argv, keys);
- string filename = parser.get<string>(1);
+ string filename = parser.get<string>(0);
Mat img = imread(filename.c_str(), CV_LOAD_IMAGE_GRAYSCALE);
if( img.empty() )
{
help();
CommandLineParser parser(argc, argv, keys);
- string filename = parser.get<string>(1);
+ string filename = parser.get<string>(0);
gray = imread(filename.c_str(), 0);
if(gray.empty())
{
help();
CommandLineParser parser(argc, argv, keys);
- string filename = parser.get<string>(1);
+ string filename = parser.get<string>(0);
image = imread(filename, 1);
if(image.empty())
// check if source video is specified
- string inputPath = arg("1");
+ string inputPath = arg(0);
if (inputPath.empty())
throw runtime_error("specify video file path");