Zivid C++ API  1.4.0+956f554d-12
Defining the Future of 3D Machine Vision
Classes | Public Member Functions | Static Public Attributes | Friends | List of all members
Zivid::CameraIntrinsics Class Reference

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...
 
struct  Version
 
struct  Version< 1 >
 

Public Member Functions

 ~CameraIntrinsics ()
 Destructor More...
 
 CameraIntrinsics (const CameraIntrinsics &other)
 Copy constructor More...
 
CameraIntrinsicsoperator= (const CameraIntrinsics &other)
 Assignment operator More...
 
 CameraIntrinsics (CameraIntrinsics &&other) noexcept
 Move constructor More...
 
CameraIntrinsicsoperator= (CameraIntrinsics &&other) noexcept
 Move assignment operator More...
 
 CameraIntrinsics ()=default
 Default constructor More...
 
void set (const std::string &fullPath, const std::string &value)
 Set a value from string by specifying the path More...
 
std::string getString (const std::string &fullPath) const
 Get a value as string by specifying the path More...
 
template<typename T , typename std::enable_if< std::is_same< T, CameraIntrinsics::CameraMatrix >::value, int >::type = 0>
const CameraIntrinsics::CameraMatrixget () const
 
template<typename T , typename std::enable_if< std::is_same< T, CameraIntrinsics::CameraMatrix::CX >::value, int >::type = 0>
const CameraIntrinsics::CameraMatrix::CXget () const
 
template<typename T , typename std::enable_if< std::is_same< T, CameraIntrinsics::CameraMatrix::CY >::value, int >::type = 0>
const CameraIntrinsics::CameraMatrix::CYget () const
 
template<typename T , typename std::enable_if< std::is_same< T, CameraIntrinsics::CameraMatrix::FX >::value, int >::type = 0>
const CameraIntrinsics::CameraMatrix::FXget () const
 
template<typename T , typename std::enable_if< std::is_same< T, CameraIntrinsics::CameraMatrix::FY >::value, int >::type = 0>
const CameraIntrinsics::CameraMatrix::FYget () const
 
template<typename T , typename std::enable_if< std::is_same< T, CameraIntrinsics::Distortion >::value, int >::type = 0>
const CameraIntrinsics::Distortionget () const
 
template<typename T , typename std::enable_if< std::is_same< T, CameraIntrinsics::Distortion::K1 >::value, int >::type = 0>
const CameraIntrinsics::Distortion::K1get () const
 
template<typename T , typename std::enable_if< std::is_same< T, CameraIntrinsics::Distortion::K2 >::value, int >::type = 0>
const CameraIntrinsics::Distortion::K2get () const
 
template<typename T , typename std::enable_if< std::is_same< T, CameraIntrinsics::Distortion::K3 >::value, int >::type = 0>
const CameraIntrinsics::Distortion::K3get () const
 
template<typename T , typename std::enable_if< std::is_same< T, CameraIntrinsics::Distortion::P1 >::value, int >::type = 0>
const CameraIntrinsics::Distortion::P1get () const
 
template<typename T , typename std::enable_if< std::is_same< T, CameraIntrinsics::Distortion::P2 >::value, int >::type = 0>
const CameraIntrinsics::Distortion::P2get () const
 
template<size_t i, typename std::enable_if< i==0, int >::type = 0>
const CameraIntrinsics::CameraMatrixget () const
 
template<size_t i, typename std::enable_if< i==1, int >::type = 0>
const CameraIntrinsics::Distortionget () const
 
 CameraIntrinsics (const CameraMatrix &cameraMatrix, const Distortion &distortion)
 Constructor More...
 
CameraIntrinsicsset (const CameraMatrix &value)
 Set CameraMatrix More...
 
const CameraMatrixcameraMatrix () const
 Get CameraMatrix More...
 
CameraIntrinsicsset (const CameraMatrix::CX &value)
 Set CameraMatrix::CX More...
 
