Template Class PointObservation
Defined in File observation_edge.hpp
Class Documentation
-
template<typename TransformationType>
class PointObservation This class defines a point observation made by a keyframe. It holds the 3D point in camera reference frame, the 2D keypoint, descriptor, inlier flag, and optional factors.
Public Types
-
using vector = vector_t<PointObservation>
Typedef to a vector_t of type PointObservation.
Typedef to a std::shared_ptr of type PointObservation.
-
using unique_ptr = std::unique_ptr<PointObservation>
Typedef to a std::unique_ptr of type PointObservation.
-
using ProjectionFactorTyped = ProjectionFactor<TransformationType>
Typedef for the Typed projection factor.
-
using PointDistanceFactorTyped = PointDistanceFactor<TransformationType>
Typedef to the typed point distance factor.
Public Functions
Construct a new PointObservation object.
- Parameters:
keypoint_ – 2D observation of the keypoint in the image.
point_ – 3D position of the point in the image reference frame.
descriptor_ – Descriptor for the keypoint in the image.
cameraPose_ – Camera pose of the observation in world coordinates.
inlier_ – Flag to indicate if the point is an inlier.
projectionFactor_ – Pointer to a projection factor.
distanceFactor_ – Pointer to a distance factor.
Construct a PointObservation object.
- Parameters:
other_ – Shared pointer to a PointObservation object.
-
inline PointObservation(const PointObservation &other_)
Construct a PointObservation object.
- Parameters:
other_ – PointObservation object.
-
inline PointObservation()
Construct a default PointObservation object.
-
inline ~PointObservation()
Destroy a PointObservation object.
-
inline PointObservation &operator=(const PointObservation &other_)
Assignment operator for PointObservation.
- Parameters:
other_ – PointObservation object.
- Returns:
Reference to the updated observation.
-
inline output_t<point3d_t> get_point() const
Gets the 3D point observation (image reference frame).
- Returns:
3D point observation (image reference frame).
-
inline output_t<point2d_t> get_keypoint() const
Gets the 2D observation of the keypoint in the image.
- Returns:
2D observation of the keypoint in the image.
-
inline output_t<descriptor_t> get_descriptor() const
Gets the descriptor for the point.
- Returns:
Descriptor for the point.
-
inline output_t<pose_t> get_camera_pose() const
Gets the camera pose of the observation in world coordinates.
- Returns:
Camera pose of the observation in world coordinates.
-
inline output_t<typename ProjectionFactorTyped::shared_ptr> get_projection_factor() const
Gets the projection factor for the observation.
- Returns:
Projection factor for the observation.
-
inline output_t<typename PointDistanceFactorTyped::shared_ptr> get_distance_factor() const
Gets the distance factor for the observation.
- Returns:
Distance factor for the observation.
-
inline void update_projection_factor_keys(const point_id_t pointId_, const keyframe_id_t keyframeId_)
Updates the keys of the projection factor.
- Parameters:
pointId_ – Point Id of the factor.
keyframeId_ – Keyframe Id of the factor.
-
inline void update_distance_factor_keys(const point_id_t pointId_, const keyframe_id_t keyframeId_)
Updates the keys of the distance factor.
- Parameters:
pointId_ – Point Id of the factor.
keyframeId_ – Keyframe Id of the factor.
-
inline bool is_inlier() const
Check if the edge is an inlier.
- Returns:
True if the edge is an inlier, false otherwise.
-
inline void set_inlier(bool inlier_)
Sets the inlier status of the point observation.
- Parameters:
inlier_ – True to set the point as inlier, false otherwise.
Public Static Functions
Allocates a new PointObservation object.
- Parameters:
keypoint_ – 2D observation of the keypoint in the image.
point_ – 3D position of the point in the image reference frame.
descriptor_ – Descriptor for the keypoint in the image.
cameraPose_ – Camera pose of the observation in world coordinates.
inlier_ – Flag to indicate if the point is an inlier.
projectionFactor_ – Pointer to a projection factor.
distanceFactor_ – Pointer to a distance factor.
- Returns:
Shared pointer owning the new PointObservation object.
Allocates a new PointObservation object.
- Parameters:
observation_ – PointObservation object.
projectionFactor_ – Pointer to a projection factor.
distanceFactor_ – Pointer to a distance factor.
- Returns:
Shared pointer owning the new PointObservation object.
Allocates a new PointObservation object.
- Parameters:
observation_ – PointObservation object.
- Returns:
Shared pointer owning the copied PointObservation object.
Private Members
-
descriptor_t _descriptor
Descriptor for the keypoint in the image.
-
bool _inlier
Flag to indicate if the point is an inlier.
-
ProjectionFactorTyped::shared_ptr _projectionFactor
Pointer to a projection factor.
-
PointDistanceFactorTyped::shared_ptr _distanceFactor
Pointer to a distance factor.
-
using vector = vector_t<PointObservation>