Class DescriptorModel
Defined in File descriptor_model.hpp
Inheritance Relationships
Derived Types
public slam_mer::utils::Average(Class Average)public slam_mer::utils::LastSeen(Class LastSeen)public slam_mer::utils::Medoid(Class Medoid)public slam_mer::utils::WeightedAverage(Class WeightedAverage)
Class Documentation
-
class DescriptorModel
The DescriptorModel class is an abstract base class for different types of descriptor models. A descriptor model is a model that can predict a descriptor for a given pose and point, and can be updated with new descriptors.
Subclassed by slam_mer::utils::Average, slam_mer::utils::LastSeen, slam_mer::utils::Medoid, slam_mer::utils::WeightedAverage
Public Types
-
enum class Type
Types of descriptor models.
Values:
-
enumerator LAST_SEEN
Descriptor is the last one that was added to the model.
-
enumerator MEDOID
Descriptor is the medoid of the added descriptors.
-
enumerator AVERAGE
Descriptor is the arithmetic average of the added descriptors.
-
enumerator WEIGHTED_AVERAGE
Descriptor is the weighted average of the added descriptors.
-
enumerator LAST_SEEN
Typedef for shared pointer of type DescriptorModel.
Public Functions
-
virtual ~DescriptorModel() = default
Virtual destructor for the DescriptorModel class.
-
virtual output_t<descriptor_t> predict(const pose_t &pose_, const point3d_t &point_) = 0
Predicts a descriptor for the provided pose and point.
- Parameters:
pose_ – Camera pose used by the model.
point_ – 3D point used by the model.
- Returns:
Predicted descriptor or an error state.
-
virtual void fit(const descriptor_t &descriptor_, const pose_t &pose_ = pose_t(), const point3d_t &point_ = point3d_t()) = 0
Updates the model with one descriptor observation.
- Parameters:
descriptor_ – Descriptor measurement to ingest.
pose_ – Camera pose associated with the observation.
point_ – 3D point associated with the observation.
Public Static Functions
-
static DescriptorModel::shared_ptr create(const Type &type_)
Factory method that creates a descriptor model instance.
- Parameters:
type_ – Descriptor-model type to instantiate.
- Returns:
Shared pointer to the requested descriptor-model implementation.
Protected Functions
Protected Attributes
-
descriptor_t _descriptor
The current descriptor of the model. This is updated by the fit method and returned by the predict method.
-
size_t _numObservations = 0
The number of observations that have been added to the model.
-
enum class Type