Получение ошибки Emgu.CV.Util.CvException: 'OpenCV: func! = 0' при сопоставлении полностью черного изображения - PullRequest
0 голосов
/ 24 июня 2019

Получение ошибки Emgu.CV.Util.CvException: 'OpenCV: func != 0' при сопоставлении изображения плоскости черного цвета с использованием openCV.

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);
}
...