From 7067c1597df2fe1e66fd9c8389d49179906810e0 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Wed, 30 Aug 2017 13:11:10 +0300 Subject: [PATCH] flann: std::vector can't be converted into cv::Mat properly size_t is not supported cv::Mat type --- modules/flann/include/opencv2/flann/lsh_table.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/flann/include/opencv2/flann/lsh_table.h b/modules/flann/include/opencv2/flann/lsh_table.h index fa7cc71..1db9960 100644 --- a/modules/flann/include/opencv2/flann/lsh_table.h +++ b/modules/flann/include/opencv2/flann/lsh_table.h @@ -354,8 +354,8 @@ inline LshTable::LshTable(unsigned int feature_size, unsigned int mask_ = std::vector((feature_size * sizeof(char) + sizeof(size_t) - 1) / sizeof(size_t), 0); // A bit brutal but fast to code - std::vector indices(feature_size * CHAR_BIT); - for (size_t i = 0; i < feature_size * CHAR_BIT; ++i) indices[i] = i; + std::vector indices(feature_size * CHAR_BIT); + for (size_t i = 0; i < feature_size * CHAR_BIT; ++i) indices[i] = (int)i; #ifndef OPENCV_FLANN_USE_STD_RAND cv::randShuffle(indices); #else -- 2.7.4