Zivid C++ API  1.8.1+6967bc1b-1
Defining the Future of 3D Machine Vision
Classes | Public Member Functions | Static Public Attributes | Friends | List of all members
Zivid::CameraIntrinsics::CameraMatrix Class Reference

The camera matrix K (=[fx,0,cx;0,fy,cy;0,0,1]) More...

#include <Zivid/CameraIntrinsics.h>

Classes

class  CX
 x coordinate of the principal point More...
 
class  CY
 y coordinate of the principal point More...
 
class  FX
 Focal length in x More...
 
class  FY
 Focal length in y More...
 

Public Member Functions

 CameraMatrix ()=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::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<size_t i, typename std::enable_if< i==0, int >::type = 0>
const CameraIntrinsics::CameraMatrix::CXget () const
 
template<size_t i, typename std::enable_if< i==1, int >::type = 0>
const CameraIntrinsics::CameraMatrix::CYget () const
 
template<size_t i, typename std::enable_if< i==2, int >::type = 0>
const CameraIntrinsics::CameraMatrix::FXget () const
 
template<size_t i, typename std::enable_if< i==3, int >::type = 0>
const CameraIntrinsics::CameraMatrix::FYget () const
 
 CameraMatrix (const CX &cx, const CY &cy, const FX &fx, const FY &fy)
 Constructor More...
 
CameraMatrixset (const CX &value)
 Set CX More...
 
const CXcx () const
 Get CX More...
 
CameraMatrixset (const CY &value)
 Set CY More...
 
const CYcy () const
 Get CY More...
 
CameraMatrixset (const FX &value)
 Set FX More...
 
const FXfx () const
 Get FX More...
 
CameraMatrixset (const FY &value)
 Set FY More...
 
const FYfy () const
 Get FY 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 CameraMatrix &other) const
 Equality operator More...
 
bool operator!= (const CameraMatrix &other) const
 Inequality operator More...
 

Static Public Attributes

static constexpr bool isContainer { true }
 Whether this node contains child values More...
 
static constexpr const char * path { "CameraMatrix" }
 The full path for this value More...
 
static constexpr const char * name { "CameraMatrix" }
 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 CameraMatrix &value)
 Operator to send the value as string to a stream More...
 
std::istream & operator>> (std::istream &stream, CameraMatrix &value)
 Operator to set the value from a stream More...
 

Detailed Description

The camera matrix K (=[fx,0,cx;0,fy,cy;0,0,1])

Constructor & Destructor Documentation

◆ CameraMatrix() [1/2]

Zivid::CameraIntrinsics::CameraMatrix::CameraMatrix ( )
default

Default constructor

◆ CameraMatrix() [2/2]

Zivid::CameraIntrinsics::CameraMatrix::CameraMatrix ( const CX cx,
const CY cy,
const FX fx,
const FY fy 
)
explicit

Constructor

Member Function Documentation

◆ cx()

const CX& Zivid::CameraIntrinsics::CameraMatrix::cx ( ) const
inline

Get CX

◆ cy()

const CY& Zivid::CameraIntrinsics::CameraMatrix::cy ( ) const
inline

Get CY

◆ forEach() [1/2]

template<typename F >
void Zivid::CameraIntrinsics::CameraMatrix::forEach ( const F &  f)
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::CameraMatrix::forEach ( const F &  f) const
inline

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

◆ fx()

const FX& Zivid::CameraIntrinsics::CameraMatrix::fx ( ) const
inline

Get FX

◆ fy()

const FY& Zivid::CameraIntrinsics::CameraMatrix::fy ( ) const
inline

Get FY

◆ get() [1/8]

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

◆ get() [2/8]

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

◆ get() [3/8]

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

◆ get() [4/8]

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

◆ get() [5/8]

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

◆ get() [6/8]

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

◆ get() [7/8]

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

◆ get() [8/8]

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

◆ getString()

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

Get a value as string by specifying the path

◆ operator!=()

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

Inequality operator

◆ operator==()

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

Equality operator

◆ set() [1/5]

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

Set CX

◆ set() [2/5]

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

Set CY

◆ set() [3/5]

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

Set FX

◆ set() [4/5]

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

Set FY

◆ set() [5/5]

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

Set a value from string by specifying the path

◆ setFromString()

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

Set from the given string

◆ toString()

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

Get the value as string

◆ traverseValues() [1/2]

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

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

◆ traverseValues() [2/2]

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

Traverse the entire tree 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 CameraMatrix value 
)
friend

Operator to send the value as string to a stream

◆ operator>>

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

Operator to set the value from a stream

Member Data Documentation

◆ description

constexpr const char* Zivid::CameraIntrinsics::CameraMatrix::description
staticconstexpr
Initial value:
{
R"description(The camera matrix K (=[fx,0,cx;0,fy,cy;0,0,1]))description"
}

The description for this value

◆ isContainer

constexpr bool Zivid::CameraIntrinsics::CameraMatrix::isContainer { true }
staticconstexpr

Whether this node contains child values

◆ name

constexpr const char* Zivid::CameraIntrinsics::CameraMatrix::name { "CameraMatrix" }
staticconstexpr

The name of this value

◆ path

constexpr const char* Zivid::CameraIntrinsics::CameraMatrix::path { "CameraMatrix" }
staticconstexpr

The full path for this value


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