00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __decision_fusion_by_decision_templates
00021 #define __decision_fusion_by_decision_templates
00022
00023
00024 #include "image.h"
00025 #include "proto2D.h"
00026
00027 #include <stdlib.h>
00028 #include <glib.h>
00029
00030 #include "classifier.h"
00031
00032
00033
00034
00035
00036
00037
00038
00039 #define PREMIER_ELEMENT 0
00040
00041
00042 #define FICHIER_EN_COURS __FILE__
00043 #define LIGNE_EN_COURS __LINE__
00044
00045
00046 #define NORME_LP 0
00047
00048 #define NO_ERROR 0
00049
00050 #define PRENDRE_CONTEXTE 1
00051 #define NE_PAS_PRENDRE_CONTEXTE -1
00052
00053 #define NB_AFFICH 5
00054
00055 #define NE_PAS_SEUILLER 123045060//valeur improbable
00056 #define SEUILLER 0
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069 typedef struct{
00070 int label_masque;
00071 int label_classifieur;
00072 int nb_pts;
00073 int label_norm;
00074 }une_classe_inconnue;
00075
00076
00077 typedef struct {
00078 int label_masque;
00079 int label_normalise;
00080 int nb_pts;
00081 }une_classe_DT;
00082
00083
00084 typedef struct{
00085 int *label;
00086 int *nb_pts;
00087 }un_contexte;
00088
00089
00090 typedef struct{
00091
00092
00093 une_classe_DT *les_classes;
00094
00095
00096 une_classe_inconnue *classes_inconnues;
00097 int nb_class_inconnues;
00098 int nb_labels_inconnus;
00099
00100
00101 int label_rejet;
00102
00103
00104 int flag_contexte;
00105 int flag_contexte_apprent;
00106 un_contexte *contexte;
00107 int nb_voisins;
00108 int *nb_labels_contexte;
00109 int equ_nb_cols;
00110 int equ_nb_rows;
00111 int nb_pts_effectif;
00112 int nb_voisins_apprent;
00113 int cpt_pt_apprent;
00114
00115
00116 data_output *data_field_of_glist_DT;
00117
00118
00119 GList *DT;
00120
00121
00122 float seuil;
00123
00124 }decision_fusion_by_decision_templates_t;
00125
00126
00127
00128
00129
00130
00131
00132 param *decision_fusion_by_decision_templates_lect(
00133 decision_fusion_by_decision_templates_t *desc,
00134 param *ptp,
00135 char *debq
00136 );
00137
00138
00139 int decision_fusion_by_decision_templates_init(
00140 decision_fusion_by_decision_templates_t *desc,
00141 GList *DP,
00142 data_output expert_decision,
00143 const int LABEL_FOND,
00144 float seuil,
00145 int nb_voisins,
00146 data_output *final_crisp_decision
00147 );
00148
00149
00150 int decision_fusion_by_decision_templates_calc(
00151 decision_fusion_by_decision_templates_t *desc ,
00152 GList *DP,
00153 int similarity_measure_choix,
00154 int indice_point,
00155 const int norme_lp,
00156 data_output *crisp_decision
00157 );
00158
00159
00160 int decision_fusion_by_decision_templates_ferm(
00161 decision_fusion_by_decision_templates_t *desc
00162 );
00163
00164
00165
00166 int calc_similarity_from_DP_to_DT_by_squared_norme_lp(GList *DP, decision_fusion_by_decision_templates_t *desc, int indice_point, const int norme_lp, float *result);
00167
00168
00169 int calc_similarity_from_DP_to_DT_by_squared_norme_lp_with_contexte(
00170 GList *DP,
00171 decision_fusion_by_decision_templates_t *desc,
00172 int indice_point,
00173 const int norme_lp,
00174 float *result
00175 );
00176
00177 int chercher_nb_class(data_output *dataO,int *labels);
00178
00179
00180 int built_decisions_templates_by_arithmetic_mean(
00181 decision_fusion_by_decision_templates_t *desc,
00182 int labelfond,
00183 int nb_class_classifieurs,
00184 int type,
00185 int nb_DT,
00186 data_output mask_learn_DT ,
00187 GList *DP
00188 );
00189
00190
00191 int classifier_contexte_decision(data_output decision, int nb_voisins, data_output *contexte_decision);
00192
00193
00194
00195 #endif