69# pragma warning(disable : 4251)
85 static constexpr const char *path{
"" };
88 static constexpr const char *name{
"CameraIntrinsics" };
91 static constexpr const char *description{
92 R
"description(Information about the intrinsic parameters of the camera (OpenCV model))description"
95 static constexpr size_t version{ 1 };
105 static constexpr std::array<uint8_t, 3> binaryId{
'c',
'i',
'n' };
119 static constexpr const char *path{
"CameraMatrix" };
122 static constexpr const char *name{
"CameraMatrix" };
125 static constexpr const char *description{
126 R
"description(The camera matrix K (=[fx,0,cx;0,fy,cy;0,0,1]))description"
139 static constexpr const char *path{
"CameraMatrix/CX" };
142 static constexpr const char *name{
"CX" };
145 static constexpr const char *description{
146 R
"description(x coordinate of the principal point)description"
155 return { std::numeric_limits<double>::lowest(), std::numeric_limits<double>::max() };
162 explicit constexpr CX(
double value)
175 return m_value == other.m_value;
181 return m_value != other.m_value;
187 return m_value < other.m_value;
193 return m_value > other.m_value;
199 return m_value <= other.m_value;
205 return m_value >= other.m_value;
215 void setFromString(
const std::string &value);
217 double m_value{ 0.0 };
219 friend struct DataModel::Detail::Befriend<
CX>;
232 static constexpr const char *path{
"CameraMatrix/CY" };
235 static constexpr const char *name{
"CY" };
238 static constexpr const char *description{
239 R
"description(y coordinate of the principal point)description"
248 return { std::numeric_limits<double>::lowest(), std::numeric_limits<double>::max() };
255 explicit constexpr CY(
double value)
268 return m_value == other.m_value;
274 return m_value != other.m_value;
280 return m_value < other.m_value;
286 return m_value > other.m_value;
292 return m_value <= other.m_value;
298 return m_value >= other.m_value;
308 void setFromString(
const std::string &value);
310 double m_value{ 0.0 };
312 friend struct DataModel::Detail::Befriend<
CY>;
325 static constexpr const char *path{
"CameraMatrix/FX" };
328 static constexpr const char *name{
"FX" };
331 static constexpr const char *description{ R
"description(Focal length in x)description" };
339 return { std::numeric_limits<double>::lowest(), std::numeric_limits<double>::max() };
346 explicit constexpr FX(
double value)
359 return m_value == other.m_value;
365 return m_value != other.m_value;
371 return m_value < other.m_value;
377 return m_value > other.m_value;
383 return m_value <= other.m_value;
389 return m_value >= other.m_value;
399 void setFromString(
const std::string &value);
401 double m_value{ 0.0 };
403 friend struct DataModel::Detail::Befriend<
FX>;
416 static constexpr const char *path{
"CameraMatrix/FY" };
419 static constexpr const char *name{
"FY" };
422 static constexpr const char *description{ R
"description(Focal length in y)description" };
430 return { std::numeric_limits<double>::lowest(), std::numeric_limits<double>::max() };
437 explicit constexpr FY(
double value)
450 return m_value == other.m_value;
456 return m_value != other.m_value;
462 return m_value < other.m_value;
468 return m_value > other.m_value;
474 return m_value <= other.m_value;
480 return m_value >= other.m_value;
490 void setFromString(
const std::string &value);
492 double m_value{ 0.0 };
494 friend struct DataModel::Detail::Befriend<
FY>;
523 typename std::enable_if<
sizeof...(Args) >= 1,
int>::type = 0,
524 typename std::enable_if<
525 Zivid::Detail::TypeTraits::AllArgsAreInTuple<
Descendants,
typename std::decay<Args>::type...>::
529 template<typename... Args>
533 using namespace Zivid::Detail::TypeTraits;
536 AllArgsDecayedAreUnique<Args...>::value,
537 "Found duplicate types among the arguments passed to CameraMatrix(...). "
538 "Types should be listed at most once.");
540 set(std::forward<Args>(args)...);
557 template<
typename... Args,
typename std::enable_if<
sizeof...(Args) >= 2,
int>::type = 0>
559 template<typename... Args>
563 using namespace Zivid::Detail::TypeTraits;
565 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
567 AllArgsAreDescendantNodes::value,
"All arguments passed to set(...) must be descendant nodes.");
570 AllArgsDecayedAreUnique<Args...>::value,
571 "Found duplicate types among the arguments passed to set(...). "
572 "Types should be listed at most once.");
574 Zivid::DataModel::Detail::invokeSetWithEachArgument(*
this, std::forward<Args>(args)...);
592 template<
typename... Args,
typename std::enable_if<
sizeof...(Args) >= 1,
int>::type = 0>
594 template<typename... Args>
598 using namespace Zivid::Detail::TypeTraits;
600 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
602 AllArgsAreDescendantNodes::value,
603 "All arguments passed to copyWith(...) must be descendant nodes.");
606 AllArgsDecayedAreUnique<Args...>::value,
607 "Found duplicate types among the arguments passed to copyWith(...). "
608 "Types should be listed at most once.");
611 copy.
set(std::forward<Args>(args)...);
693 typename std::enable_if<std::is_same<T, CameraIntrinsics::CameraMatrix::CX>::value,
int>::type = 0>
701 typename std::enable_if<std::is_same<T, CameraIntrinsics::CameraMatrix::CY>::value,
int>::type = 0>
709 typename std::enable_if<std::is_same<T, CameraIntrinsics::CameraMatrix::FX>::value,
int>::type = 0>
717 typename std::enable_if<std::is_same<T, CameraIntrinsics::CameraMatrix::FY>::value,
int>::type = 0>
723 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
729 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
735 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
741 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
783 void setFromString(
const std::string &value);
785 void setFromString(
const std::string &fullPath,
const std::string &value);
787 std::string getString(
const std::string &fullPath)
const;
794 friend struct DataModel::Detail::Befriend<
CameraMatrix>;
807 static constexpr const char *path{
"Distortion" };
810 static constexpr const char *name{
"Distortion" };
813 static constexpr const char *description{
814 R
"description(The radial and tangential distortion parameters)description"
827 static constexpr const char *path{
"Distortion/K1" };
830 static constexpr const char *name{
"K1" };
833 static constexpr const char *description{ R
"description(First radial distortion term)description" };
841 return { std::numeric_limits<double>::lowest(), std::numeric_limits<double>::max() };
848 explicit constexpr K1(
double value)
861 return m_value == other.m_value;
867 return m_value != other.m_value;
873 return m_value < other.m_value;
879 return m_value > other.m_value;
885 return m_value <= other.m_value;
891 return m_value >= other.m_value;
901 void setFromString(
const std::string &value);
903 double m_value{ 0.0 };
905 friend struct DataModel::Detail::Befriend<
K1>;
918 static constexpr const char *path{
"Distortion/K2" };
921 static constexpr const char *name{
"K2" };
924 static constexpr const char *description{ R
"description(Second radial distortion term)description" };
932 return { std::numeric_limits<double>::lowest(), std::numeric_limits<double>::max() };
939 explicit constexpr K2(
double value)
952 return m_value == other.m_value;
958 return m_value != other.m_value;
964 return m_value < other.m_value;
970 return m_value > other.m_value;
976 return m_value <= other.m_value;
982 return m_value >= other.m_value;
992 void setFromString(
const std::string &value);
994 double m_value{ 0.0 };
996 friend struct DataModel::Detail::Befriend<
K2>;
1009 static constexpr const char *path{
"Distortion/K3" };
1012 static constexpr const char *name{
"K3" };
1015 static constexpr const char *description{ R
"description(Third radial distortion term)description" };
1023 return { std::numeric_limits<double>::lowest(), std::numeric_limits<double>::max() };
1030 explicit constexpr K3(
double value)
1043 return m_value == other.m_value;
1049 return m_value != other.m_value;
1055 return m_value < other.m_value;
1061 return m_value > other.m_value;
1067 return m_value <= other.m_value;
1073 return m_value >= other.m_value;
1083 void setFromString(
const std::string &value);
1085 double m_value{ 0.0 };
1087 friend struct DataModel::Detail::Befriend<
K3>;
1100 static constexpr const char *path{
"Distortion/P1" };
1103 static constexpr const char *name{
"P1" };
1106 static constexpr const char *description{ R
"description(First tangential distortion term)description" };
1114 return { std::numeric_limits<double>::lowest(), std::numeric_limits<double>::max() };
1121 explicit constexpr P1(
double value)
1134 return m_value == other.m_value;
1140 return m_value != other.m_value;
1146 return m_value < other.m_value;
1152 return m_value > other.m_value;
1158 return m_value <= other.m_value;
1164 return m_value >= other.m_value;
1174 void setFromString(
const std::string &value);
1176 double m_value{ 0.0 };
1178 friend struct DataModel::Detail::Befriend<
P1>;
1191 static constexpr const char *path{
"Distortion/P2" };
1194 static constexpr const char *name{
"P2" };
1197 static constexpr const char *description{
1198 R
"description(Second tangential distortion term)description"
1207 return { std::numeric_limits<double>::lowest(), std::numeric_limits<double>::max() };
1214 explicit constexpr P2(
double value)
1227 return m_value == other.m_value;
1233 return m_value != other.m_value;
1239 return m_value < other.m_value;
1245 return m_value > other.m_value;
1251 return m_value <= other.m_value;
1257 return m_value >= other.m_value;
1267 void setFromString(
const std::string &value);
1269 double m_value{ 0.0 };
1271 friend struct DataModel::Detail::Befriend<
P2>;
1302 typename std::enable_if<
sizeof...(Args) >= 1,
int>::type = 0,
1303 typename std::enable_if<
1304 Zivid::Detail::TypeTraits::AllArgsAreInTuple<
Descendants,
typename std::decay<Args>::type...>::
1308 template<typename... Args>
1312 using namespace Zivid::Detail::TypeTraits;
1315 AllArgsDecayedAreUnique<Args...>::value,
1316 "Found duplicate types among the arguments passed to Distortion(...). "
1317 "Types should be listed at most once.");
1319 set(std::forward<Args>(args)...);
1337 template<
typename... Args,
typename std::enable_if<
sizeof...(Args) >= 2,
int>::type = 0>
1339 template<typename... Args>
1343 using namespace Zivid::Detail::TypeTraits;
1345 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1347 AllArgsAreDescendantNodes::value,
"All arguments passed to set(...) must be descendant nodes.");
1350 AllArgsDecayedAreUnique<Args...>::value,
1351 "Found duplicate types among the arguments passed to set(...). "
1352 "Types should be listed at most once.");
1354 Zivid::DataModel::Detail::invokeSetWithEachArgument(*
this, std::forward<Args>(args)...);
1373 template<
typename... Args,
typename std::enable_if<
sizeof...(Args) >= 1,
int>::type = 0>
1375 template<typename... Args>
1379 using namespace Zivid::Detail::TypeTraits;
1381 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1383 AllArgsAreDescendantNodes::value,
1384 "All arguments passed to copyWith(...) must be descendant nodes.");
1387 AllArgsDecayedAreUnique<Args...>::value,
1388 "Found duplicate types among the arguments passed to copyWith(...). "
1389 "Types should be listed at most once.");
1392 copy.
set(std::forward<Args>(args)...);
1493 typename std::enable_if<std::is_same<T, CameraIntrinsics::Distortion::K1>::value,
int>::type = 0>
1501 typename std::enable_if<std::is_same<T, CameraIntrinsics::Distortion::K2>::value,
int>::type = 0>
1509 typename std::enable_if<std::is_same<T, CameraIntrinsics::Distortion::K3>::value,
int>::type = 0>
1517 typename std::enable_if<std::is_same<T, CameraIntrinsics::Distortion::P1>::value,
int>::type = 0>
1525 typename std::enable_if<std::is_same<T, CameraIntrinsics::Distortion::P2>::value,
int>::type = 0>
1531 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
1537 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
1543 template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
1549 template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
1555 template<size_t i, typename std::enable_if<i == 4, int>::type = 0>
1562 template<
typename F>
1573 template<
typename F>
1599 void setFromString(
const std::string &value);
1601 void setFromString(
const std::string &fullPath,
const std::string &value);
1603 std::string getString(
const std::string &fullPath)
const;
1611 friend struct DataModel::Detail::Befriend<
Distortion>;
1671 typename std::enable_if<
sizeof...(Args) >= 1,
int>::type = 0,
1672 typename std::enable_if<
1673 Zivid::Detail::TypeTraits::AllArgsAreInTuple<
Descendants,
typename std::decay<Args>::type...>::value,
1676 template<typename... Args>
1680 using namespace Zivid::Detail::TypeTraits;
1683 AllArgsDecayedAreUnique<Args...>::value,
1684 "Found duplicate types among the arguments passed to CameraIntrinsics(...). "
1685 "Types should be listed at most once.");
1687 set(std::forward<Args>(args)...);
1711 template<
typename... Args,
typename std::enable_if<
sizeof...(Args) >= 2,
int>::type = 0>
1713 template<typename... Args>
1717 using namespace Zivid::Detail::TypeTraits;
1719 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1721 AllArgsAreDescendantNodes::value,
"All arguments passed to set(...) must be descendant nodes.");
1724 AllArgsDecayedAreUnique<Args...>::value,
1725 "Found duplicate types among the arguments passed to set(...). "
1726 "Types should be listed at most once.");
1728 Zivid::DataModel::Detail::invokeSetWithEachArgument(*
this, std::forward<Args>(args)...);
1753 template<
typename... Args,
typename std::enable_if<
sizeof...(Args) >= 1,
int>::type = 0>
1755 template<typename... Args>
1759 using namespace Zivid::Detail::TypeTraits;
1761 using AllArgsAreDescendantNodes = AllArgsAreInTuple<Descendants, typename std::decay<Args>::type...>;
1763 AllArgsAreDescendantNodes::value,
"All arguments passed to copyWith(...) must be descendant nodes.");
1766 AllArgsDecayedAreUnique<Args...>::value,
1767 "Found duplicate types among the arguments passed to copyWith(...). "
1768 "Types should be listed at most once.");
1771 copy.
set(std::forward<Args>(args)...);
1778 return m_cameraMatrix;
1784 return m_cameraMatrix;
1790 m_cameraMatrix = value;
1797 m_cameraMatrix.
set(value);
1804 m_cameraMatrix.
set(value);
1811 m_cameraMatrix.
set(value);
1818 m_cameraMatrix.
set(value);
1825 return m_distortion;
1831 return m_distortion;
1837 m_distortion = value;
1844 m_distortion.
set(value);
1851 m_distortion.
set(value);
1858 m_distortion.
set(value);
1865 m_distortion.
set(value);
1872 m_distortion.
set(value);
1878 typename std::enable_if<std::is_same<T, CameraIntrinsics::CameraMatrix>::value,
int>::type = 0>
1881 return m_cameraMatrix;
1886 typename std::enable_if<std::is_same<T, CameraIntrinsics::CameraMatrix::CX>::value,
int>::type = 0>
1894 typename std::enable_if<std::is_same<T, CameraIntrinsics::CameraMatrix::CY>::value,
int>::type = 0>
1902 typename std::enable_if<std::is_same<T, CameraIntrinsics::CameraMatrix::FX>::value,
int>::type = 0>
1910 typename std::enable_if<std::is_same<T, CameraIntrinsics::CameraMatrix::FY>::value,
int>::type = 0>
1918 typename std::enable_if<std::is_same<T, CameraIntrinsics::Distortion>::value,
int>::type = 0>
1921 return m_distortion;
1926 typename std::enable_if<std::is_same<T, CameraIntrinsics::Distortion::K1>::value,
int>::type = 0>
1934 typename std::enable_if<std::is_same<T, CameraIntrinsics::Distortion::K2>::value,
int>::type = 0>
1942 typename std::enable_if<std::is_same<T, CameraIntrinsics::Distortion::K3>::value,
int>::type = 0>
1950 typename std::enable_if<std::is_same<T, CameraIntrinsics::Distortion::P1>::value,
int>::type = 0>
1958 typename std::enable_if<std::is_same<T, CameraIntrinsics::Distortion::P2>::value,
int>::type = 0>
1964 template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
1967 return m_cameraMatrix;
1970 template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
1973 return m_distortion;
1977 template<
typename F>
1985 template<
typename F>
2008 void save(
const std::string &fileName)
const;
2011 void load(
const std::string &fileName);
2014 void setFromString(
const std::string &value);
2016 void setFromString(
const std::string &fullPath,
const std::string &value);
2018 std::string getString(
const std::string &fullPath)
const;
2037 struct CameraIntrinsics::Version<1>
2039 using Type = CameraIntrinsics;
2046# pragma warning(pop)
2050# if !(defined(_MSC_VER) && (_MSC_VER <= 1900))
2055 struct tuple_size<
Zivid::CameraIntrinsics::CameraMatrix> : integral_constant<size_t, 4>
2059 struct tuple_element<i,
Zivid::CameraIntrinsics::CameraMatrix>
2061 static_assert(i < tuple_size<Zivid::CameraIntrinsics::CameraMatrix>::value,
"Index must be less than 4");
2064 =
decltype(declval<Zivid::CameraIntrinsics::CameraMatrix>().get<i>());
2068 struct tuple_size<
Zivid::CameraIntrinsics::Distortion> : integral_constant<size_t, 5>
2072 struct tuple_element<i,
Zivid::CameraIntrinsics::Distortion>
2074 static_assert(i < tuple_size<Zivid::CameraIntrinsics::Distortion>::value,
"Index must be less than 5");
2077 =
decltype(declval<Zivid::CameraIntrinsics::Distortion>().get<i>());
2081 struct tuple_size<
Zivid::CameraIntrinsics> : integral_constant<size_t, 2>
2085 struct tuple_element<i,
Zivid::CameraIntrinsics>
2087 static_assert(i < tuple_size<Zivid::CameraIntrinsics>::value,
"Index must be less than 2");
2090 =
decltype(declval<Zivid::CameraIntrinsics>().get<i>());
2099#if defined(__has_include) && !defined(NO_DOC)
2100# if __has_include("Zivid/CameraIntrinsicsInternal.h") && __has_include("Zivid/DataModelNodeMetaData.h")
2101# include "Zivid/CameraIntrinsicsInternal.h"
#define ZIVID_NODISCARD
Definition Attributes.h:49
#define ZIVID_CORE_EXPORT
Definition CoreExport.h:56
x coordinate of the principal point
Definition CameraIntrinsics.h:133
bool operator==(const CX &other) const
Comparison operator.
Definition CameraIntrinsics.h:173
std::string toString() const
Get the value as string.
bool operator<(const CX &other) const
Comparison operator.
Definition CameraIntrinsics.h:185
bool operator>=(const CX &other) const
Comparison operator.
Definition CameraIntrinsics.h:203
constexpr CX(double value)
Constructor.
Definition CameraIntrinsics.h:162
bool operator>(const CX &other) const
Comparison operator.
Definition CameraIntrinsics.h:191
bool operator!=(const CX &other) const
Comparison operator.
Definition CameraIntrinsics.h:179
double value() const
Get the value.
CX()=default
Default constructor.
friend std::ostream & operator<<(std::ostream &stream, const CX &value)
Operator to serialize the value to a stream.
Definition CameraIntrinsics.h:209
static constexpr Range< double > validRange()
The range of valid values for CX.
Definition CameraIntrinsics.h:153
bool operator<=(const CX &other) const
Comparison operator.
Definition CameraIntrinsics.h:197
double ValueType
The type of the underlying value.
Definition CameraIntrinsics.h:150
y coordinate of the principal point
Definition CameraIntrinsics.h:226
friend std::ostream & operator<<(std::ostream &stream, const CY &value)
Operator to serialize the value to a stream.
Definition CameraIntrinsics.h:302
double ValueType
The type of the underlying value.
Definition CameraIntrinsics.h:243
bool operator<=(const CY &other) const
Comparison operator.
Definition CameraIntrinsics.h:290
bool operator>(const CY &other) const
Comparison operator.
Definition CameraIntrinsics.h:284
double value() const
Get the value.
CY()=default
Default constructor.
static constexpr Range< double > validRange()
The range of valid values for CY.
Definition CameraIntrinsics.h:246
bool operator!=(const CY &other) const
Comparison operator.
Definition CameraIntrinsics.h:272
std::string toString() const
Get the value as string.
bool operator==(const CY &other) const
Comparison operator.
Definition CameraIntrinsics.h:266
bool operator<(const CY &other) const
Comparison operator.
Definition CameraIntrinsics.h:278
constexpr CY(double value)
Constructor.
Definition CameraIntrinsics.h:255
bool operator>=(const CY &other) const
Comparison operator.
Definition CameraIntrinsics.h:296
Focal length in x.
Definition CameraIntrinsics.h:319
static constexpr Range< double > validRange()
The range of valid values for FX.
Definition CameraIntrinsics.h:337
double value() const
Get the value.
FX()=default
Default constructor.
bool operator!=(const FX &other) const
Comparison operator.
Definition CameraIntrinsics.h:363
double ValueType
The type of the underlying value.
Definition CameraIntrinsics.h:334
constexpr FX(double value)
Constructor.
Definition CameraIntrinsics.h:346
bool operator==(const FX &other) const
Comparison operator.
Definition CameraIntrinsics.h:357
bool operator>(const FX &other) const
Comparison operator.
Definition CameraIntrinsics.h:375
bool operator<=(const FX &other) const
Comparison operator.
Definition CameraIntrinsics.h:381
bool operator>=(const FX &other) const
Comparison operator.
Definition CameraIntrinsics.h:387
friend std::ostream & operator<<(std::ostream &stream, const FX &value)
Operator to serialize the value to a stream.
Definition CameraIntrinsics.h:393
std::string toString() const
Get the value as string.
bool operator<(const FX &other) const
Comparison operator.
Definition CameraIntrinsics.h:369
Focal length in y.
Definition CameraIntrinsics.h:410
bool operator>(const FY &other) const
Comparison operator.
Definition CameraIntrinsics.h:466
bool operator!=(const FY &other) const
Comparison operator.
Definition CameraIntrinsics.h:454
bool operator==(const FY &other) const
Comparison operator.
Definition CameraIntrinsics.h:448
FY()=default
Default constructor.
static constexpr Range< double > validRange()
The range of valid values for FY.
Definition CameraIntrinsics.h:428
double value() const
Get the value.
bool operator<(const FY &other) const
Comparison operator.
Definition CameraIntrinsics.h:460
friend std::ostream & operator<<(std::ostream &stream, const FY &value)
Operator to serialize the value to a stream.
Definition CameraIntrinsics.h:484
std::string toString() const
Get the value as string.
double ValueType
The type of the underlying value.
Definition CameraIntrinsics.h:425
bool operator>=(const FY &other) const
Comparison operator.
Definition CameraIntrinsics.h:478
constexpr FY(double value)
Constructor.
Definition CameraIntrinsics.h:437
bool operator<=(const FY &other) const
Comparison operator.
Definition CameraIntrinsics.h:472
The camera matrix K (=[fx,0,cx;0,fy,cy;0,0,1])
Definition CameraIntrinsics.h:113
const FX & fx() const
Get FX.
Definition CameraIntrinsics.h:654
const CameraIntrinsics::CameraMatrix::CX & get() const
Definition CameraIntrinsics.h:694
void set(Args &&...args)
Set multiple arguments.
Definition CameraIntrinsics.h:561
CameraMatrix & set(const CY &value)
Set CY.
Definition CameraIntrinsics.h:647
const CameraIntrinsics::CameraMatrix::FX & get() const
Definition CameraIntrinsics.h:710
bool operator!=(const CameraMatrix &other) const
Inequality operator.
const CY & cy() const
Get CY.
Definition CameraIntrinsics.h:635
const CameraIntrinsics::CameraMatrix::FY & get() const
Definition CameraIntrinsics.h:718
bool operator==(const CameraMatrix &other) const
Equality operator.
std::string toString() const
Get the value as string.
friend std::ostream & operator<<(std::ostream &stream, const CameraMatrix &value)
Operator to send the value as string to a stream.
Definition CameraIntrinsics.h:777
CameraMatrix & set(const CX &value)
Set CX.
Definition CameraIntrinsics.h:628
const CameraIntrinsics::CameraMatrix::CY & get() const
Definition CameraIntrinsics.h:702
CameraMatrix & set(const FY &value)
Set FY.
Definition CameraIntrinsics.h:685
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition CameraIntrinsics.h:749
CameraMatrix & set(const FX &value)
Set FX.
Definition CameraIntrinsics.h:666
FY & fy()
Get FY.
Definition CameraIntrinsics.h:679
CameraMatrix copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition CameraIntrinsics.h:596
CX & cx()
Get CX.
Definition CameraIntrinsics.h:622
std::tuple< CameraIntrinsics::CameraMatrix::CX, CameraIntrinsics::CameraMatrix::CY, CameraIntrinsics::CameraMatrix::FX, CameraIntrinsics::CameraMatrix::FY > Descendants
Definition CameraIntrinsics.h:497
const FY & fy() const
Get FY.
Definition CameraIntrinsics.h:673
const CX & cx() const
Get CX.
Definition CameraIntrinsics.h:616
CY & cy()
Get CY.
Definition CameraIntrinsics.h:641
CameraMatrix()
Default constructor.
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition CameraIntrinsics.h:759
FX & fx()
Get FX.
Definition CameraIntrinsics.h:660
First radial distortion term.
Definition CameraIntrinsics.h:821
bool operator<(const K1 &other) const
Comparison operator.
Definition CameraIntrinsics.h:871
K1()=default
Default constructor.
bool operator!=(const K1 &other) const
Comparison operator.
Definition CameraIntrinsics.h:865
friend std::ostream & operator<<(std::ostream &stream, const K1 &value)
Operator to serialize the value to a stream.
Definition CameraIntrinsics.h:895
bool operator>(const K1 &other) const
Comparison operator.
Definition CameraIntrinsics.h:877
constexpr K1(double value)
Constructor.
Definition CameraIntrinsics.h:848
bool operator>=(const K1 &other) const
Comparison operator.
Definition CameraIntrinsics.h:889
bool operator<=(const K1 &other) const
Comparison operator.
Definition CameraIntrinsics.h:883
static constexpr Range< double > validRange()
The range of valid values for K1.
Definition CameraIntrinsics.h:839
bool operator==(const K1 &other) const
Comparison operator.
Definition CameraIntrinsics.h:859
double value() const
Get the value.
std::string toString() const
Get the value as string.
double ValueType
The type of the underlying value.
Definition CameraIntrinsics.h:836
Second radial distortion term.
Definition CameraIntrinsics.h:912
bool operator>=(const K2 &other) const
Comparison operator.
Definition CameraIntrinsics.h:980
static constexpr Range< double > validRange()
The range of valid values for K2.
Definition CameraIntrinsics.h:930
bool operator>(const K2 &other) const
Comparison operator.
Definition CameraIntrinsics.h:968
bool operator!=(const K2 &other) const
Comparison operator.
Definition CameraIntrinsics.h:956
std::string toString() const
Get the value as string.
bool operator==(const K2 &other) const
Comparison operator.
Definition CameraIntrinsics.h:950
bool operator<(const K2 &other) const
Comparison operator.
Definition CameraIntrinsics.h:962
friend std::ostream & operator<<(std::ostream &stream, const K2 &value)
Operator to serialize the value to a stream.
Definition CameraIntrinsics.h:986
K2()=default
Default constructor.
bool operator<=(const K2 &other) const
Comparison operator.
Definition CameraIntrinsics.h:974
double ValueType
The type of the underlying value.
Definition CameraIntrinsics.h:927
constexpr K2(double value)
Constructor.
Definition CameraIntrinsics.h:939
double value() const
Get the value.
Third radial distortion term.
Definition CameraIntrinsics.h:1003
bool operator<(const K3 &other) const
Comparison operator.
Definition CameraIntrinsics.h:1053
double value() const
Get the value.
static constexpr Range< double > validRange()
The range of valid values for K3.
Definition CameraIntrinsics.h:1021
K3()=default
Default constructor.
std::string toString() const
Get the value as string.
constexpr K3(double value)
Constructor.
Definition CameraIntrinsics.h:1030
bool operator>(const K3 &other) const
Comparison operator.
Definition CameraIntrinsics.h:1059
bool operator<=(const K3 &other) const
Comparison operator.
Definition CameraIntrinsics.h:1065
bool operator>=(const K3 &other) const
Comparison operator.
Definition CameraIntrinsics.h:1071
double ValueType
The type of the underlying value.
Definition CameraIntrinsics.h:1018
bool operator!=(const K3 &other) const
Comparison operator.
Definition CameraIntrinsics.h:1047
friend std::ostream & operator<<(std::ostream &stream, const K3 &value)
Operator to serialize the value to a stream.
Definition CameraIntrinsics.h:1077
bool operator==(const K3 &other) const
Comparison operator.
Definition CameraIntrinsics.h:1041
First tangential distortion term.
Definition CameraIntrinsics.h:1094
bool operator>(const P1 &other) const
Comparison operator.
Definition CameraIntrinsics.h:1150
static constexpr Range< double > validRange()
The range of valid values for P1.
Definition CameraIntrinsics.h:1112
bool operator==(const P1 &other) const
Comparison operator.
Definition CameraIntrinsics.h:1132
bool operator>=(const P1 &other) const
Comparison operator.
Definition CameraIntrinsics.h:1162
std::string toString() const
Get the value as string.
friend std::ostream & operator<<(std::ostream &stream, const P1 &value)
Operator to serialize the value to a stream.
Definition CameraIntrinsics.h:1168
bool operator<(const P1 &other) const
Comparison operator.
Definition CameraIntrinsics.h:1144
P1()=default
Default constructor.
bool operator<=(const P1 &other) const
Comparison operator.
Definition CameraIntrinsics.h:1156
double value() const
Get the value.
constexpr P1(double value)
Constructor.
Definition CameraIntrinsics.h:1121
double ValueType
The type of the underlying value.
Definition CameraIntrinsics.h:1109
bool operator!=(const P1 &other) const
Comparison operator.
Definition CameraIntrinsics.h:1138
Second tangential distortion term.
Definition CameraIntrinsics.h:1185
static constexpr Range< double > validRange()
The range of valid values for P2.
Definition CameraIntrinsics.h:1205
bool operator==(const P2 &other) const
Comparison operator.
Definition CameraIntrinsics.h:1225
friend std::ostream & operator<<(std::ostream &stream, const P2 &value)
Operator to serialize the value to a stream.
Definition CameraIntrinsics.h:1261
bool operator>(const P2 &other) const
Comparison operator.
Definition CameraIntrinsics.h:1243
constexpr P2(double value)
Constructor.
Definition CameraIntrinsics.h:1214
P2()=default
Default constructor.
double value() const
Get the value.
double ValueType
The type of the underlying value.
Definition CameraIntrinsics.h:1202
std::string toString() const
Get the value as string.
bool operator<(const P2 &other) const
Comparison operator.
Definition CameraIntrinsics.h:1237
bool operator>=(const P2 &other) const
Comparison operator.
Definition CameraIntrinsics.h:1255
bool operator<=(const P2 &other) const
Comparison operator.
Definition CameraIntrinsics.h:1249
bool operator!=(const P2 &other) const
Comparison operator.
Definition CameraIntrinsics.h:1231
The radial and tangential distortion parameters.
Definition CameraIntrinsics.h:801
const CameraIntrinsics::Distortion::K3 & get() const
Definition CameraIntrinsics.h:1510
const P2 & p2() const
Get P2.
Definition CameraIntrinsics.h:1473
std::tuple< CameraIntrinsics::Distortion::K1, CameraIntrinsics::Distortion::K2, CameraIntrinsics::Distortion::K3, CameraIntrinsics::Distortion::P1, CameraIntrinsics::Distortion::P2 > Descendants
Definition CameraIntrinsics.h:1274
K3 & k3()
Get K3.
Definition CameraIntrinsics.h:1441
const K2 & k2() const
Get K2.
Definition CameraIntrinsics.h:1416
void set(Args &&...args)
Set multiple arguments.
Definition CameraIntrinsics.h:1341
Distortion copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition CameraIntrinsics.h:1377
Distortion & set(const K2 &value)
Set K2.
Definition CameraIntrinsics.h:1428
K1 & k1()
Get K1.
Definition CameraIntrinsics.h:1403
std::string toString() const
Get the value as string.
P1 & p1()
Get P1.
Definition CameraIntrinsics.h:1460
Distortion()
Default constructor.
bool operator==(const Distortion &other) const
Equality operator.
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition CameraIntrinsics.h:1574
const CameraIntrinsics::Distortion::K2 & get() const
Definition CameraIntrinsics.h:1502
const CameraIntrinsics::Distortion::P2 & get() const
Definition CameraIntrinsics.h:1526
Distortion & set(const K3 &value)
Set K3.
Definition CameraIntrinsics.h:1447
const CameraIntrinsics::Distortion::P1 & get() const
Definition CameraIntrinsics.h:1518
bool operator!=(const Distortion &other) const
Inequality operator.
const P1 & p1() const
Get P1.
Definition CameraIntrinsics.h:1454
const K3 & k3() const
Get K3.
Definition CameraIntrinsics.h:1435
Distortion & set(const P1 &value)
Set P1.
Definition CameraIntrinsics.h:1466
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition CameraIntrinsics.h:1563
const CameraIntrinsics::Distortion::K1 & get() const
Definition CameraIntrinsics.h:1494
const K1 & k1() const
Get K1.
Definition CameraIntrinsics.h:1397
Distortion & set(const P2 &value)
Set P2.
Definition CameraIntrinsics.h:1485
Distortion & set(const K1 &value)
Set K1.
Definition CameraIntrinsics.h:1409
P2 & p2()
Get P2.
Definition CameraIntrinsics.h:1479
K2 & k2()
Get K2.
Definition CameraIntrinsics.h:1422
friend std::ostream & operator<<(std::ostream &stream, const Distortion &value)
Operator to send the value as string to a stream.
Definition CameraIntrinsics.h:1593
Information about the intrinsic parameters of the camera (OpenCV model)
Definition CameraIntrinsics.h:79
CameraIntrinsics & set(const Distortion::K3 &value)
Set Distortion::K3.
Definition CameraIntrinsics.h:1856
CameraMatrix & cameraMatrix()
Get CameraMatrix.
Definition CameraIntrinsics.h:1782
const CameraIntrinsics::CameraMatrix::CX & get() const
Definition CameraIntrinsics.h:1887
const CameraIntrinsics::Distortion::K1 & get() const
Definition CameraIntrinsics.h:1927
std::string serialize() const
Serialize to a string.
bool operator!=(const CameraIntrinsics &other) const
Inequality operator.
const CameraIntrinsics::CameraMatrix::FY & get() const
Definition CameraIntrinsics.h:1911
void forEach(const F &f) const
Run the given function on each direct member with the value of the member as parameter.
Definition CameraIntrinsics.h:1978
CameraIntrinsics(Args &&...args)
Constructor taking variadic number of arguments.
Definition CameraIntrinsics.h:1678
std::string toString() const
Get the value as string.
CameraIntrinsics & set(const Distortion::P1 &value)
Set Distortion::P1.
Definition CameraIntrinsics.h:1863
const Distortion & distortion() const
Get Distortion.
Definition CameraIntrinsics.h:1823
void set(Args &&...args)
Set multiple arguments.
Definition CameraIntrinsics.h:1715
CameraIntrinsics & set(const Distortion::K1 &value)
Set Distortion::K1.
Definition CameraIntrinsics.h:1842
const CameraIntrinsics::Distortion::K3 & get() const
Definition CameraIntrinsics.h:1943
CameraIntrinsics copyWith(Args &&...args) const
Returns a copy of this object with the given argument(s) set to the new value(s)
Definition CameraIntrinsics.h:1757
void forEach(const F &f)
Run the given function on each direct member with the value of the member as parameter.
Definition CameraIntrinsics.h:1986
CameraIntrinsics()
Default constructor.
CameraIntrinsics & set(const CameraMatrix::FY &value)
Set CameraMatrix::FY.
Definition CameraIntrinsics.h:1816
void load(const std::string &fileName)
Load from the given file.
std::tuple< CameraIntrinsics::CameraMatrix, CameraIntrinsics::CameraMatrix::CX, CameraIntrinsics::CameraMatrix::CY, CameraIntrinsics::CameraMatrix::FX, CameraIntrinsics::CameraMatrix::FY, CameraIntrinsics::Distortion, CameraIntrinsics::Distortion::K1, CameraIntrinsics::Distortion::K2, CameraIntrinsics::Distortion::K3, CameraIntrinsics::Distortion::P1, CameraIntrinsics::Distortion::P2 > Descendants
Definition CameraIntrinsics.h:1614
const CameraIntrinsics::Distortion::P1 & get() const
Definition CameraIntrinsics.h:1951
bool operator==(const CameraIntrinsics &other) const
Equality operator.
CameraIntrinsics & set(const CameraMatrix::CY &value)
Set CameraMatrix::CY.
Definition CameraIntrinsics.h:1802
static ZIVID_NODISCARD CameraIntrinsics fromSerialized(const std::string &value)
Construct a new CameraIntrinsics instance from a previously serialized string.
CameraIntrinsics(const std::string &fileName)
Construct CameraIntrinsics by loading from file.
CameraIntrinsics & set(const CameraMatrix &value)
Set CameraMatrix.
Definition CameraIntrinsics.h:1788
CameraIntrinsics & set(const Distortion::P2 &value)
Set Distortion::P2.
Definition CameraIntrinsics.h:1870
CameraIntrinsics & set(const Distortion &value)
Set Distortion.
Definition CameraIntrinsics.h:1835
const CameraIntrinsics::CameraMatrix::CY & get() const
Definition CameraIntrinsics.h:1895
CameraIntrinsics & set(const CameraMatrix::CX &value)
Set CameraMatrix::CX.
Definition CameraIntrinsics.h:1795
void save(const std::string &fileName) const
Save to the given file.
CameraIntrinsics & set(const CameraMatrix::FX &value)
Set CameraMatrix::FX.
Definition CameraIntrinsics.h:1809
const CameraIntrinsics::CameraMatrix & get() const
Definition CameraIntrinsics.h:1879
const CameraIntrinsics::Distortion::K2 & get() const
Definition CameraIntrinsics.h:1935
const CameraMatrix & cameraMatrix() const
Get CameraMatrix.
Definition CameraIntrinsics.h:1776
const CameraIntrinsics::Distortion::P2 & get() const
Definition CameraIntrinsics.h:1959
const CameraIntrinsics::Distortion & get() const
Definition CameraIntrinsics.h:1919
friend std::ostream & operator<<(std::ostream &stream, const CameraIntrinsics &value)
Operator to send the value as string to a stream.
Definition CameraIntrinsics.h:2002
const CameraIntrinsics::CameraMatrix::FX & get() const
Definition CameraIntrinsics.h:1903
Distortion & distortion()
Get Distortion.
Definition CameraIntrinsics.h:1829
CameraIntrinsics & set(const Distortion::K2 &value)
Set Distortion::K2.
Definition CameraIntrinsics.h:1849
Class describing a range of values for a given type T.
Definition Range.h:73
NodeType
Definition NodeType.h:55
The main Zivid namespace. All Zivid code is found here.
Definition Application.h:56