FlannIndex: Fixed size_t matrix allocation error on 64 bits system

This commit is contained in:
matlabbe
2017-10-09 10:51:18 -04:00
parent 49f9a1e8d7
commit 4de2ed767b
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -436,7 +436,7 @@ void FlannIndex::knnSearch(
UERROR("Flann index not yet created!");
return;
}
indices.create(query.rows, knn, CV_32S);
indices.create(query.rows, knn, sizeof(size_t)==8?CV_64F:CV_32S);
dists.create(query.rows, knn, featuresType_ == CV_8UC1?CV_32S:CV_32F);
rtflann::Matrix<size_t> indicesF((size_t*)indices.data, indices.rows, indices.cols);