From 33fab844730d108bb980bbe2aa0995947ea3c955 Mon Sep 17 00:00:00 2001
From: Pierre-Emmanuel Viel
Date: Tue, 30 Jun 2020 10:33:07 +0200
Subject: [PATCH] Type consistency for all xxxIndexParams integer arguments as
well as with miniflann's LshIndexParams
---
modules/flann/include/opencv2/flann.hpp | 6 +++---
modules/flann/include/opencv2/flann/lsh_index.h | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/modules/flann/include/opencv2/flann.hpp b/modules/flann/include/opencv2/flann.hpp
index 887759e643..2cfdf6d0d6 100644
--- a/modules/flann/include/opencv2/flann.hpp
+++ b/modules/flann/include/opencv2/flann.hpp
@@ -224,9 +224,9 @@ public:
struct LshIndexParams : public IndexParams
{
LshIndexParams(
- unsigned int table_number,
- unsigned int key_size,
- unsigned int multi_probe_level );
+ int table_number,
+ int key_size,
+ int multi_probe_level );
};
@endcode
- **AutotunedIndexParams** When passing an object of this type the index created is
diff --git a/modules/flann/include/opencv2/flann/lsh_index.h b/modules/flann/include/opencv2/flann/lsh_index.h
index 86c0654051..37c1841a18 100644
--- a/modules/flann/include/opencv2/flann/lsh_index.h
+++ b/modules/flann/include/opencv2/flann/lsh_index.h
@@ -58,15 +58,15 @@ namespace cvflann
struct LshIndexParams : public IndexParams
{
- LshIndexParams(unsigned int table_number = 12, unsigned int key_size = 20, unsigned int multi_probe_level = 2)
+ LshIndexParams(int table_number = 12, int key_size = 20, int multi_probe_level = 2)
{
(*this)["algorithm"] = FLANN_INDEX_LSH;
// The number of hash tables to use
- (*this)["table_number"] = static_cast(table_number);
+ (*this)["table_number"] = table_number;
// The length of the key in the hash tables
- (*this)["key_size"] = static_cast(key_size);
+ (*this)["key_size"] = key_size;
// Number of levels to use in multi-probe (0 for standard LSH)
- (*this)["multi_probe_level"] = static_cast(multi_probe_level);
+ (*this)["multi_probe_level"] = multi_probe_level;
}
};