CameraIntrinsicsset (const CameraMatrix::CY &value)
 Set CameraMatrix::CY More...
 
CameraIntrinsicsset (const CameraMatrix::FX &value)
 Set CameraMatrix::FX More...
 
CameraIntrinsicsset (const CameraMatrix::FY &value)
 Set CameraMatrix::FY More...
 
CameraIntrinsicsset (const Distortion &value)
 Set Distortion More...
 
const Distortiondistortion () const
 Get Distortion More...
 
CameraIntrinsicsset (const Distortion::K1 &value)
 Set Distortion::K1 More...
 
CameraIntrinsicsset (const Distortion::K2 &value)
 Set Distortion::K2 More...
 
CameraIntrinsicsset (const Distortion::K3 &value)
 Set Distortion::K3 More...
 
CameraIntrinsicsset (const Distortion::P1 &value)
 Set Distortion::P1 More...
 
CameraIntrinsicsset (const Distortion::P2 &value)
 Set Distortion::P2 More...
 
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 More...
 
template<typename F >
void forEach (const F &f)
 Run the given function on each direct member with the value of the member as parameter More...
 
template<typename F >
void traverseValues (const F &f) const
 Traverse the entire tree using the given function with the value of the member as parameter More...
 
template<typename F >
void traverseValues (const F &f)
 Traverse all members using the given function with the value of the member as parameter More...
 
std::string toString () const
 Get the value as string More...
 
void setFromString (const std::string &value)
 Set from the given string More...
 
bool operator== (const CameraIntrinsics &other) const
 Equality operator More...
 
bool operator!= (const CameraIntrinsics &other) const
 Inequality operator More...
 
 CameraIntrinsics (const std::string &fileName)
 Construct object by loading from file More...
 
void save (const std::string &fileName) const
 Save to the given file More...
 
void load (const std::string &fileName)
 Load from the given file More...
 

Static Public Attributes

static constexpr size_t version { 1 }
 
static constexpr bool isContainer { true }
 Whether this node contains child values More...
 
static constexpr const char * path { "" }
 The full path for this value More...
 
static constexpr const char * name { "CameraIntrinsics" }
 The name of this value More...
 
static constexpr const char * description
 The description for this value More...
 

Friends

std::ostream & operator<< (std::ostream &stream, const CameraIntrinsics &value)
 Operator to send the value as string to a stream More...
 
std::istream & operator>> (std::istream &stream, CameraIntrinsics &value)
 Operator to set the value from a stream More...
 

Detailed Description

Information about the intrinsic parameters of the camera (OpenCV model)

Constructor & Destructor Documentation

◆ ~CameraIntrinsics()

Zivid::CameraIntrinsics::~CameraIntrinsics ( )

Destructor

◆ CameraIntrinsics() [1/5]

Zivid::CameraIntrinsics::CameraIntrinsics ( const CameraIntrinsics other)

Copy constructor

◆ CameraIntrinsics() [2/5]

Zivid::CameraIntrinsics::CameraIntrinsics ( CameraIntrinsics &&  other)
noexcept

Move constructor

◆ CameraIntrinsics() [3/5]

Zivid::CameraIntrinsics::CameraIntrinsics ( )
default

Default constructor

◆ CameraIntrinsics() [4/5]

Zivid::CameraIntrinsics::CameraIntrinsics ( const CameraMatrix cameraMatrix,
const Distortion distortion 
)
explicit

Constructor

◆ CameraIntrinsics() [5/5]

Zivid::CameraIntrinsics::CameraIntrinsics ( const std::string &  fileName)
explicit

Construct object by loading from file

Member Function Documentation

◆ cameraMatrix()

const CameraMatrix& Zivid::CameraIntrinsics::cameraMatrix ( ) const
inline

◆ distortion()

const Distortion& Zivid::CameraIntrinsics::distortion ( ) const
inline

◆ forEach() [1/2]

template<typename F >
void Zivid::CameraIntrinsics::forEach ( const F &  f) const
inline

