CVB++ 15.0
search_result.hpp
1#pragma once
2
3#include "dnc.hpp"
4#include "../point_3d.hpp"
5#include "../angle.hpp"
6
7namespace Cvb
8{
9
10 CVB_BEGIN_INLINE_NS
11
12 namespace Dnc
13 {
14
16
18#pragma pack(push, 4)
19 class SearchResult final
20 {
21 public:
22 SearchResult() = default;
23
25
32 Point3D<double> Position() const noexcept
33 {
34 return position_;
35 }
36
38
46 {
47 return rotationVector_;
48 }
49
51
57 Angle Theta() const noexcept
58 {
59 return Angle::FromRadians(theta_);
60 }
61
63
71 double Score() const noexcept
72 {
73 return score_;
74 }
75
77
82 bool operator==(const SearchResult &searchResult) const noexcept
83 {
84 return (position_ == searchResult.position_ && rotationVector_ == searchResult.rotationVector_
85 && theta_ == searchResult.theta_ && score_ == searchResult.score_);
86 }
87
89
94 bool operator!=(const SearchResult &searchResult) const noexcept
95 {
96 return !(*this == searchResult);
97 }
98
99 private:
100 Point3D<double> position_;
101 Vector3D<double> rotationVector_;
102 double theta_ = 0.0;
103 double score_ = 0.0;
104 };
105#pragma pack(pop)
106
107 } // namespace Dnc
108
109 CVB_END_INLINE_NS
110
111} // namespace Cvb
Object for convenient and type - safe handling of angles.
Definition angle.hpp:16
static Angle FromRadians(double rad, bool trim=false) noexcept
Create an angle in radians.
Definition angle.hpp:39
double Score() const noexcept
Detection confidence value (0..1).
Definition search_result.hpp:71
Vector3D< double > RotationVector() const noexcept
Normalized rotation axis vector of object's orientation.
Definition search_result.hpp:45
bool operator==(const SearchResult &searchResult) const noexcept
Compares to an other search result.
Definition search_result.hpp:82
Point3D< double > Position() const noexcept
Coordinates of object's origin within point cloud.
Definition search_result.hpp:32
bool operator!=(const SearchResult &searchResult) const noexcept
Compares to an other search result.
Definition search_result.hpp:94
Angle Theta() const noexcept
Rotation angle of object's orientation.
Definition search_result.hpp:57
Multi-purpose 3D vector class.
Definition point_3d.hpp:22
Namespace for Match3D DNC (CAD-based 3D-object recognition).
Definition dnc.hpp:29
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17
Point3D< T > Vector3D
Alias for Point3D.
Definition point_3d.hpp:363