Class Average
Defined in File descriptor_model.hpp
Inheritance Relationships
Base Type
public slam_mer::utils::DescriptorModel(Class DescriptorModel)
Class Documentation
-
class Average : public slam_mer::utils::DescriptorModel
The Average descriptor model computes the arithmetic average of the added descriptors and returns it as the current descriptor.
Public Types
Typedef for shared pointer of type Average.
Public Functions
-
inline virtual output_t<descriptor_t> predict(const pose_t &pose_ = pose_t(), const point3d_t &point_ = point3d_t()) override
Predicts the descriptor for a given pose and point.
- Parameters:
pose_ – The pose for which to predict the descriptor (not used in this model).
point_ – The point for which to predict the descriptor (not used in this model).
- Returns:
The arithmetic average descriptor of the added descriptors.
-
virtual void fit(const descriptor_t &descriptor_, const pose_t &pose_ = pose_t(), const point3d_t &point_ = point3d_t()) override
Adds a new descriptor to the model.
- Parameters:
descriptor_ – The new descriptor to add to the model.
pose_ – The pose of the keyframe that observed the descriptor (not used in this model).
point_ – The 3d point observation associated with the new descriptor (not used in this model).
Public Static Functions
Private Members
-
std::vector<float> _sumDescriptor
Sum of the added descriptors. This is used to compute the average descriptor efficiently without having to store all the descriptors in memory.