IDS peak ICV v1.1.0
Loading...
Searching...
No Matches
peak_icv_reprojection_error.hpp
Go to the documentation of this file.
1
11#pragma once
12
16#include <peak_icv_c/algorithms/calibration/peak_icv_calibration_view.h>
17
18namespace peak
19{
20namespace icv
21{
22
39class ReprojectionError : public detail::IPrintable<ReprojectionError>
40{
41public:
45 ~ReprojectionError() override = default;
46
50 ReprojectionError(const ReprojectionError& other) = default;
51
55 ReprojectionError(ReprojectionError&& other) noexcept = default;
56
61
65 ReprojectionError& operator=(ReprojectionError&& other) noexcept = default;
66
72 PEAK_COMMON_NO_DISCARD peak::common::PointF GetPosition() const;
73
79 PEAK_COMMON_NO_DISCARD peak::common::VectorF GetDirection() const;
80
86 PEAK_COMMON_NO_DISCARD double GetLength() const;
87
88protected:
89 void Print(detail::CommaSeperatedStream& stream) const override;
90
91private:
92 friend class CalibrationView;
93 friend class peak::common::detail::BackendAccessor<ReprojectionError>;
94
95 ReprojectionError(const peak_icv_reprojection_error& reprojectionError); // NOLINT
96
97 peak_icv_reprojection_error m_reprojectionError{};
98};
99
100inline ReprojectionError::ReprojectionError(const peak_icv_reprojection_error& reprojectionError)
101 : m_reprojectionError{ reprojectionError }
102{}
103
105{
106 return peak::common::detail::BackendAccessor<peak::common::PointF>::CreateInstance(m_reprojectionError.position);
107}
108
110{
111 return peak::common::detail::BackendAccessor<peak::common::PointF>::CreateInstance(m_reprojectionError.direction);
112}
113
114inline double ReprojectionError::GetLength() const
115{
116 return m_reprojectionError.length;
117}
118
119inline void ReprojectionError::Print(detail::CommaSeperatedStream& stream) const
120{
121 stream << GetPosition() << GetDirection() << GetLength();
122}
123
124} /* namespace icv */
125} /* namespace peak */
Represents a single observation of a calibration plate in an image.
Represents the reprojection error for a marker point in the image.
~ReprojectionError() override=default
peak::common::VectorF GetDirection() const
peak::common::PointF GetPosition() const
ReprojectionError & operator=(ReprojectionError &&other) noexcept=default
ReprojectionError(ReprojectionError &&other) noexcept=default
ReprojectionError(const ReprojectionError &other)=default
ReprojectionError & operator=(const ReprojectionError &other)=default