Medical Imaging Interaction Toolkit  2016.11.0
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 (TiXmlElement *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 (TiXmlElement *elem) override
 
void FromGMLCalibrationXML (TiXmlElement *elem)
 
std::string ToOctaveString (const std::string &varName="CameraIntrinsics")
 
virtual ~CameraIntrinsics ()
 
- 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
 
itk::FastMutexLock::Pointer m_Mutex
 

Friends

int mitkCameraIntrinsicsTest (int argc, char *argv[])
 

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 37 of file mitkCameraIntrinsics.h.

Constructor & Destructor Documentation

mitk::CameraIntrinsics::~CameraIntrinsics ( )
virtual

Definition at line 39 of file mitkCameraIntrinsics.cpp.

mitk::CameraIntrinsics::CameraIntrinsics ( )
protected

Definition at line 22 of file mitkCameraIntrinsics.cpp.

References m_CameraMatrix, and m_DistorsionCoeffs.

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

Definition at line 30 of file mitkCameraIntrinsics.cpp.

References Copy().

Member Function Documentation

Pointer mitk::CameraIntrinsics::Clone ( ) const

make a clone of this intrinsics

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

copy information from other to this

Definition at line 54 of file mitkCameraIntrinsics.cpp.

References GetCameraMatrix(), GetDistorsionCoeffs(), and m_Valid.

Referenced by CameraIntrinsics().

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

checks two intrinsics for equality

Definition at line 44 of file mitkCameraIntrinsics.cpp.

References GetDistorsionCoeffsAsPoint4D(), GetFocalPoint(), and GetPrincipalPoint().

void mitk::CameraIntrinsics::FromGMLCalibrationXML ( TiXmlElement *  elem)

Definition at line 252 of file mitkCameraIntrinsics.cpp.

References endoAssert.

void mitk::CameraIntrinsics::FromXML ( TiXmlElement *  elem)
overridevirtual

read your values here from elem

Implements mitk::XMLSerializable.

Definition at line 307 of file mitkCameraIntrinsics.cpp.

References endoAssert, endodebug, filename, and MITK_DEBUG.

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

Definition at line 183 of file mitkCameraIntrinsics.cpp.

Referenced by Copy().

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

Definition at line 195 of file mitkCameraIntrinsics.cpp.

References GetDistorsionCoeffs().

Referenced by Copy(), and GetDistorsionCoeffs().

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

Definition at line 189 of file mitkCameraIntrinsics.cpp.

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

Definition at line 429 of file mitkCameraIntrinsics.cpp.

Referenced by Equals().

double mitk::CameraIntrinsics::GetFocalLengthX ( ) const

Definition at line 404 of file mitkCameraIntrinsics.cpp.

double mitk::CameraIntrinsics::GetFocalLengthY ( ) const

Definition at line 411 of file mitkCameraIntrinsics.cpp.

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

Definition at line 442 of file mitkCameraIntrinsics.cpp.

Referenced by Equals().

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

Definition at line 461 of file mitkCameraIntrinsics.cpp.

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

Definition at line 451 of file mitkCameraIntrinsics.cpp.

Referenced by Equals().

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

Definition at line 470 of file mitkCameraIntrinsics.cpp.

double mitk::CameraIntrinsics::GetPrincipalPointX ( ) const

Definition at line 417 of file mitkCameraIntrinsics.cpp.

double mitk::CameraIntrinsics::GetPrincipalPointY ( ) const

Definition at line 423 of file mitkCameraIntrinsics.cpp.

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

Definition at line 484 of file mitkCameraIntrinsics.cpp.

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

Definition at line 68 of file mitkCameraIntrinsics.cpp.

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)

Definition at line 97 of file mitkCameraIntrinsics.cpp.

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

Definition at line 61 of file mitkCameraIntrinsics.cpp.

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

smartpointer typedefs

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

set a new camera matrix utilizing a vnl matrix

Definition at line 85 of file mitkCameraIntrinsics.cpp.

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

Definition at line 168 of file mitkCameraIntrinsics.cpp.

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

Definition at line 148 of file mitkCameraIntrinsics.cpp.

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

Definition at line 106 of file mitkCameraIntrinsics.cpp.

References endoAssertMsg.

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

Definition at line 127 of file mitkCameraIntrinsics.cpp.

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

Definition at line 158 of file mitkCameraIntrinsics.cpp.

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

Definition at line 500 of file mitkCameraIntrinsics.cpp.

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

Definition at line 489 of file mitkCameraIntrinsics.cpp.

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

Definition at line 201 of file mitkCameraIntrinsics.cpp.

void mitk::CameraIntrinsics::ToXML ( TiXmlElement *  elem) const
overridevirtual

write your values here to elem

Implements mitk::XMLSerializable.

Definition at line 223 of file mitkCameraIntrinsics.cpp.

Friends And Related Function Documentation

int mitkCameraIntrinsicsTest ( int  argc,
char *  argv[] 
)
friend

for testing purposes

Member Data Documentation

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

Definition at line 129 of file mitkCameraIntrinsics.h.

Referenced by CameraIntrinsics().

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

Definition at line 130 of file mitkCameraIntrinsics.h.

Referenced by CameraIntrinsics().

itk::FastMutexLock::Pointer mitk::CameraIntrinsics::m_Mutex
protected

Definition at line 132 of file mitkCameraIntrinsics.h.

bool mitk::CameraIntrinsics::m_Valid
protected

Definition at line 131 of file mitkCameraIntrinsics.h.

Referenced by Copy().


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