Zivid C++ API 2.13.1+18e79e79-1
|
Information about the intrinsic parameters of the camera (OpenCV model) More...
#include <Zivid/CameraIntrinsics.h>
Classes | |
class | CameraMatrix |
The camera matrix K (=[fx,0,cx;0,fy,cy;0,0,1]) More... | |
class | Distortion |
The radial and tangential distortion parameters. More... | |
Public Types | |
using | Descendants |
Public Member Functions | |
CameraIntrinsics () | |
Default constructor. | |
CameraIntrinsics (const std::string &fileName) | |
Construct CameraIntrinsics by loading from file. | |
std::string | serialize () const |
Serialize to a string. | |
template<typename... Args> | |
CameraIntrinsics (Args &&...args) | |
Constructor taking variadic number of arguments. | |
template<typename... Args> | |
void | set (Args &&...args) |
Set multiple arguments. | |
template<typename... Args> | |
CameraIntrinsics | copyWith (Args &&...args) const |
Returns a copy of this object with the given argument(s) set to the new value(s) | |
const CameraMatrix & | cameraMatrix () const |
Get CameraMatrix. | |
CameraMatrix & | cameraMatrix () |
Get CameraMatrix. | |
CameraIntrinsics & | set (const CameraMatrix &value) |
Set CameraMatrix. | |
CameraIntrinsics & | set (const CameraMatrix::CX &value) |
Set CameraMatrix::CX. | |
CameraIntrinsics & | set (const CameraMatrix::CY &value) |
Set CameraMatrix::CY. | |
CameraIntrinsics & | set (const CameraMatrix::FX &value) |
Set CameraMatrix::FX. | |
CameraIntrinsics & | set (const CameraMatrix::FY &value) |
Set CameraMatrix::FY. | |
const Distortion & | distortion () const |
Get Distortion. | |
Distortion & | distortion () |
Get Distortion. | |
CameraIntrinsics & | set (const Distortion &value) |
Set Distortion. | |
CameraIntrinsics & | set (const Distortion::K1 &value) |
Set Distortion::K1. | |
CameraIntrinsics & | set (const Distortion::K2 &value) |
Set Distortion::K2. | |
CameraIntrinsics & | set (const Distortion::K3 &value) |
Set Distortion::K3. | |
CameraIntrinsics & | set (const Distortion::P1 &value) |
Set Distortion::P1. | |
CameraIntrinsics & | set (const Distortion::P2 &value) |
Set Distortion::P2. | |
template<typename T , typename std::enable_if< std::is_same< T, CameraIntrinsics::CameraMatrix >::value, int >::type = 0> | |
const CameraIntrinsics::CameraMatrix & | get () const |
template<typename T , typename std::enable_if< std::is_same< T, CameraIntrinsics::CameraMatrix::CX >::value, int >::type = 0> | |
const CameraIntrinsics::CameraMatrix::CX & | get () const |
template<typename T , typename std::enable_if< std::is_same< T, CameraIntrinsics::CameraMatrix::CY >::value, int >::type = 0> | |
const CameraIntrinsics::CameraMatrix::CY & | get () const |
template<typename T , typename std::enable_if< std::is_same< T, CameraIntrinsics::CameraMatrix::FX >::value, int >::type = 0> | |
const CameraIntrinsics::CameraMatrix::FX & | get () const |
template<typename T , typename std::enable_if< std::is_same< T, CameraIntrinsics::CameraMatrix::FY >::value, int >::type = 0> | |
const CameraIntrinsics::CameraMatrix::FY & | get () const |
template<typename T , typename std::enable_if< std::is_same< T, CameraIntrinsics::Distortion >::value, int >::type = 0> | |
const CameraIntrinsics::Distortion & | get () const |
template<typename T , typename std::enable_if< std::is_same< T, CameraIntrinsics::Distortion::K1 >::value, int >::type = 0> | |
const CameraIntrinsics::Distortion::K1 & | get () const |
template<typename T , typename std::enable_if< std::is_same< T, CameraIntrinsics::Distortion::K2 >::value, int >::type = 0> | |
const CameraIntrinsics::Distortion::K2 & | get () const |
template<typename T , typename std::enable_if< std::is_same< T, CameraIntrinsics::Distortion::K3 >::value, int >::type = 0> | |
const CameraIntrinsics::Distortion::K3 & | get () const |
template<typename T , typename std::enable_if< std::is_same< T, CameraIntrinsics::Distortion::P1 >::value, int >::type = 0> | |
const CameraIntrinsics::Distortion::P1 & | get () const |
template<typename T , typename std::enable_if< std::is_same< T, CameraIntrinsics::Distortion::P2 >::value, int >::type = 0> | |
const CameraIntrinsics::Distortion::P2 & | get () const |
template<size_t i, typename std::enable_if< i==0, int >::type = 0> | |
const CameraIntrinsics::CameraMatrix & | get () const |
template<size_t i, typename std::enable_if< i==1, int >::type = 0> | |
const CameraIntrinsics::Distortion & | get () const |
template<typename F > | |
void | forEach (const F &f) const |
Run the given function on each direct member with the value of the member as parameter. | |
template<typename F > | |
void | forEach (const F &f) |
Run the given function on each direct member with the value of the member as parameter. | |
bool | operator== (const CameraIntrinsics &other) const |
Equality operator. | |
bool | operator!= (const CameraIntrinsics &other) const |
Inequality operator. | |
std::string | toString () const |
Get the value as string. | |
void | save (const std::string &fileName) const |
Save to the given file. | |
void | load (const std::string &fileName) |
Load from the given file. | |
Static Public Member Functions | |
static ZIVID_NODISCARD CameraIntrinsics | fromSerialized (const std::string &value) |
Construct a new CameraIntrinsics instance from a previously serialized string. | |
Static Public Attributes | |
static constexpr DataModel::NodeType | nodeType = DataModel::NodeType::group |
The type of this node. | |
static constexpr const char * | path { "" } |
The full path for this value. | |
static constexpr const char * | name { "CameraIntrinsics" } |
The name of this value. | |
static constexpr const char * | description |
The description for this value. | |
static constexpr size_t | version { 1 } |
Friends | |
struct | DataModel::Detail::Befriend< CameraIntrinsics > |
std::ostream & | operator<< (std::ostream &stream, const CameraIntrinsics &value) |
Operator to send the value as string to a stream. | |
Information about the intrinsic parameters of the camera (OpenCV model)
Zivid::CameraIntrinsics::CameraIntrinsics | ( | ) |
Default constructor.
|
explicit |
Construct CameraIntrinsics by loading from file.
|
inlineexplicit |
Constructor taking variadic number of arguments.
One or more descendant types can be provided. All types not provided will be set to their default value. The result is the same as default constructing CameraIntrinsics
then invoking set(args)
.
The provided arguments must be descendants of CameraIntrinsics
. These types can be provided:
|
inline |
Get CameraMatrix.
|
inline |
Get CameraMatrix.
|
inline |
Returns a copy of this object with the given argument(s) set to the new value(s)
Creates a copy of this CameraIntrinsics object, then invokes set(args)
on the copy, and finally returns the copy. This method does not modify the original object.
The provided arguments must be descendants of CameraIntrinsics
. These types can be provided:
|
inline |
Get Distortion.
|
inline |
Get Distortion.
|
inline |
Run the given function on each direct member with the value of the member as parameter.
|
inline |
Run the given function on each direct member with the value of the member as parameter.
|
static |
Construct a new CameraIntrinsics instance from a previously serialized string.
See also serialize.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void Zivid::CameraIntrinsics::load | ( | const std::string & | fileName | ) |
Load from the given file.
bool Zivid::CameraIntrinsics::operator!= | ( | const CameraIntrinsics & | other | ) | const |
Inequality operator.
bool Zivid::CameraIntrinsics::operator== | ( | const CameraIntrinsics & | other | ) | const |
Equality operator.
void Zivid::CameraIntrinsics::save | ( | const std::string & | fileName | ) | const |
Save to the given file.
std::string Zivid::CameraIntrinsics::serialize | ( | ) | const |
Serialize to a string.
See also fromSerialized. The returned string is formatted in YAML, and is compatible with the contents of files saved using save.
|
inline |
Set multiple arguments.
The method invokes set(arg)
with each of the provided arguments.
The provided arguments must be descendants of CameraIntrinsics
. These types can be provided:
|
inline |
Set CameraMatrix.
|
inline |
Set CameraMatrix::CX.
|
inline |
Set CameraMatrix::CY.
|
inline |
Set CameraMatrix::FX.
|
inline |
Set CameraMatrix::FY.
|
inline |
Set Distortion.
|
inline |
Set Distortion::K1.
|
inline |
Set Distortion::K2.
|
inline |
Set Distortion::K3.
|
inline |
Set Distortion::P1.
|
inline |
Set Distortion::P2.
std::string Zivid::CameraIntrinsics::toString | ( | ) | const |
Get the value as string.
|
friend |
|
friend |
Operator to send the value as string to a stream.
|
staticconstexpr |
The description for this value.
|
staticconstexpr |
The name of this value.
|
staticconstexpr |
The type of this node.
|
staticconstexpr |
The full path for this value.
|
staticconstexpr |