IDS peak ICV v1.0.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
23namespace experimental
24{
25
36class ReprojectionError : public detail::IPrintable<ReprojectionError>
37{
38public:
44 ~ReprojectionError() override = default;
45
51 ReprojectionError(const ReprojectionError& other) = default;
52
58 ReprojectionError(ReprojectionError&& other) noexcept = default;
59
66
72 ReprojectionError& operator=(ReprojectionError&& other) noexcept = default;
73
81 PEAK_ICV_NO_DISCARD peak::common::PointF GetPosition() const;
82
90 PEAK_ICV_NO_DISCARD peak::common::VectorF GetDirection() const;
91
99 PEAK_ICV_NO_DISCARD double GetLength() const;
100
101protected:
102 void Print(detail::CommaSeperatedStream& stream) const override;
103
104private:
105 friend class CalibrationView;
106 friend class peak::common::detail::BackendAccessor<ReprojectionError>;
107
108 ReprojectionError(const peak_icv_reprojection_error& reprojectionError); // NOLINT
109
110 peak_icv_reprojection_error m_reprojectionError{};
111};
112
113inline ReprojectionError::ReprojectionError(const peak_icv_reprojection_error& reprojectionError)
114 : m_reprojectionError{ reprojectionError }
115{}
116
118{
119 return peak::common::detail::BackendAccessor<peak::common::PointF>::CreateInstance(m_reprojectionError.position);
120}
121
123{
124 return peak::common::detail::BackendAccessor<peak::common::PointF>::CreateInstance(m_reprojectionError.direction);
125}
126
127inline double ReprojectionError::GetLength() const
128{
129 return m_reprojectionError.length;
130}
131
132inline void ReprojectionError::Print(detail::CommaSeperatedStream& stream) const
133{
134 stream << GetPosition() << GetDirection() << GetLength();
135}
136} /* namespace experimental */
137
138} /* namespace icv */
139} /* namespace peak */
Class for holding the extrinsic result for one image of camera calibration and also the reprojection ...
Class to represent the reprojection error in a calibration view.
peak::common::VectorF GetDirection() const
Returns direction of the error.
peak::common::PointF GetPosition() const
Returns the marker position.
ReprojectionError & operator=(ReprojectionError &&other) noexcept=default
ReprojectionError(ReprojectionError &&other) noexcept=default
ReprojectionError(const ReprojectionError &other)=default
double GetLength() const
Returns the magnitude of the error.
ReprojectionError & operator=(const ReprojectionError &other)=default