Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
CalibrageMatrices.hpp
00001 /* $Id$ */
00002 
00003 #ifndef CALIBRAGE_MATRICES_HPP
00004 #define CALIBRAGE_MATRICES_HPP
00005 
00006 namespace jafar {
00008   namespace stereo {
00009     
00015     class CalibrageMatrices {
00016     public:
00017       CalibrageMatrices();
00018       ~CalibrageMatrices(){};
00019 
00020       enum STATE {NOT_INITIALIZED, INITIALIZED};
00021 
00025       //      void readFromFile(ImagesSizes& imagesSizes, char* fileName);
00026       void readFromFile(char* fileName);
00027 
00028       void readFromOldFile(char* directory);
00029       
00033       void saveToFile(char* fileName);
00034 
00035       void readFromOldFormatFiles(int nb_lig_original,
00036           int nb_col_original,
00037           int taux_reduction_i_,
00038           int taux_reduction_j_,
00039           char* oldFilesDirectory);
00040 
00044       void readFromCalibrationDir(char* projection_droite_file,
00045           char* projection_gauche_file,
00046           char* intr_droite_file,
00047           char* intr_gauche_file,
00048           char* dist_droite_file,
00049           char* dist_gauche_file);
00050 
00054       void calculateRectificationBords(int nblig,
00055                int nbcol,              
00056                int dist_type,
00057                int taux_reduction);
00058 
00063       void estimateRectificationParams(int nblig,
00064                int nbcol,
00065                int dist_type,
00066                int taux_reduction);
00067 
00068       // data members:
00069 
00071       CalibrageMatrices::STATE state;
00072 
00073       CalibrageMatrices::STATE estimate_state;
00075       double mat_projection_droite[16];
00077       double mat_projection_gauche[16];
00078 
00080       double mat_intrinseque_droite[16];
00082       double mat_distortion_droite[3];
00084       double mat_intrinseque_gauche[16];
00086       double mat_distortion_gauche[3];
00088       double mat_baseline[2];
00090       double mat_intrinseque_rectifiee_droite[16];
00092       double mat_intrinseque_rectifiee_gauche[16];
00094       double mat_rectification_droite[9];
00096       double mat_rectification_gauche[9];
00098       double mat_rect_2_cam_gauche[9];
00099 
00101       int nblig;
00103       int nbcol;
00104       //
00105       int imin;
00106       //
00107       int jmin;
00108       //
00109       int imax;
00110       //
00111       int jmax;
00112       //
00113       int nblig_rect;
00114       //
00115       int nbcol_rect;
00116 
00117     private:
00118       void readVectorFromFile(const char * nfichier, int nSize, double* dbVector);
00119 
00120       // this private functions were originally in calife file
00121       // prcalibstereo.c
00122       /*
00123   void readCalibStereo (ImagesSizes& imagesSizes,  
00124   double* intr_droite, 
00125   double* dist_droite, 
00126   double* intr_gauche, 
00127   double* dist_gauche,
00128   double* vecteur_baseline,
00129   double* mat_intrinseque_rectifiee_droite,
00130   double* mat_intrinseque_rectifiee_gauche,
00131   double* mat_rectification_droite, 
00132   double* mat_rectification_gauche,
00133   double* mat_rotation,
00134   char*   nfichier);
00135       */
00136 
00137     };
00138 
00139   }// namespace stereo
00140 }// namespace jafar
00141 
00142 #endif // CALIBRAGE_MATRICES_HPP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:28 for Jafar by doxygen 1.7.6.1
LAAS-CNRS