NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
mitkStereoCameraCalibration.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef mitkStereoCameraCalibration_h
16 #define mitkStereoCameraCalibration_h
17 
18 #include "niftkOpenCVExports.h"
19 #include <string>
20 #include <itkObject.h>
21 #include <itkObjectFactory.h>
22 #include <mitkCommon.h>
23 #include <mitkPoint.h>
24 #include <mitkVector.h>
25 #include <cv.h>
26 
27 namespace mitk {
28 
33 class NIFTKOPENCV_EXPORT StereoCameraCalibration : public itk::Object
34 {
35 
36 public:
37 
38  mitkClassMacroItkParent(StereoCameraCalibration, itk::Object)
39  itkNewMacro(StereoCameraCalibration)
40 
41 
44  void LoadExistingIntrinsics(const std::string& directoryName);
45 
49  void LoadExistingRightToLeft(const std::string& directoryName);
50 
58  double Calibrate(const std::string& leftDirectoryName,
59  const std::string& rightDirectoryName,
60  const int& numberOfFrames,
61  const int& numberCornersX,
62  const int& numberCornersY,
63  const double& sizeSquareMillimeters,
64  const mitk::Point2D& pixelScaleFactor,
65  const std::string& outputDirectoryName,
66  const bool& writeImages
67  );
68 
69 protected:
70 
72  virtual ~StereoCameraCalibration();
73 
74  StereoCameraCalibration(const StereoCameraCalibration&); // Purposefully not implemented.
75  StereoCameraCalibration& operator=(const StereoCameraCalibration&); // Purposefully not implemented.
76 
77 private:
78 
79  CvMat* m_IntrinsicMatrixLeft;
80  CvMat* m_IntrinsicMatrixRight;
81  CvMat* m_DistortionCoefficientsLeft;
82  CvMat* m_DistortionCoefficientsRight;
83  CvMat* m_RotationMatrixRightToLeft;
84  CvMat* m_TranslationVectorRightToLeft;
85  bool m_OptimiseIntrinsics;
86  bool m_OptimiseRightToLeft;
87 
88 }; // end class
89 
90 } // end namespace
91 
92 #endif
Definition: ReceptorMemberCommandTest.cxx:25
Does a stereo camera calibration from one/two directories, each containing a set of image files...
Definition: mitkStereoCameraCalibration.h:33
#define NIFTKOPENCV_EXPORT
Definition: niftkSequentialCpuQds.h:27
GLsizei const GLcharARB ** string
Definition: glew.h:5194