匹配全黑图像时出现错误Emgu.CV.Util.CvException:'OpenCV:func!= 0'

时间:2019-06-24 06:15:06

标签: c# opencv emgucv

使用openCV匹配黑色平面图像时出现错误Emgu.CV.Util.CvException: 'OpenCV: func != 0'

public static void FindMatches(Matrix<float> dbDescriptors, Matrix<float> queryDescriptors, ref IList<IndecesMapping> imap,string path1,string path2)
{
   var indices = new Matrix<int>(queryDescriptors.Rows, 2); // matrix that will contain indices of the 2-nearest neighbors found
   var dists = new Matrix<float>(queryDescriptors.Rows, 2); // matrix that will contain distances to the 2-nearest neighbors found

  // create FLANN index with 4 kd-trees and perform KNN search over it look for 2 nearest neighbours

  var flannIndex = new Index(dbDescriptors, new KdTreeIndexParams(4));
  flannIndex.KnnSearch(queryDescriptors, indices, dists, 2, 100);
}

0 个答案:

没有答案