title: Unable to use command line parser in opencv
body: <p>I have the following code: </p>
  
  <pre><code>int main(int argc, char** argv)
  {
      cv::CommandLineParser parser(argc, argv,
              "{eyes||}{nose||}{mouth||}{help h||}");
      if (parser.has("help"))
      {
          help();
          return 0;
      }
      input_image_path = parser.get&lt;string&gt;(0);
      face_cascade_path = parser.get&lt;string&gt;(1);
      eye_cascade_path = parser.has("eyes") ? parser.get&lt;string&gt;("eyes") : "";
      nose_cascade_path = parser.has("nose") ? parser.get&lt;string&gt;("nose") : "";
      mouth_cascade_path = parser.has("mouth") ? parser.get&lt;string&gt;("mouth") : "";
      if (input_image_path.empty() || face_cascade_path.empty())
      {
          cout &lt;&lt; "IMAGE or FACE_CASCADE are not specified\n";
          return 1;
      }
      // Load image and cascade classifier files
      Mat image;
      image = imread(input_image_path);
  </code></pre>
  
  <p>When I run the code as follows: <code>./code help</code></p>
  
  <p>Or as, </p>
  
  <pre><code>./code eyes: /home/Users/Matt/rob.jpg
  </code></pre>
  
  <p>It always gives me the error: <code>IMAGE or FACE_CASCADE are not specified</code>. Am I missing something here? I have been following this link <code>http://docs.opencv.org/trunk/d0/d2e/classcv_1_1CommandLineParser.html</code> and I am entering the command as has been specified there, but it still doesn't take the argument. </p>