title: EMGU CV Face Recognition from Image
body: <p>I've been working with OpenCV before for C++ work and It was working great. Now, I'm developing a C# project and using EMGU CV for gender recognition. I've got problem with predict function. Every time I ran it, program crashed on Predict function, when I erased predict line, it is running. Here's my code:</p>
  
  <pre><code>private void Window_Loaded(object sender, RoutedEventArgs e)
  {
       FaceRecognizer face = new FisherFaceRecognizer(0, 3500);
       face.Load("colorFisherFaceModel.yml");                
       Image&lt;Bgr, Byte&gt; img1 = new Image&lt;Bgr, Byte&gt;("C:\\Users\\sguthesis\\Pictures\\me.jpg");
       cascade = new CascadeClassifier("C:\\Users\\sguthesis\\documents\\visual studio 2013\\Projects\\EmguCV FFR with Image\\EmguCV FFR with Image\\haarcascade_frontalface_alt_tree.xml");
       FaceRecognizer.PredictionResult predictedLabel = face.Predict(img1);
  }
  </code></pre>
  
  <p>Also, I want to get an output, 1 or 2. 1 for male and 2 for female. I have trained many data that saved on colorFisherFaceModel.yml. It was run well on OpenCV. But I don't know how to use it in EMGU CV.</p>