8#ifndef META_OCEAN_TEST_TESTTACKING_TEST_VOCABULARY_TREE_H
9#define META_OCEAN_TEST_TESTTACKING_TEST_VOCABULARY_TREE_H
52 static constexpr unsigned int binaryDescriptorElements_ = 32u;
55 static constexpr unsigned int floatDescriptorElements_ = 128u;
71 template <DescriptorType tDescriptorType>
111 template <DescriptorType tDescriptorType>
121 template <DescriptorType tDescriptorType>
131 template <DescriptorType tDescriptorType>
141 template <DescriptorType tDescriptorType>
155class OCEAN_TEST_TRACKING_EXPORT
TestVocabularyTree::TypeHelper<TestVocabularyTree::DT_BINARY>
162 static constexpr const char* name_ =
"Binary";
221class OCEAN_TEST_TRACKING_EXPORT
TestVocabularyTree::TypeHelper<TestVocabularyTree::DT_FLOAT>
228 static constexpr const char* name_ =
"Float";
This class implements a generator for random numbers.
Definition RandomGenerator.h:42
This class implements a test selector that parses test function strings and determines which tests sh...
Definition TestSelector.h:51
Helper class to determine data types for individual descriptor types.
Definition TestVocabularyTree.h:73
This class implements a test for the VocabularyTree class.
Definition TestVocabularyTree.h:35
std::vector< Descriptor > Descriptors
Definition of a vector holding descriptors.
Definition TestVocabularyTree.h:172
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 std::vector< DistanceType > descriptorEpsilons(const unsigned int numberEpsilons)
Returns a bunch of descriptor epsilons which can be used for testing.
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:65
static BinaryDescriptor modifyDescriptor(const BinaryDescriptor &descriptor, RandomGenerator &randomGenerator)
Applies a minor random modification to a given descriptor.
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:60
static bool test(const double testDuration, Worker &worker, const TestSelector &selector)
Invokes all existing tests for VocabularyTree.
static bool testDetermineClustersMeanForBinaryDescriptor(const double testDuration, Worker &worker)
Tests the function determining the means for clusters of binary descriptors.
unsigned int DistanceType
Definition of the data type for the distance between two descriptors.
Definition TestVocabularyTree.h:177
DescriptorType
Definition of individual descriptor types.
Definition TestVocabularyTree.h:42
@ DT_BINARY
Descriptor based on binary data.
Definition TestVocabularyTree.h:44
BinaryDescriptor Descriptor
Definition of a descriptor data type.
Definition TestVocabularyTree.h:167
static bool testMatchingViaLeaves(const double testDuration, Worker &worker)
Tests manual matching accessing the leaves.
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