Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
mitk::CameraIntrinsics Class Reference

class representing camera intrinsics and related functions More...

#include <mitkCameraIntrinsics.h>

Inheritance diagram for mitk::CameraIntrinsics:
Collaboration diagram for mitk::CameraIntrinsics:

Public Member Functions

 mitkClassMacroItkParent (CameraIntrinsics, itk::Object)
 
Pointer Clone () const
 
void Copy (const CameraIntrinsics *other)
 
bool Equals (const CameraIntrinsics *other) const
 
vnl_matrix_fixed< mitk::ScalarType, 3, 3 > GetVnlCameraMatrix () const
 
vnl_matrix_fixed< mitk::ScalarType, 3, 4 > GetVnlCameraMatrix3x4 () const
 
bool IsValid () const
 
void SetValid (bool valid)
 
cv::Mat GetCameraMatrix () const
 
cv::Mat GetDistorsionCoeffs ()
 
cv::Mat GetDistorsionCoeffs () const
 
void ToXML (tinyxml2::XMLElement *elem) const override
 
std::string ToString () const
 
std::string GetString ()
 
double GetFocalLengthX () const
 
double GetFocalLengthY () const
 
double GetPrincipalPointX () const
 
double GetPrincipalPointY () const
 
mitk::Point4D GetDistorsionCoeffsAsPoint4D () const
 
mitk::Point3D GetFocalPoint () const
 
mitk::Point3D GetPrincipalPoint () const
 
vnl_vector_fixed< mitk::ScalarType, 2 > GetFocalPointAsVnlVector () const
 
vnl_vector_fixed< mitk::ScalarType, 2 > GetPrincipalPointAsVnlVector () const
 
void SetCameraMatrix (const vnl_matrix_fixed< mitk::ScalarType, 3, 3 > &_CameraMatrix)
 
void SetIntrinsics (const cv::Mat &_CameraMatrix, const cv::Mat &_DistorsionCoeffs)
 
void SetFocalLength (double x, double y)
 
void SetPrincipalPoint (double x, double y)
 
void SetDistorsionCoeffs (double k1, double k2, double p1, double p2)
 
void SetIntrinsics (const mitk::Point3D &focalPoint, const mitk::Point3D &principalPoint, const mitk::Point4D &distortionCoefficients)
 
void FromXML (const tinyxml2::XMLElement *elem) override
 
void FromGMLCalibrationXML (const tinyxml2::XMLElement *elem)
 
std::string ToOctaveString (const std::string &varName="CameraIntrinsics")
 
 ~CameraIntrinsics () override
 
- Public Member Functions inherited from mitk::XMLSerializable
virtual const char * GetNameOfClass () const =0
 
virtual void ToXMLFile (const std::string &file, const std::string &elemName="")
 
virtual void FromXMLFile (const std::string &file, const std::string &elemName="")
 
std::string GetXMLFileName () const
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

 CameraIntrinsics ()
 
 CameraIntrinsics (const CameraIntrinsics &other)
 

Protected Attributes

cv::Mat m_CameraMatrix
 
cv::Mat m_DistorsionCoeffs
 
bool m_Valid
 
std::mutex m_Mutex
 

Additional Inherited Members

- Static Public Attributes inherited from mitk::XMLSerializable
static const std::string FILE_REFERENCE_ATTRIBUTE_NAME
 
static const std::string ROOT_NAME
 

Detailed Description

class representing camera intrinsics and related functions

Definition at line 35 of file mitkCameraIntrinsics.h.

Constructor & Destructor Documentation

◆ ~CameraIntrinsics()

mitk::CameraIntrinsics::~CameraIntrinsics ( )
override

◆ CameraIntrinsics() [1/2]

mitk::CameraIntrinsics::CameraIntrinsics ( )
protected

◆ CameraIntrinsics() [2/2]

mitk::CameraIntrinsics::CameraIntrinsics ( const CameraIntrinsics other)
protected

Member Function Documentation

◆ Clone()

Pointer mitk::CameraIntrinsics::Clone ( ) const

make a clone of this intrinsics

◆ Copy()

void mitk::CameraIntrinsics::Copy ( const CameraIntrinsics other)

copy information from other to this

◆ Equals()

bool mitk::CameraIntrinsics::Equals ( const CameraIntrinsics other) const

checks two intrinsics for equality

◆ FromGMLCalibrationXML()

void mitk::CameraIntrinsics::FromGMLCalibrationXML ( const tinyxml2::XMLElement *  elem)

◆ FromXML()

void mitk::CameraIntrinsics::FromXML ( const tinyxml2::XMLElement *  elem)
overridevirtual

read your values here from elem

Implements mitk::XMLSerializable.

◆ GetCameraMatrix()

cv::Mat mitk::CameraIntrinsics::GetCameraMatrix ( ) const

◆ GetDistorsionCoeffs() [1/2]

cv::Mat mitk::CameraIntrinsics::GetDistorsionCoeffs ( )

