title: Error in loading cascade classifier in Opencv using cascade.load()!
body: <p>I am using the facedetect.cpp code given in opencv samples.
  But the after building and running an error comes up because <code>cascade.load(cascadeName)</code> given an error i.e. returns zero.
  It was working a few days ago. Suddenly this error started to come.
  I also the full path of the XML file,but it did not work!
  This command was used to run the executable of the code :</p>
  
  <pre><code>`objectDetect --cascade="Full path to haarcascade_frontalface_alt.xml" --scale=1.3 %1`
  </code></pre>
  
  <p>The path of the XML file is correct!! <a href="http://i.stack.imgur.com/XYuPo.jpg" rel="nofollow">Kindly check this snap shot</a></p>
  
  <pre><code>#include &lt;opencv2\objdetect\objdetect.hpp&gt;
  #include &lt;opencv2\highgui\highgui.hpp&gt;
  #include &lt;opencv2\imgproc\imgproc.hpp&gt;
  #include &lt;cv.h&gt;
  #include &lt;highgui.h&gt;
  #include &lt;iostream&gt;
  
  using namespace std;
  using namespace cv;
  
  int main(int argc, char* argv[]) {
  string xmlArray[] = {
  "D:/Visual Studio 2010/Projects/loadClassifierTest/haarcascades/haarcascade_eye.xml",
  "D:/Visual Studio 2010/Projects/loadClassifierTest/haarcascades/haarcascade_eye_tree_eyeglasses.xml",
  "D:/Visual Studio 2010/Projects/loadClassifierTest/haarcascades/haarcascade_frontalface_alt.xml",
  "D:/Visual Studio 2010/Projects/loadClassifierTest/haarcascades/haarcascade_frontalface_alt2.xml",
  "D:/Visual Studio 2010/Projects/loadClassifierTest/haarcascades/haarcascade_frontalface_alt_tree.xml",
  "D:/Visual Studio 2010/Projects/loadClassifierTest/haarcascades/haarcascade_frontalface_default.xml",
  "D:/Visual Studio 2010/Projects/loadClassifierTest/haarcascades/haarcascade_fullbody.xml"
  };
  CascadeClassifier cascade;
  for (int i = 0; i &lt; 6; ++i) {
      if (!cascade.load(xmlArray[i]))
          cerr &lt;&lt; "Could not load " &lt;&lt; xmlArray[i] &lt;&lt; " !" &lt;&lt; endl;
      else
          cout &lt;&lt; xmlArray[i] &lt;&lt; " has been loaded!" &lt;&lt; endl;
  }
  return 0;
  }
  </code></pre>
  
  <p>All the xml files are in the same folder .... even after giving the full path .... they are not loading ... ! I don't think that there are any permission issues ...</p>
  
  <p>Please help!</p>