Merge pull request #9518 from alalek:fix_flann_unsupported_type

pull/9505/head
Alexander Alekhin 7 years ago
commit 02d98d3242
  1. 4
      modules/flann/include/opencv2/flann/lsh_table.h

@ -354,8 +354,8 @@ inline LshTable<unsigned char>::LshTable(unsigned int feature_size, unsigned int
mask_ = std::vector<size_t>((feature_size * sizeof(char) + sizeof(size_t) - 1) / sizeof(size_t), 0); mask_ = std::vector<size_t>((feature_size * sizeof(char) + sizeof(size_t) - 1) / sizeof(size_t), 0);
// A bit brutal but fast to code // A bit brutal but fast to code
std::vector<size_t> indices(feature_size * CHAR_BIT); std::vector<int> indices(feature_size * CHAR_BIT);
for (size_t i = 0; i < feature_size * CHAR_BIT; ++i) indices[i] = i; for (size_t i = 0; i < feature_size * CHAR_BIT; ++i) indices[i] = (int)i;
#ifndef OPENCV_FLANN_USE_STD_RAND #ifndef OPENCV_FLANN_USE_STD_RAND
cv::randShuffle(indices); cv::randShuffle(indices);
#else #else

Loading…
Cancel
Save