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, ...) */
| 23 | * (TemplatedVocabulary, TemplatedDatabase, ...) |
| 24 | */ |
| 25 | class 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 |
nothing calls this directly
no outgoing calls
no test coverage detected