title: OpenCV CascadeClassifier initialization
body: <p>I've installed opencv (2.3.1) and now I use it with Qt (SDK 1.1.3, Creator 2.3.0).
  (I've used this tutorial: <a href="http://www.barbato.us/2011/12/20/opencv-2-3-qtcreator-windows/" rel="nofollow">http://www.barbato.us/2011/12/20/opencv-2-3-qtcreator-windows/</a>) </p>
  
  <p>First thing i've tried was HelloWorld example (like the one in Getting Started on the official website), and there were no problems with it. I've also tried some other examples.</p>
  
  <p>Now I've got a problem with example of face recognition. The code itself can be found here: <a href="http://www.opencv.org.cn/opencvdoc/2.3.1/html/doc/tutorials/objdetect/cascade_classifier/cascade_classifier.html" rel="nofollow">http://www.opencv.org.cn/opencvdoc/2.3.1/html/doc/tutorials/objdetect/cascade_classifier/cascade_classifier.html</a>, but when I try to run it, the program exits with code 0 as if everything was fine, but nothing actually happens. After some hours of trying to solve it I've found that the problem itself is in the CascadeClassifier variable. So if I have any working sample, and then I try to initialize an object of CascadeClassifier class, the program just exits with code 0 on this line.</p>
  
  <pre><code>CascadeClassifier face_cascade;
  </code></pre>
  
  <p>It also doesn't depend on this variable being global or not. I've also tried to initialize pointer, but the same thing happens on object creation.</p>
  
  <hr>
  
  <p>Finally I've recompiled the whole library, and now everything is fine. 
  Thanks for the answers!</p>