00001
00002
00003 #ifndef CALIFE_PROTO_HPP
00004 #define CALIFE_PROTO_HPP
00005
00006 #include "stereo/ImagesSizes.hpp"
00007 #include "stereo/RectificationParams.hpp"
00008 #include "stereo/CorrelationParams.hpp"
00009 #include "stereo/CorrelationResults.hpp"
00010 #include "stereo/ImagesTemporary.hpp"
00011 #include "stereo/ReconstructionParams.hpp"
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 namespace jafar {
00022 namespace stereo {
00023
00024
00025 extern void correlation_census (unsigned char* image_gauche,
00026 unsigned char* image_droite,
00027 ImagesSizes& images_sizes,
00028 CorrelationParams& correlationParams,
00029 CorrelationResults& correlationResults );
00030
00031 extern void correlation_zncc ( unsigned char* source_gauche,
00032 unsigned char* source_droite,
00033 ImagesTemporary& images_tmp_gauches,
00034 ImagesTemporary& images_tmp_droites,
00035 CorrelationParams& correlationParams,
00036 CorrelationResults& correlationResults );
00037
00038 extern void get_census_disparity ( float* pix_disp,
00039 int nblig,
00040 double* tab_scores,
00041 int* tab_disp_nj2_min,
00042 int* tab_disp_nj2_max,
00043 int delta_max_disp,
00044 int disp_min_general,
00045 int j_min,
00046 int j_max,
00047 double seuil_score,
00048 double seuil_difference,
00049 double seuil_voisins,
00050 int epsilon_inverse,
00051 CorrelationParams::INTERPOLATION_TYPE interpolation_type);
00052
00053
00054
00055 extern void get_census_disparity_sigma (float* pix_disp,
00056 float* pix_sigma,
00057 int nblig,
00058 double* tab_scores,
00059 int* tab_disp_nj2_min,
00060 int* tab_disp_nj2_max,
00061 int delta_max_disp,
00062 int disp_min_general,
00063 int j_min,
00064 int j_max,
00065 double seuil_score,
00066 double seuil_difference,
00067 double seuil_voisins,
00068 int epsilon_inverse);
00069
00070
00071 extern void get_disparity ( float* pix_disp,
00072 float* pix_sigma_g,
00073 int nblig,
00074 double* tab_scores,
00075 int* tab_disp_nj2_min,
00076 int* tab_disp_nj2_max,
00077 int delta_max_disp,
00078 int disp_min_general,
00079 int j_min,
00080 int j_max,
00081 double seuil_sigma,
00082 double seuil_score,
00083 double seuil_difference,
00084 double seuil_voisins,
00085 int epsilon_inverse,
00086 CorrelationParams::INTERPOLATION_TYPE interpolation);
00087
00088 extern void get_disparity_sigma ( float* pix_disp,
00089 float* pix_sigma_g,
00090 float* pix_sigma,
00091 int nblig,
00092 double* tab_scores,
00093 int* tab_disp_nj2_min,
00094 int* tab_disp_nj2_max,
00095 int delta_max_disp,
00096 int disp_min_general,
00097 int j_min,
00098 int j_max,
00099 double seuil_sigma,
00100 double seuil_score,
00101 double seuil_difference,
00102 double seuil_voisins,
00103 int epsilon_inverse );
00104
00105 extern void moyennes_sigmas ( unsigned char* im_source,
00106 ImagesTemporary& images_tmp,
00107 CorrelationParams& correlationParams );
00108
00109
00110 extern void extrait_sous_image ( unsigned char* im_source,
00111 ImagesSizes& images_sizes,
00112 int reduction,
00113 unsigned char* im_extraite );
00114
00115
00116 extern void moyennes ( unsigned char* im_source,
00117 int win_nb_lig,
00118 int win_nb_col,
00119 ImagesTemporary& images_tmp );
00120
00121
00122 extern void transform_census_8bits (unsigned char* im_source,
00123 ImagesTemporary& imagesTemporary,
00124 CorrelationParams::CENSUS_TYPE type_census,
00125 unsigned char* im_census );
00126
00127
00128 extern void blob_filter_disparites (CorrelationResults& correlationResults,
00129 int sizeMin,
00130 float diffMax );
00131
00132
00133 extern void rectification_ima1_michel ( unsigned char* im_source,
00134 ImagesSizes& images_sizes,
00135 int reduction,
00136 RectificationParams& rectificationParams,
00137 RectificationParams::RECTIFICATION_TYPE type_rectification,
00138 RectificationParams::DISTORTION_TYPE type_distortion,
00139 RectificationParams::DO_INTERPOLATION do_interpolation,
00140 unsigned char* im_rectifiee );
00141
00142 extern void rectifie_sous_ima1_michel ( unsigned char* im_source,
00143 ImagesSizes& images_sizes,
00144 RectificationParams::DISTORTION_TYPE type_distortion,
00145 RectificationParams::DO_INTERPOLATION do_interpolation,
00146 double* mat_rectification,
00147 double* mat_intrinseque,
00148 double* mat_distortion,
00149 unsigned char* im_rectifiee );
00150
00151 extern void rectifie_sous_ima1_tables_michel(unsigned char* im_source,
00152 ImagesSizes& images_sizes,
00153 RectificationParams& rectificationParams,
00154 RectificationParams::DO_INTERPOLATION do_interpolation,
00155 unsigned char* im_rectifiee );
00156
00157 extern void rectification_ima1_old ( unsigned char* im_source,
00158 ImagesSizes& images_sizes,
00159 int reduction,
00160 RectificationParams& rectificationParams,
00161 RectificationParams::RECTIFICATION_TYPE type_rectification,
00162 RectificationParams::DISTORTION_TYPE type_distortion,
00163 RectificationParams::DO_INTERPOLATION do_interpolation,
00164 unsigned char* im_rectifiee );
00165
00166 extern void rectifie_sous_ima1_old ( unsigned char* im_source,
00167 ImagesSizes& images_sizes,
00168 int reduction,
00169 RectificationParams::DISTORTION_TYPE type_distortion,
00170 RectificationParams::DO_INTERPOLATION do_interpolation,
00171 double* mat_rectification,
00172 double* mat_intrinseque,
00173 double* mat_distortion,
00174 unsigned char* im_rectifiee );
00175 extern void rectifie_sous_ima1_tables_old (unsigned char* im_source,
00176 ImagesSizes& images_sizes,
00177 int reduction,
00178 RectificationParams& rectif_params,
00179 unsigned char* im_rectifiee);
00180
00181 extern void
00182 rectifie_sous_ima1_inverse_old (unsigned char* im_source,
00183 ImagesSizes& images_sizes,
00184 int reduction,
00185 RectificationParams& rectif_params,
00186 unsigned char* im_derectifiee);
00187
00188
00189
00190
00191 extern int corrige_distr3_pt_michel (double ud, double vd,
00192 double *I, double *coefDist,
00193 double *u, double *v);
00194
00195 extern void estim_rectification_params_michel (double* P1,
00196 double* P2,
00197 double* PP1,
00198 double* PP2,
00199 int imin,
00200 int jmin,
00201 int imax,
00202 int jmax,
00203 int nblig_rect,
00204 int nbcol_rect,
00205 double* W1,
00206 double* W2,
00207 double* base,
00208 double* rotation,
00209 double* intrinsinc);
00210
00211
00212
00213
00214 }
00215 }
00216
00217 #endif // CALIFE_PROTO_HPP