Updated by Oleg Sklyarov about 12 years ago

The following files from /samples/cpp contain
<pre>
parser.get<string>(1)
</pre>


file:///home/harald/git/opencv/samples/cpp/brief_match_test.cpp
file:///home/harald/git/opencv/samples/cpp/chamfer.cpp
file:///home/harald/git/opencv/samples/cpp/demhist.cpp
file:///home/harald/git/opencv/samples/cpp/dft.cpp
file:///home/harald/git/opencv/samples/cpp/distrans.cpp
file:///home/harald/git/opencv/samples/cpp/edge.cpp

Especially demhist.cpp contains:

<pre>


CommandLineParser parser(argc, argv, keys);
inputImage = parser.get<string>(1);
</pre>


With this index == 1 you cannot load any image.
So I changed it to
<pre>


inputImage = parser.get<string>(0);
</pre>


.... and all works fine !

As a next step I changed samples/cpp/chamfer.cpp
to the following form:
<pre>


CommandLineParser parser(argc, argv, keys);
string image = parser.get<string>(0);
string templ = parser.get<string>(1);
</pre>


.... and all works fine !

I used opencv-master.zip from https://github.com/Itseez/opencv.git

Back