8 #ifndef META_OCEAN_TEST_TESTTACKING_TEST_VOCABULARY_TREE_H
9 #define META_OCEAN_TEST_TESTTACKING_TEST_VOCABULARY_TREE_H
25 namespace TestTracking
50 static constexpr
unsigned int binaryDescriptorElements_ = 32u;
53 static constexpr
unsigned int floatDescriptorElements_ = 128u;
69 template <DescriptorType tDescriptorType>
83 static bool test(
const double testDuration,
Worker& worker);
108 template <DescriptorType tDescriptorType>
118 template <DescriptorType tDescriptorType>
128 template <DescriptorType tDescriptorType>
138 template <DescriptorType tDescriptorType>
152 class OCEAN_TEST_TRACKING_EXPORT
TestVocabularyTree::TypeHelper<TestVocabularyTree::DT_BINARY>
159 static constexpr
const char* name_ =
"Binary";
218 class OCEAN_TEST_TRACKING_EXPORT
TestVocabularyTree::TypeHelper<TestVocabularyTree::DT_FLOAT>
225 static constexpr
const char* name_ =
"Float";
This class implements a generator for random numbers.
Definition: RandomGenerator.h:42
Helper class to determine data types for individual descriptor types.
Definition: TestVocabularyTree.h:71
This class implements a test for the VocabularyTree class.
Definition: TestVocabularyTree.h:33
std::vector< Descriptor > Descriptors
Definition of a vector holding descriptors.
Definition: TestVocabularyTree.h:169
static bool testDetermineClustersMeanForFloatDescriptor(const double testDuration, Worker &worker)
Tests the function determining the means for clusters of float descriptors.
static float determineDistance(const FloatDescriptor &descriptorA, const FloatDescriptor &descriptorB)
Determines the square distance between two float descriptors.
static FloatDescriptor modifyDescriptor(const FloatDescriptor &descriptor, RandomGenerator &randomGenerator)
Applies a minor random modification to a given descriptor.
static bool testMatchingDescriptors(const double testDuration, Worker &worker)
Tests descriptor matching.
static bool testConstructor(const double testDuration, Worker &worker)
Tests the constructor.
static void randomizeDescriptor(BinaryDescriptor &descriptor, RandomGenerator &randomGenerator)
Randomizes a descriptor.
std::array< float, floatDescriptorElements_ > FloatDescriptor
Definition of a float descriptor.
Definition: TestVocabularyTree.h:63
static BinaryDescriptor modifyDescriptor(const BinaryDescriptor &descriptor, RandomGenerator &randomGenerator)
Applies a minor random modification to a given descriptor.
static bool testMatchingViaLeafs(const double testDuration, Worker &worker)
Tests manual matching accessing the leafs.
static std::vector< DistanceType > descriptorEpsilons(const unsigned int numberEpsilons)
Returns a bunch of descriptor epsilons which can be used for testing.
static bool testMatchingDescriptorsWithForest(const double testDuration, Worker &worker)
Tests descriptor matching with forest.
static Indices32 separateBinaryDescriptor(const BinaryDescriptor &descriptor)
Separates the individual bits of binary descriptor into individual integer values.
static DistanceType determineDistance(const BinaryDescriptor &descriptorA, const BinaryDescriptor &descriptorB)
Determines the (hamming) distance between two binary descriptors.
std::array< uint8_t, binaryDescriptorElements_ > BinaryDescriptor
Definition of a binary descriptor.
Definition: TestVocabularyTree.h:58
static bool testDetermineClustersMeanForBinaryDescriptor(const double testDuration, Worker &worker)
Tests the function determining the means for clusters of binary descriptors.
static bool test(const double testDuration, Worker &worker)
Invokes all existing tests for VocabularyTree.
unsigned int DistanceType
Definition of the data type for the distance between two descriptors.
Definition: TestVocabularyTree.h:174
DescriptorType
Definition of individual descriptor types.
Definition: TestVocabularyTree.h:40
@ DT_BINARY
Descriptor based on binary data.
Definition: TestVocabularyTree.h:42
BinaryDescriptor Descriptor
Definition of a descriptor data type.
Definition: TestVocabularyTree.h:164
static void randomizeDescriptor(FloatDescriptor &descriptor, RandomGenerator &randomGenerator)
Randomizes a descriptor.
This class implements a Vocabulary Tree for feature descriptors.
Definition: VocabularyTree.h:223
TDescriptors(*)(const unsigned int numberClusters, const TDescriptor *treeDescriptors, const Index32 *descriptorIndices, const Index32 *clusterIndicesForDescriptors, const size_t numberDescriptorIndices, Worker *worker) ClustersMeanFunction
Definition of a function pointer allowing to determine the mean descriptors for individual clusters.
Definition: VocabularyTree.h:285
This class implements a worker able to distribute function calls over different threads.
Definition: Worker.h:33
std::vector< Index32 > Indices32
Definition of a vector holding 32 bit index values.
Definition: Base.h:96
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15