14 #ifndef mitkCameraIntrinsics_h
15 #define mitkCameraIntrinsics_h
19 #include <itkDataObject.h>
20 #include <vnl/vnl_matrix_fixed.h>
22 #include <MitkCameraCalibrationExports.h>
24 #include "opencv2/core.hpp"
50 itkFactorylessNewMacro(Self);
70 vnl_matrix_fixed<mitk::ScalarType, 3, 3> GetVnlCameraMatrix()
const;
76 vnl_matrix_fixed<mitk::ScalarType, 3, 4> GetVnlCameraMatrix3x4()
const;
83 void SetValid(
bool valid);
84 cv::Mat GetCameraMatrix()
const;
85 cv::Mat GetDistorsionCoeffs();
86 cv::Mat GetDistorsionCoeffs()
const;
87 void ToXML(tinyxml2::XMLElement* elem)
const override;
88 std::string ToString()
const;
89 std::string GetString();
90 double GetFocalLengthX()
const;
91 double GetFocalLengthY()
const;
92 double GetPrincipalPointX()
const;
93 double GetPrincipalPointY()
const;
97 vnl_vector_fixed<mitk::ScalarType, 2> GetFocalPointAsVnlVector()
const;
98 vnl_vector_fixed<mitk::ScalarType, 2> GetPrincipalPointAsVnlVector()
const;
103 void SetCameraMatrix(
const vnl_matrix_fixed<mitk::ScalarType, 3, 3>&
106 void SetIntrinsics(
const cv::Mat& _CameraMatrix
107 ,
const cv::Mat& _DistorsionCoeffs);
109 void SetFocalLength(
double x,
double y );
110 void SetPrincipalPoint(
double x,
double y );
111 void SetDistorsionCoeffs(
double k1,
double k2,
double p1,
double p2 );
117 void FromXML(
const tinyxml2::XMLElement* elem)
override;
118 void FromGMLCalibrationXML(
const tinyxml2::XMLElement* elem);
119 std::string ToOctaveString(
const std::string& varName=
"CameraIntrinsics");
134 itk::LightObject::Pointer InternalClone()
const override;
139 MITKCAMERACALIBRATION_EXPORT std::ostream&
operator<<
140 (std::ostream& os, mitk::CameraIntrinsics::Pointer p);