Run the given function on each direct member with the value of the member as parameter

◆ forEach() [2/2]

template<typename F >
void Zivid::CameraIntrinsics::forEach ( const F &  f)
inline

Run the given function on each direct member with the value of the member as parameter

◆ get() [1/13]

template<typename T , typename std::enable_if< std::is_same< T, CameraIntrinsics::CameraMatrix >::value, int >::type = 0>
const CameraIntrinsics::CameraMatrix& Zivid::CameraIntrinsics::get ( ) const
inline

◆ get() [2/13]

template<typename T , typename std::enable_if< std::is_same< T, CameraIntrinsics::CameraMatrix::CX >::value, int >::type = 0>
const CameraIntrinsics::CameraMatrix::CX& Zivid::CameraIntrinsics::get ( ) const
inline

◆ get() [3/13]

template<typename T , typename std::enable_if< std::is_same< T, CameraIntrinsics::CameraMatrix::CY >::value, int >::type = 0>
const CameraIntrinsics::CameraMatrix::CY& Zivid::CameraIntrinsics::get ( ) const
inline

◆ get() [4/13]

template<typename T , typename std::enable_if< std::is_same< T, CameraIntrinsics::CameraMatrix::FX >::value, int >::type = 0>
const CameraIntrinsics::CameraMatrix::FX& Zivid::CameraIntrinsics::get ( ) const
inline

◆ get() [5/13]

template<typename T , typename std::enable_if< std::is_same< T, CameraIntrinsics::CameraMatrix::FY >::value, int >::type = 0>
const CameraIntrinsics::CameraMatrix::FY& Zivid::CameraIntrinsics::get ( ) const
inline

◆ get() [6/13]

template<typename T , typename std::enable_if< std::is_same< T, CameraIntrinsics::Distortion >::value, int >::type = 0>
const CameraIntrinsics::Distortion& Zivid::CameraIntrinsics::get ( ) const
inline

◆ get() [7/13]

template<typename T , typename std::enable_if< std::is_same< T, CameraIntrinsics::Distortion::K1 >::value, int >::type = 0>
const CameraIntrinsics::Distortion::K1& Zivid::CameraIntrinsics::get ( ) const
inline

◆ get() [8/13]

template<typename T , typename std::enable_if< std::is_same< T, CameraIntrinsics::Distortion::K2 >::value, int >::type = 0>
const CameraIntrinsics::Distortion::K2& Zivid::CameraIntrinsics::get ( ) const
inline

◆ get() [9/13]

template<typename T , typename std::enable_if< std::is_same< T, CameraIntrinsics::Distortion::K3 >::value, int >::type = 0>
const CameraIntrinsics::Distortion::K3& Zivid::CameraIntrinsics::get ( ) const
inline

◆ get() [10/13]

template<typename T , typename std::enable_if< std::is_same< T, CameraIntrinsics::Distortion::P1 >::value, int >::type = 0>
const CameraIntrinsics::Distortion::P1& Zivid::CameraIntrinsics::get ( ) const
inline

◆ get() [11/13]

template<typename T , typename std::enable_if< std::is_same< T, CameraIntrinsics::Distortion::P2 >::value, int >::type = 0>
const CameraIntrinsics::Distortion::P2& Zivid::CameraIntrinsics::get ( ) const
inline

◆ get() [12/13]

template<size_t i, typename std::enable_if< i==0, int >::type = 0>
const CameraIntrinsics::CameraMatrix& Zivid::CameraIntrinsics::get ( ) const
inline

◆ get() [13/13]

template<size_t i, typename std::enable_if< i==1, int >::type = 0>
const CameraIntrinsics::Distortion& Zivid::CameraIntrinsics::get ( ) const
inline

◆ getString()

std::string Zivid::CameraIntrinsics::getString ( const std::string &  fullPath) const

Get a value as string by specifying the path

◆ load()

void Zivid::CameraIntrinsics::load ( const std::string &  fileName)

Load from the given file