◆ GetDistorsionCoeffs() [2/2]

cv::Mat mitk::CameraIntrinsics::GetDistorsionCoeffs ( ) const

◆ GetDistorsionCoeffsAsPoint4D()

mitk::Point4D mitk::CameraIntrinsics::GetDistorsionCoeffsAsPoint4D ( ) const

◆ GetFocalLengthX()

double mitk::CameraIntrinsics::GetFocalLengthX ( ) const

◆ GetFocalLengthY()

double mitk::CameraIntrinsics::GetFocalLengthY ( ) const

◆ GetFocalPoint()

mitk::Point3D mitk::CameraIntrinsics::GetFocalPoint ( ) const

◆ GetFocalPointAsVnlVector()

vnl_vector_fixed<mitk::ScalarType, 2> mitk::CameraIntrinsics::GetFocalPointAsVnlVector ( ) const

◆ GetPrincipalPoint()

mitk::Point3D mitk::CameraIntrinsics::GetPrincipalPoint ( ) const

◆ GetPrincipalPointAsVnlVector()

vnl_vector_fixed<mitk::ScalarType, 2> mitk::CameraIntrinsics::GetPrincipalPointAsVnlVector ( ) const

◆ GetPrincipalPointX()

double mitk::CameraIntrinsics::GetPrincipalPointX ( ) const

◆ GetPrincipalPointY()

double mitk::CameraIntrinsics::GetPrincipalPointY ( ) const

◆ GetString()

std::string mitk::CameraIntrinsics::GetString ( )

◆ GetVnlCameraMatrix()

vnl_matrix_fixed<mitk::ScalarType, 3, 3> mitk::CameraIntrinsics::GetVnlCameraMatrix ( ) const
Returns
the intrinsic parameter matrix as a 3x3 vnl matrix

◆ GetVnlCameraMatrix3x4()

vnl_matrix_fixed<mitk::ScalarType, 3, 4> mitk::CameraIntrinsics::GetVnlCameraMatrix3x4 ( ) const
Returns
the intrinsic parameter matrix as a 3x4 vnl matrix (the last column only containing zeros)

◆ IsValid()

bool mitk::CameraIntrinsics::IsValid ( ) const
Returns
true if the intrinsics are set (some plausibility checks may be done here)

◆ mitkClassMacroItkParent()

mitk::CameraIntrinsics::mitkClassMacroItkParent ( CameraIntrinsics  ,
itk::Object   
)

smartpointer typedefs

◆ New()

static Pointer mitk::CameraIntrinsics::New ( )
static

the static new function

◆ SetCameraMatrix()

void mitk::CameraIntrinsics::SetCameraMatrix ( const vnl_matrix_fixed< mitk::ScalarType, 3, 3 > &  _CameraMatrix)

set a new camera matrix utilizing a vnl matrix

◆ SetDistorsionCoeffs()

void mitk::CameraIntrinsics::SetDistorsionCoeffs ( double  k1,
double  k2,
double  p1,
double  p2 
)

◆ SetFocalLength()

void mitk::CameraIntrinsics::SetFocalLength ( double  x,
double  y 
)

◆ SetIntrinsics() [1/2]

void mitk::CameraIntrinsics::SetIntrinsics ( const cv::Mat &  _CameraMatrix,
const cv::Mat &  _DistorsionCoeffs 
)

◆ SetIntrinsics() [2/2]

void mitk::CameraIntrinsics::SetIntrinsics ( const mitk::Point3D focalPoint,
const mitk::Point3D principalPoint,
const mitk::Point4D distortionCoefficients 
)

◆ SetPrincipalPoint()

void mitk::CameraIntrinsics::SetPrincipalPoint ( double  x,
double  y 
)

◆ SetValid()

void mitk::CameraIntrinsics::SetValid ( bool  valid)

◆ ToOctaveString()

std::string mitk::CameraIntrinsics::ToOctaveString ( const std::string &  varName = "CameraIntrinsics")

◆ ToString()

std::string mitk::CameraIntrinsics::ToString ( ) const

◆ ToXML()

void mitk::CameraIntrinsics::ToXML ( tinyxml2::XMLElement *  elem) const
overridevirtual

write your values here to elem

Implements mitk::XMLSerializable.

Member Data Documentation

◆ m_CameraMatrix

cv::Mat mitk::CameraIntrinsics::m_CameraMatrix
protected

Definition at line 127 of file mitkCameraIntrinsics.h.

◆ m_DistorsionCoeffs

cv::Mat mitk::CameraIntrinsics::m_DistorsionCoeffs
protected

Definition at line 128 of file mitkCameraIntrinsics.h.

◆ m_Mutex

std::mutex mitk::CameraIntrinsics::m_Mutex
mutableprotected

Definition at line 130 of file mitkCameraIntrinsics.h.

◆ m_Valid

bool mitk::CameraIntrinsics::m_Valid
protected

Definition at line 129 of file mitkCameraIntrinsics.h.


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