Ocean
Loading...
Searching...
No Matches
PoseQualityCalculator.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#ifndef META_OCEAN_TRACKING_SLAM_POSE_QUALITY_CALCULATOR_H
9#define META_OCEAN_TRACKING_SLAM_POSE_QUALITY_CALCULATOR_H
10
14
15namespace Ocean
16{
17
18namespace Tracking
19{
20
21namespace SLAM
22{
23
24/**
25 * Helper class allowing to determine the quality of the camera pose based on the number of object points used to determine the camera pose.
26 */
27class OCEAN_TRACKING_SLAM_EXPORT PoseQualityCalculator
28{
29 public:
30
31 /**
32 * Creates a new quality calculator object.
33 */
35
36 /**
37 * Adds an object point with the specified localization precision.
38 * @param localizationPrecision The localization precision of the object point, must not be LP_INVALID
39 */
41
42 /**
43 * Returns the number of object points which have been used to determine the camera pose.
44 * @return The pose's object points, with range [0, infinity)
45 */
46 inline size_t size() const;
47
48 /**
49 * Returns the quality of the camera pose based on the number and precision of object points.
50 * @return The pose quality
51 */
53
54 /**
55 * Returns a string representation of the pose quality and object point statistics.
56 * @return The string representation
57 */
58 std::string toString() const;
59
60 public:
61
62 /// The number of high precision object points used to determine the camera pose, with range [0, infinity).
63 size_t numberHighPrecision_ = 0;
64
65 /// The number of medium precision object points used to determine the camera pose, with range [0, infinity).
66 size_t numberMediumPrecision_ = 0;
67
68 /// The number of low precision object points used to determine the camera pose, with range [0, infinity).
69 size_t numberLowPrecision_ = 0;
70
71 /// The number of object points with unknown precision used to determine the camera pose, with range [0, infinity).
72 size_t numberUnknownPrecision_ = 0;
73};
74
79
80}
81
82}
83
84}
85
86#endif // META_OCEAN_TRACKING_SLAM_POSE_QUALITY_CALCULATOR_H
PoseQuality
Definition of the quality of a camera pose.
Definition CameraPose.h:55
LocalizationPrecision
Definition of possible localization precisions.
Definition LocalizedObjectPoint.h:59
Helper class allowing to determine the quality of the camera pose based on the number of object point...
Definition PoseQualityCalculator.h:28
void addObjectPoint(const LocalizedObjectPoint::LocalizationPrecision localizationPrecision)
Adds an object point with the specified localization precision.
std::string toString() const
Returns a string representation of the pose quality and object point statistics.
CameraPose::PoseQuality poseQuality() const
Returns the quality of the camera pose based on the number and precision of object points.
size_t numberHighPrecision_
The number of high precision object points used to determine the camera pose, with range [0,...
Definition PoseQualityCalculator.h:63
size_t numberUnknownPrecision_
The number of object points with unknown precision used to determine the camera pose,...
Definition PoseQualityCalculator.h:72
size_t numberLowPrecision_
The number of low precision object points used to determine the camera pose, with range [0,...
Definition PoseQualityCalculator.h:69
size_t numberMediumPrecision_
The number of medium precision object points used to determine the camera pose, with range [0,...
Definition PoseQualityCalculator.h:66
size_t size() const
Returns the number of object points which have been used to determine the camera pose.
Definition PoseQualityCalculator.h:75
PoseQualityCalculator()=default
Creates a new quality calculator object.
The namespace covering the entire Ocean framework.
Definition Accessor.h:15