Zivid C++ API 2.9.0+4dbba385-1
Defining the Future of 3D Machine Vision
Classes | Public Types | 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...
 

Public Types

using Descendants = 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 >
 

Public Member Functions

 CameraIntrinsics ()
 Default constructor More...
 
 CameraIntrinsics (const std::string &fileName)
 Construct CameraIntrinsics by loading from file More...
 
template<typename... Args>
 CameraIntrinsics (Args &&...args)
 Constructor taking variadic number of arguments More...
 
template<typename... Args>
void set (Args &&...args)
 Set multiple arguments More...
 
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) More...
 
const CameraMatrixcameraMatrix () const
 Get CameraMatrix More...
 
CameraMatrixcameraMatrix ()
 Get CameraMatrix More...
 
CameraIntrinsicsset (const CameraMatrix &value)
 Set 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...
 
const Distortiondistortion () const
 Get Distortion More...
 
Distortiondistortion ()
 Get Distortion More...
 
CameraIntrinsicsset (const Distortion &value)
 Set 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 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
 
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...
 
bool operator== (const CameraIntrinsics &other) const
 Equality operator More...
 
bool operator!= (const CameraIntrinsics &other) const
 Inequality operator More...
 
std::string toString () const
 Get the value as string 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 DataModel::NodeType nodeType = DataModel::NodeType::group
 The type of this node 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...
 
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 More...
 

Detailed Description

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

Member Typedef Documentation

◆ Descendants

Constructor & Destructor Documentation

◆ CameraIntrinsics() [1/3]

Zivid::CameraIntrinsics::CameraIntrinsics ( )

Default constructor

◆ CameraIntrinsics() [2/3]

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

Construct CameraIntrinsics by loading from file

◆ CameraIntrinsics() [3/3]

template<typename... Args>
Zivid::CameraIntrinsics::CameraIntrinsics ( Args &&...  args)
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:

Member Function Documentation

◆ cameraMatrix() [1/2]

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

◆ cameraMatrix() [2/2]

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

◆ copyWith()

template<typename... Args>
CameraIntrinsics Zivid::CameraIntrinsics::copyWith ( Args &&...  args) const
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:

◆ distortion() [1/2]

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

◆ distortion() [2/2]

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

◆ forEach() [1/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

◆ forEach() [2/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

◆ 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

◆ 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==()

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]

template<typename... Args>
void Zivid::CameraIntrinsics::set ( Args &&...  args)
inline

◆ 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

◆ toString()

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

Get the value as string

Friends And Related Function Documentation

◆ DataModel::Detail::Befriend< CameraIntrinsics >

friend struct DataModel::Detail::Befriend< CameraIntrinsics >
friend

◆ operator<<

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

Operator to send the value as string to a stream

Member Data Documentation

◆ description

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

The description for this value

◆ name

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

The name of this value

◆ nodeType

constexpr DataModel::NodeType Zivid::CameraIntrinsics::nodeType = DataModel::NodeType::group
staticconstexpr

The type of this node

◆ path

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

The full path for this value

◆ version

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

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