00001
00002
00003 #ifndef RECTIFICATION_PARAMS_HPP
00004 #define RECTIFICATION_PARAMS_HPP
00005
00006 #include "stereo/CalibrageMatrices.hpp"
00007 #include "stereo/ImagesSizes.hpp"
00008
00009 namespace jafar {
00011 namespace stereo {
00012
00018 class RectificationParams
00019 {
00020 public:
00021 enum STATE {NOT_INITIALIZED,MATRICES_INITIALIZED};
00022
00023
00024 enum RECTIFICATION_TYPE { RECTIFICATION_NIL,
00025 RECTIFICATION_MATRICES,
00026 RECTIFICATION_TABLES,
00027 RECTIFICATION_INVERSE};
00028
00029
00030
00031 enum DO_INTERPOLATION { INTERPOLATION_NIL, INTERPOLATION};
00032
00033
00034
00035
00036 enum DISTORTION_TYPE{ DISTORTION_NIL,
00037 DISTORTION_R,
00038 DISTORTION_R3};
00039
00040
00041 enum IMAGE_SIDE{LEFT=0, RIGHT=1};
00042
00043
00044 public:
00045 RectificationParams();
00046 ~RectificationParams();
00047
00048 void clear();
00049
00050
00052 void initialize(ImagesSizes& images_siezes,
00053 CalibrageMatrices& calibrage_matrices,
00054 RectificationParams::IMAGE_SIDE side);
00055
00056
00060 void initializeTables(RectificationParams::DISTORTION_TYPE type_distortion);
00061
00065 void initializeTables_michel(RectificationParams::DISTORTION_TYPE type_distortion);
00066
00067
00068
00070 RectificationParams::STATE state;
00071
00072
00074 double intrinseque[16];
00076 double rectification[9];
00078 double distortion[3];
00080 double intrinseque_rectifiee[16];
00081
00082
00083
00085 ImagesSizes imagesSizes;
00086
00087
00088
00089
00090 short* table_i;
00091 short* table_j;
00092 short* inverse_table_i;
00093 short* inverse_table_j;
00094
00095
00096 };
00097
00098 }
00099 }
00100
00101 #endif //RECTIFICATION_PARAMS_HPP