MCPcopy Create free account
hub / github.com/AutonomousFieldRoboticsLab/SVIn / FClass

Class FClass

pose_graph/ThirdParty/DBoW/FClass.h:25–64  ·  view source on GitHub ↗

Generic class to encapsulate functions to manage descriptors. * This class must be inherited. Derived classes can be used as the * parameter F when creating Templated structures * (TemplatedVocabulary, TemplatedDatabase, ...) */

Source from the content-addressed store, hash-verified

23 * (TemplatedVocabulary, TemplatedDatabase, ...)
24 */
25class FClass {
26 class TDescriptor;
27 typedef const TDescriptor* pDescriptor;
28
29 /**
30 * Calculates the mean value of a set of descriptors
31 * @param descriptors
32 * @param mean mean descriptor
33 */
34 virtual void meanValue(const std::vector<pDescriptor>& descriptors, TDescriptor& mean) = 0;
35
36 /**
37 * Calculates the distance between two descriptors
38 * @param a
39 * @param b
40 * @return distance
41 */
42 static double distance(const TDescriptor& a, const TDescriptor& b);
43
44 /**
45 * Returns a string version of the descriptor
46 * @param a descriptor
47 * @return string version
48 */
49 static std::string toString(const TDescriptor& a);
50
51 /**
52 * Returns a descriptor from a string
53 * @param a descriptor
54 * @param s string version
55 */
56 static void fromString(TDescriptor& a, const std::string& s);
57
58 /**
59 * Returns a mat with the descriptors in float format
60 * @param descriptors
61 * @param mat (out) NxL 32F matrix
62 */
63 static void toMat32F(const std::vector<TDescriptor>& descriptors, cv::Mat& mat);
64};
65
66} // namespace DBoW2
67

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected