cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
svlCCHandEyeCalibration.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */
3 
4 /*
5 
6  Author(s): Wen P. Liu
7  Created on: 2011
8 
9  (C) Copyright 2006-2007 Johns Hopkins University (JHU), All Rights
10  Reserved.
11 
12 --- begin cisst license - do not edit ---
13 
14 This software is provided "as is" under an open source license, with
15 no warranty. The complete license can be found in license.txt and
16 http://www.cisst.org/cisst/license.txt.
17 
18 --- end cisst license ---
19 */
20 #ifndef _svlCCHandEyeCalibration_h
21 #define _svlCCHandEyeCalibration_h
22 
24 #include <cisstCommon/cmnGetChar.h>
27 #include <limits>
28 
30 {
31 public:
33  svlCCHandEyeCalibration(std::vector<svlCCCalibrationGrid*> calibrationGrids);
34  double calibrate();
36 
37 private:
38  std::vector<svlCCCalibrationGrid*> calibrationGrids;
39  double optimizeDualQuaternionMethod();
40  double getAvgHandEyeError(std::vector<CvMat*> aMatrix, std::vector<CvMat*> bMatrix);
41  double dualQuaternionMethod(int* indicies, int indiciesSize, bool runCombination);
42  bool getDualQuaternion(CvMat* matrix, CvMat* q, CvMat* qPrime);
43  void populateComplexMatrixST(CvMat* a, CvMat* b, CvMat* aPrime, CvMat* bPrime, CvMat* s, CvMat* T, int index);
44  void quaternionMul(CvMat* q1, CvMat* q2, CvMat* result);
45  void quaternionToRMatrix(CvMat* rMatrix, CvMat* quaternion);
46  void solveQuadratic(double a, double b, double c, CvMat* roots);
47  void printData();
48  void printCvMatDouble(CvMat* matrix);
49  double checkAXXB(CvMat* A, CvMat* B);
50  template <typename Iterator> bool next_combination(const Iterator first, Iterator k, const Iterator last);
51 
52  //parameters
53  bool debug;
54  int handEyeMethodFlag;
55  std::vector<CvMat*> cameraMatrix;
56  std::vector<CvMat*> worldToTCPMatrix;
57  CvMat* cameraToTCP;
58  double handEyeAvgError;
59  int** valid;
60 };
61 
62 #endif
Definition: svlCCHandEyeCalibration.h:29
handEyeMethodEnum
Definition: svlCCHandEyeCalibration.h:32
Definition: svlCCHandEyeCalibration.h:32
svlCCHandEyeCalibration(std::vector< svlCCCalibrationGrid * > calibrationGrids)
vct4x4 tcp_T_camera
Definition: svlCCHandEyeCalibration.h:35