title: System.AccessViolationException using EmguCV
body: <p>I want to find outliers in sets of keypoints from matches of consecutive frames. I use EmguCV - a wrapper of <code>OpenCV</code> and <code>Visual Studio Express 2012</code> on Windows 7 64bits.</p>
  <p>I tried to use this function</p>
  <pre><code>Features2DToolbox.GetHomographyMatrixFromMatchedFeatures, 
  </code></pre>
  <p>and I get an exception which is shown below: Sometimes this happens after few seconds, Sometimes almost immediately.
  <br>Another wierd thing is that even if the function is in <code>try-catch block</code> I can't catch an exception</p>
  <p>Here is part of my code:</p>
  <pre><code>        m_foundedPreviousSkyKeyPoints = new VectorOfKeyPoint(m_foundedCurrentSkyKeyPoints.ToArray());
          m_matcherSky.Add(m_descriptorsSky);          
          m_detector.DetectAndCompute(m_currentFrame, m_maskForSky, m_foundedCurrentSkyKeyPoints, m_descriptorsSky, false);
          m_maskMatchesSky = new Mat(m_descriptorsSky.Rows, 1, DepthType.Cv8U,1);
          m_matcherSky.KnnMatch(m_descriptorsSky, m_matchesSky, neighboursNumber, null);
          try
          {   
                  Features2DToolbox.GetHomographyMatrixFromMatchedFeatures(
                  m_foundedPreviousSkyKeyPoints,
                  m_foundedCurrentSkyKeyPoints,
                  m_matchesSky,
                  m_maskMatchesSky,
                  10.0d);
          }
          catch (System.AccessViolationException e) //does not catch exception 
          {
              Console.WriteLine(e.Message);
          }
  </code></pre>
  <p>And the exception I get:</p>
  <blockquote>
  <p>An unhandled exception of type <code>'System.AccessViolationException'</code> occurred in <code>Emgu.CV.dll</code></p>
  <p>Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.</p>
  </blockquote>
  <p>I have no idea what is the reason, any help is appreciated</p>