◆ operator!=()

bool Zivid::CameraIntrinsics::operator!= ( const CameraIntrinsics other) const

Inequality operator

◆ operator=() [1/2]

CameraIntrinsics& Zivid::CameraIntrinsics::operator= ( const CameraIntrinsics other)

Assignment operator

◆ operator=() [2/2]

CameraIntrinsics& Zivid::CameraIntrinsics::operator= ( CameraIntrinsics &&  other)
noexcept

Move assignment operator

◆ operator==()

bool Zivid::CameraIntrinsics::operator== ( const CameraIntrinsics other) const

Equality operator

◆ save()

void Zivid::CameraIntrinsics::save ( const std::string &  fileName) const

Save to the given file

◆ set() [1/12]

void Zivid::CameraIntrinsics::set ( const std::string &  fullPath,
const std::string &  value 
)

Set a value from string by specifying the path

◆ set() [2/12]

CameraIntrinsics& Zivid::CameraIntrinsics::set ( const CameraMatrix value)
inline

◆ set() [3/12]

CameraIntrinsics& Zivid::CameraIntrinsics::set ( const CameraMatrix::CX value)
inline

◆ set() [4/12]

CameraIntrinsics& Zivid::CameraIntrinsics::set ( const CameraMatrix::CY value)
inline

◆ set() [5/12]

CameraIntrinsics& Zivid::CameraIntrinsics::set ( const CameraMatrix::FX value)
inline

◆ set() [6/12]

CameraIntrinsics& Zivid::CameraIntrinsics::set ( const CameraMatrix::FY value)
inline

◆ set() [7/12]

CameraIntrinsics& Zivid::CameraIntrinsics::set ( const Distortion value)
inline

◆ set() [8/12]

CameraIntrinsics& Zivid::CameraIntrinsics::set ( const Distortion::K1 value)
inline

◆ set() [9/12]

CameraIntrinsics& Zivid::CameraIntrinsics::set ( const Distortion::K2 value)
inline

◆ set() [10/12]

CameraIntrinsics& Zivid::CameraIntrinsics::set ( const Distortion::K3 value)
inline

◆ set() [11/12]

CameraIntrinsics& Zivid::CameraIntrinsics::set ( const Distortion::P1 value)
inline

◆ set() [12/12]

CameraIntrinsics& Zivid::CameraIntrinsics::set ( const Distortion::P2 value)
inline

◆ setFromString()

void Zivid::CameraIntrinsics::setFromString ( const std::string &  value)

Set from the given string

◆ toString()

std::string Zivid::CameraIntrinsics::toString ( ) const

Get the value as string

◆ traverseValues() [1/2]

template<typename F >
void Zivid::CameraIntrinsics::traverseValues ( const F &  f) const
inline

Traverse the entire tree using the given function with the value of the member as parameter

◆ traverseValues() [2/2]

template<typename F >
void Zivid::CameraIntrinsics::traverseValues ( const F &  f)
inline

Traverse all members using the given function with the value of the member as parameter

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  stream,
const CameraIntrinsics value 
)
friend

Operator to send the value as string to a stream

◆ operator>>

std::istream& operator>> ( std::istream &  stream,
CameraIntrinsics value 
)
friend

Operator to set the value from a stream

Member Data Documentation

◆ description

constexpr const char* Zivid::CameraIntrinsics::description
static
Initial value:
{
R"description(Information about the intrinsic parameters of the camera (OpenCV model))description"
}

The description for this value

◆ isContainer

constexpr bool Zivid::CameraIntrinsics::isContainer { true }
static

Whether this node contains child values

◆ name

constexpr const char* Zivid::CameraIntrinsics::name { "CameraIntrinsics" }
static

The name of this value

◆ path

constexpr const char* Zivid::CameraIntrinsics::path { "" }
static

The full path for this value

◆ version

constexpr size_t Zivid::CameraIntrinsics::version { 1 }
static

The documentation for this class was generated from the following file: