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::Distortion Class Reference

The radial and tangential distortion parameters More...

#include <Zivid/CameraIntrinsics.h>

Classes

class  K1
 First radial distortion term More...
 
class  K2
 Second radial distortion term More...
 
class  K3
 Third radial distortion term More...
 
class  P1
 First tangential distortion term More...
 
class  P2
 Second tangential distortion term More...
 

Public Member Functions

 Distortion ()=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::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::Distortion::K1get () const
 
template<size_t i, typename std::enable_if< i==1, int >::type = 0>
const CameraIntrinsics::Distortion::K2get () const
 
template<size_t i, typename std::enable_if< i==2, int >::type = 0>
const CameraIntrinsics::Distortion::K3get () const
 
template<size_t i, typename std::enable_if< i==3, int >::type = 0>
const CameraIntrinsics::Distortion::P1get () const
 
template<size_t i, typename std::enable_if< i==4, int >::type = 0>
const CameraIntrinsics::Distortion::P2get () const
 
 Distortion (const K1 &k1, const K2 &k2, const K3 &k3, const P1 &p1, const P2 &p2)
 Constructor More...
 
Distortionset (const K1 &value)
 Set K1 More...
 
const K1k1 () const
 Get K1 More...
 
Distortionset (const K2 &value)
 Set K2 More...
 
const K2k2 () const
 Get K2 More...
 
Distortionset (const K3 &value)
 Set K3 More...
 
const K3k3 () const
 Get K3 More...
 
Distortionset (const P1 &value)
 Set P1 More...
 
const P1p1 () const
 Get P1 More...
 
Distortionset (const P2 &value)
 Set P2 More...
 
const P2p2 () const
 Get 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 Distortion &other) const
 Equality operator More...
 
bool operator!= (const Distortion &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 { "Distortion" }
 The full path for this value More...
 
static constexpr const char * name { "Distortion" }
 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 Distortion &value)
 Operator to send the value as string to a stream More...
 
std::istream & operator>> (std::istream &stream, Distortion &value)
 Operator to set the value from a stream More...
 

Detailed Description

The radial and tangential distortion parameters

Constructor & Destructor Documentation

◆ Distortion() [1/2]

Zivid::CameraIntrinsics::Distortion::Distortion ( )
default

Default constructor

◆ Distortion() [2/2]

Zivid::CameraIntrinsics::Distortion::Distortion ( const K1 k1,
const K2 k2,
const K3 k3,
const P1 p1,
const P2 p2 
)
explicit

Constructor

Member Function Documentation

◆ forEach() [1/2]

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

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

◆ get() [1/10]

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

◆ get() [2/10]

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

◆ get() [3/10]

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

◆ get() [4/10]

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

◆ get() [5/10]

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

◆ get() [6/10]

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

◆ get() [7/10]

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

◆ get() [8/10]

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

◆ get() [9/10]

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

◆ get() [10/10]

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

◆ getString()

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

Get a value as string by specifying the path

◆ k1()

const K1& Zivid::CameraIntrinsics::Distortion::k1 ( ) const
inline

Get K1

◆ k2()

const K2& Zivid::CameraIntrinsics::Distortion::k2 ( ) const
inline

Get K2

◆ k3()

const K3& Zivid::CameraIntrinsics::Distortion::k3 ( ) const
inline

Get K3

◆ operator!=()

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

Inequality operator

◆ operator==()

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

Equality operator

◆ p1()

const P1& Zivid::CameraIntrinsics::Distortion::p1 ( ) const
inline

Get P1

◆ p2()

const P2& Zivid::CameraIntrinsics::Distortion::p2 ( ) const
inline

Get P2

◆ set() [1/6]

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

Set K1

◆ set() [2/6]

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

Set K2

◆ set() [3/6]

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

Set K3

◆ set() [4/6]

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

Set P1

◆ set() [5/6]

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

Set P2

◆ set() [6/6]

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

Set a value from string by specifying the path

◆ setFromString()

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

Set from the given string

◆ toString()

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

Get the value as string

◆ traverseValues() [1/2]

template<typename F >
void Zivid::CameraIntrinsics::Distortion::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::Distortion::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 Distortion value 
)
friend

Operator to send the value as string to a stream

◆ operator>>

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

Operator to set the value from a stream

Member Data Documentation

◆ description

constexpr const char* Zivid::CameraIntrinsics::Distortion::description
staticconstexpr
Initial value:
{
R"description(The radial and tangential distortion parameters)description"
}

The description for this value

◆ isContainer

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

Whether this node contains child values

◆ name

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

The name of this value

◆ path

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

The full path for this value


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