_______________________________________________________________________________________________________________________________________
/*************************************************************************************************************************************/
/* */
/* F O N C T I O N S D E B A S E A C I N Q I M A G E S ( E T P L U S ) : */
/* */
/* */
/* Definition : */
/* */
/* Ce fichier contient toutes les fonctions */
/* de base de gestion et de manipulation de */
/* cinq images raster (et plus), quelle que soit la definition. */
/* Ainsi, on pourra avec elles passer des */
/* fausses aux vraies couleurs... */
/* */
/* */
/* Author of '$xiii/pent_image$FON' : */
/* */
/* Jean-Francois COLONNA (LACTAMME, 19880000000000). */
/* */
/*************************************************************************************************************************************/
/* Le 20080709142723, la fonction 'IFpolynome_4_01(...)' fut deplacee d'ici au module */
/* 'v $xiii/GooF_image$FON 20080709142600' tout en etant simultanement rebaptisee */
/* 'IFcombinaison_hornerienne_var4_degre1(...)' pour des raisons de logique evidentes... */
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* I N T E R P O L A T I O N E N T R E D E U X I M A G E S */
/* S U I V A N T D E U X P O N D E R A T E U R S : */
/* */
/* */
/* Petit probleme : */
/* */
/* Soit deux suites D(n) et C(n) respectivement */
/* decroissante ('D') et croissante ('C') mais ne */
/* ne variant pas, en valeur absolue, a la meme */
/* "vitesse". Toutes deux sont en fait des 'CHAR', */
/* et varient donc dans [NOIR,BLANC]. On calcule la */
/* suite P(n) qui est leur produit ('P') renormalise */
/* par rapport a 'BLANC'. */
/* */
/* Le phenomene etonnant que l'on observe, est que, */
/* pour des valeurs du meme ordre de grandeur de D(n) */
/* et de C(n), la suite P(n) decroit globalement, en */
/* presentant localement des petites croissances. Ce */
/* phenomene est a la base d'un defaut d'interpolation, */
/* que les calculs soient faits par defaut ou par exces. */
/* */
/* */
/* D(n): C(n): P(n): GENP(P(n)) par defaut : GENP(P(n)) par exces : */
/* */
/* (253 x 100)/255 = 99.215686 (par defaut=99 : *******************. par exces=99 : *******************.) */
/* (252 x 100)/255 = 98.823529 (par defaut=98 : ******************.. par exces=99 : *******************.) */
/* (251 x 100)/255 = 98.431373 (par defaut=98 : ******************.. par exces=98 : ******************..) */
/* (250 x 100)/255 = 98.039216 (par defaut=98 : ******************.. par exces=98 : ******************..) */
/* (249 x 101)/255 = 98.623529 (par defaut=98 : ******************.. par exces=99 : *******************.) */
/* (248 x 101)/255 = 98.227451 (par defaut=98 : ******************.. par exces=98 : ******************..) */
/* (247 x 101)/255 = 97.831373 (par defaut=97 : *****************... par exces=98 : ******************..) */
/* (246 x 102)/255 = 98.400000 (par defaut=98 : ******************.. par exces=98 : ******************..) */
/* (245 x 102)/255 = 98.000000 (par defaut=98 : ******************.. par exces=98 : ******************..) */
/* (244 x 102)/255 = 97.600000 (par defaut=97 : *****************... par exces=98 : ******************..) */
/* (243 x 102)/255 = 97.200000 (par defaut=97 : *****************... par exces=97 : *****************...) */
/* (242 x 103)/255 = 97.749020 (par defaut=97 : *****************... par exces=98 : ******************..) */
/* (241 x 103)/255 = 97.345098 (par defaut=97 : *****************... par exces=97 : *****************...) */
/* (240 x 103)/255 = 96.941176 (par defaut=96 : ****************.... par exces=97 : *****************...) */
/* (239 x 104)/255 = 97.474510 (par defaut=97 : *****************... par exces=97 : *****************...) */
/* (238 x 104)/255 = 97.066667 (par defaut=97 : *****************... par exces=97 : *****************...) */
/* (237 x 104)/255 = 96.658824 (par defaut=96 : ****************.... par exces=97 : *****************...) */
/* (236 x 105)/255 = 97.176471 (par defaut=97 : *****************... par exces=97 : *****************...) */
/* (235 x 105)/255 = 96.764706 (par defaut=96 : ****************.... par exces=97 : *****************...) */
/* (234 x 105)/255 = 96.352941 (par defaut=96 : ****************.... par exces=96 : ****************....) */
/* (233 x 105)/255 = 95.941176 (par defaut=95 : ***************..... par exces=96 : ****************....) */
/* (232 x 106)/255 = 96.439216 (par defaut=96 : ****************.... par exces=96 : ****************....) */
/* (231 x 106)/255 = 96.023529 (par defaut=96 : ****************.... par exces=96 : ****************....) */
/* (230 x 106)/255 = 95.607843 (par defaut=95 : ***************..... par exces=96 : ****************....) */
/* (229 x 107)/255 = 96.090196 (par defaut=96 : ****************.... par exces=96 : ****************....) */
/* (228 x 107)/255 = 95.670588 (par defaut=95 : ***************..... par exces=96 : ****************....) */
/* (227 x 107)/255 = 95.250980 (par defaut=95 : ***************..... par exces=95 : ***************.....) */
/* (226 x 108)/255 = 95.717647 (par defaut=95 : ***************..... par exces=96 : ****************....) */
/* (225 x 108)/255 = 95.294118 (par defaut=95 : ***************..... par exces=95 : ***************.....) */
/* (224 x 108)/255 = 94.870588 (par defaut=94 : **************...... par exces=95 : ***************.....) */
/* (223 x 108)/255 = 94.447059 (par defaut=94 : **************...... par exces=94 : **************......) */
/* (222 x 109)/255 = 94.894118 (par defaut=94 : **************...... par exces=95 : ***************.....) */
/* (221 x 109)/255 = 94.466667 (par defaut=94 : **************...... par exces=94 : **************......) */
/* (220 x 109)/255 = 94.039216 (par defaut=94 : **************...... par exces=94 : **************......) */
/* (219 x 110)/255 = 94.470588 (par defaut=94 : **************...... par exces=94 : **************......) */
/* (218 x 110)/255 = 94.039216 (par defaut=94 : **************...... par exces=94 : **************......) */
/* (217 x 110)/255 = 93.607843 (par defaut=93 : *************....... par exces=94 : **************......) */
/* (216 x 111)/255 = 94.023529 (par defaut=94 : **************...... par exces=94 : **************......) */
/* (215 x 111)/255 = 93.588235 (par defaut=93 : *************....... par exces=94 : **************......) */
/* (214 x 111)/255 = 93.152941 (par defaut=93 : *************....... par exces=93 : *************.......) */
/* (213 x 111)/255 = 92.717647 (par defaut=92 : ************........ par exces=93 : *************.......) */
/* (212 x 112)/255 = 93.113725 (par defaut=93 : *************....... par exces=93 : *************.......) */
/* (211 x 112)/255 = 92.674510 (par defaut=92 : ************........ par exces=93 : *************.......) */
/* (210 x 112)/255 = 92.235294 (par defaut=92 : ************........ par exces=92 : ************........) */
/* (209 x 113)/255 = 92.615686 (par defaut=92 : ************........ par exces=93 : *************.......) */
/* (208 x 113)/255 = 92.172549 (par defaut=92 : ************........ par exces=92 : ************........) */
/* (207 x 113)/255 = 91.729412 (par defaut=91 : ***********......... par exces=92 : ************........) */
/* (206 x 114)/255 = 92.094118 (par defaut=92 : ************........ par exces=92 : ************........) */
/* (205 x 114)/255 = 91.647059 (par defaut=91 : ***********......... par exces=92 : ************........) */
/* (204 x 114)/255 = 91.200000 (par defaut=91 : ***********......... par exces=91 : ***********.........) */
/* (203 x 114)/255 = 90.752941 (par defaut=90 : **********.......... par exces=91 : ***********.........) */
/* (202 x 115)/255 = 91.098039 (par defaut=91 : ***********......... par exces=91 : ***********.........) */
/* (201 x 115)/255 = 90.647059 (par defaut=90 : **********.......... par exces=91 : ***********.........) */
/* (200 x 115)/255 = 90.196078 (par defaut=90 : **********.......... par exces=90 : **********..........) */
/* (199 x 116)/255 = 90.525490 (par defaut=90 : **********.......... par exces=91 : ***********.........) */
/* (198 x 116)/255 = 90.070588 (par defaut=90 : **********.......... par exces=90 : **********..........) */
/* (197 x 116)/255 = 89.615686 (par defaut=89 : *********........... par exces=90 : **********..........) */
/* (196 x 117)/255 = 89.929412 (par defaut=89 : *********........... par exces=90 : **********..........) */
/* (195 x 117)/255 = 89.470588 (par defaut=89 : *********........... par exces=89 : *********...........) */
/* (194 x 117)/255 = 89.011765 (par defaut=89 : *********........... par exces=89 : *********...........) */
/* (193 x 117)/255 = 88.552941 (par defaut=88 : ********............ par exces=89 : *********...........) */
/* (192 x 118)/255 = 88.847059 (par defaut=88 : ********............ par exces=89 : *********...........) */
/* (191 x 118)/255 = 88.384314 (par defaut=88 : ********............ par exces=88 : ********............) */
/* (190 x 118)/255 = 87.921569 (par defaut=87 : *******............. par exces=88 : ********............) */
/* (189 x 119)/255 = 88.200000 (par defaut=88 : ********............ par exces=88 : ********............) */
/* (188 x 119)/255 = 87.733333 (par defaut=87 : *******............. par exces=88 : ********............) */
/* (187 x 119)/255 = 87.266667 (par defaut=87 : *******............. par exces=87 : *******.............) */
/* (186 x 120)/255 = 87.529412 (par defaut=87 : *******............. par exces=88 : ********............) */
/* (185 x 120)/255 = 87.058824 (par defaut=87 : *******............. par exces=87 : *******.............) */
/* (184 x 120)/255 = 86.588235 (par defaut=86 : ******.............. par exces=87 : *******.............) */
/* (183 x 120)/255 = 86.117647 (par defaut=86 : ******.............. par exces=86 : ******..............) */
/* (182 x 121)/255 = 86.360784 (par defaut=86 : ******.............. par exces=86 : ******..............) */
/* (181 x 121)/255 = 85.886275 (par defaut=85 : *****............... par exces=86 : ******..............) */
/* (180 x 121)/255 = 85.411765 (par defaut=85 : *****............... par exces=85 : *****...............) */
/* (179 x 122)/255 = 85.639216 (par defaut=85 : *****............... par exces=86 : ******..............) */
/* (178 x 122)/255 = 85.160784 (par defaut=85 : *****............... par exces=85 : *****...............) */
/* (177 x 122)/255 = 84.682353 (par defaut=84 : ****................ par exces=85 : *****...............) */
/* (176 x 123)/255 = 84.894118 (par defaut=84 : ****................ par exces=85 : *****...............) */
/* (175 x 123)/255 = 84.411765 (par defaut=84 : ****................ par exces=84 : ****................) */
/* (174 x 123)/255 = 83.929412 (par defaut=83 : ***................. par exces=84 : ****................) */
/* (173 x 123)/255 = 83.447059 (par defaut=83 : ***................. par exces=83 : ***.................) */
/* (172 x 124)/255 = 83.639216 (par defaut=83 : ***................. par exces=84 : ****................) */
/* (171 x 124)/255 = 83.152941 (par defaut=83 : ***................. par exces=83 : ***.................) */
/* (170 x 124)/255 = 82.666667 (par defaut=82 : **.................. par exces=83 : ***.................) */
/* (169 x 125)/255 = 82.843137 (par defaut=82 : **.................. par exces=83 : ***.................) */
/* (168 x 125)/255 = 82.352941 (par defaut=82 : **.................. par exces=82 : **..................) */
/* (167 x 125)/255 = 81.862745 (par defaut=81 : *................... par exces=82 : **..................) */
/* (166 x 126)/255 = 82.023529 (par defaut=82 : **.................. par exces=82 : **..................) */
/* (165 x 126)/255 = 81.529412 (par defaut=81 : *................... par exces=82 : **..................) */
/* (164 x 126)/255 = 81.035294 (par defaut=81 : *................... par exces=81 : *...................) */
/* */
/* */
/* resultats obtenus par 'v $xtc/interpole.11$c'. */
/* */
/* Un probleme similaire a ete mis en evidence */
/* aux environs du 20120615090941 (voir a ce propos */
/* 'v $xiii/quad_image$FON 20120615074526'). */
/* */
/* */
/*************************************************************************************************************************************/
BFonctionP
DEFV(Common,DEFV(Logical,SINT(Iinterpolation_quelconque_____methode_basique,FAUX)));
/* Introduit le 20240731130249 pour l'image 'v $xiirv/HELI.I4.pi_2pi'... */
DEFV(Common,DEFV(FonctionP,POINTERp(Iinterpolation_quelconque(imageR,ponderateur1,imageA1,ponderateur2,imageA2))))
/* Le 20101012102920 l'ordre des arguments a ete modifie de facon a le rendre plus logique */
/* et compatible avec celui de 'v $xiii/tri_image$FON Iinterpolation'... */
DEFV(Argument,DEFV(image,imageR));
/* Image Resultat, telle que : */
/* */
/* imageR[X][Y]=(ponderateur1[X][Y] * imageA1[X][Y]) + */
/* (ponderateur2[X][Y] * imageA2[X][Y]) */
/* */
/* et on notera qu'en general, 'ponderateur1' et 'ponderateur2' seront deux */
/* images complementaires (en particulier a cause de 'Iaddition'). */
DEFV(Argument,DEFV(image,ponderateur1));
/* Image de ponderation de 'imageA1'. */
DEFV(Argument,DEFV(image,imageA1));
/* Premiere image Argument. */
DEFV(Argument,DEFV(image,ponderateur2));
/* Image de ponderation de 'imageA2'. */
DEFV(Argument,DEFV(image,imageA2));
/* Deuxieme image Argument. */
/*-----------------------------------------------------------------------------------------------------------------------------------*/
Bblock
BDEFV(image,imageMA1);
/* Premiere image de manoeuvre, */
BDEFV(image,imageMA2);
/* Deuxieme image de manoeuvre, */
BDEFV(image,imageMR);
/* Troisieme image de manoeuvre. */
DEFV(genere_p,INIT(point_courant,NIVEAU_UNDEF));
DEFV(genere_p,INIT(voisin_de_gauche,NIVEAU_UNDEF));
DEFV(genere_p,INIT(voisin_de_droite,NIVEAU_UNDEF));
DEFV(genere_p,INIT(voisin_du_bas,NIVEAU_UNDEF));
DEFV(genere_p,INIT(voisin_du_haut,NIVEAU_UNDEF));
/*..............................................................................................................................*/
CALS(Imultiplication(imageMA1,ponderateur1,imageA1));
/* Calcul de : imageMA1[X][Y]=(ponderateur1[X][Y] * imageA1[X][Y]). */
CALS(Imultiplication(imageMA2,ponderateur2,imageA2));
/* Calcul de : imageMA2[X][Y]=(ponderateur2[X][Y] * imageA2[X][Y]). */
CALS(Iaddition(imageMR,imageMA1,imageMA2));
/* Calcul de : imageMR[X][Y]=(imageMA1[X][Y] + imageMA2[X][Y]). */
begin_image
Bblock
EGAL(point_courant,load_point(imageMR,X,Y));
/* Recuperation du point courant, */
EGAL(voisin_de_gauche,load_point_valide(imageMR,PREX(X),NEUT(Y)));
EGAL(voisin_de_droite,load_point_valide(imageMR,SUCX(X),NEUT(Y)));
EGAL(voisin_du_bas,load_point_valide(imageMR,NEUT(X),PREY(Y)));
EGAL(voisin_du_haut,load_point_valide(imageMR,NEUT(X),SUCY(Y)));
/* Et de ses quatre plus proches voisins. */
Test(IFET(IL_NE_FAUT_PAS(Iinterpolation_quelconque_____methode_basique)
,IFET(IFEQ(voisin_de_gauche,voisin_de_droite)
,IFGT(point_courant,CHOI(voisin_de_gauche,voisin_de_droite))
)
)
)
Bblock
store_point(CHOI(voisin_de_gauche,voisin_de_droite),imageR,X,Y,FVARIABLE);
/* Lorsque le point courant est plus grand que ses voisins de droite et de gauche, */
/* et que ces deux derniers sont egaux, c'est leur valeur commune qui est attribuee */
/* au point courant {X,Y}. */
Eblock
ATes
Bblock
Test(IFET(IL_NE_FAUT_PAS(Iinterpolation_quelconque_____methode_basique)
,IFET(IFEQ(voisin_du_bas,voisin_du_haut)
,IFGT(point_courant,CHOI(voisin_du_bas,voisin_du_haut))
)
)
)
Bblock
store_point(CHOI(voisin_du_bas,voisin_du_haut),imageR,X,Y,FVARIABLE);
/* Lorsque le point courant est plus grand que ses voisins du bas et du haut, */
/* et que ces deux derniers sont egaux, c'est leur valeur commune qui est attribuee */
/* au point courant {X,Y}. */
Eblock
ATes
Bblock
store_point(point_courant,imageR,X,Y,FVARIABLE);
/* Lorsque le point courant semble correct, on le prend tel quel... */
Eblock
ETes
Eblock
ETes
Eblock
end_image
EDEFV(image,imageMR);
/* Troisieme image de manoeuvre, */
EDEFV(image,imageMA2);
/* Deuxieme image de manoeuvre, */
EDEFV(image,imageMA1);
/* Premiere image de manoeuvre. */
RETI(imageR);
Eblock
EFonctionP
_______________________________________________________________________________________________________________________________________
_______________________________________________________________________________________________________________________________________
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* I N T E R P O L A T I O N E N T R E D E U X I M A G E S F L O T T A N T E S */
/* S U I V A N T D E U X P O N D E R A T E U R S F L O T T A N T S : */
/* */
/*************************************************************************************************************************************/
BFonctionF
DEFV(Common,DEFV(FonctionF,POINTERF(IFinterpolation_quelconque(imageR,ponderateur1,imageA1,ponderateur2,imageA2))))
/* Le 20101012102920 l'ordre des arguments a ete modifie de facon a le rendre plus logique */
/* et compatible avec celui de 'v $xiii/tri_image$FON Iinterpolation'... */
DEFV(Argument,DEFV(imageF,imageR));
/* Image Resultat, telle que : */
/* */
/* imageR[X][Y]=(ponderateur1[X][Y] * imageA1[X][Y]) + */
/* (ponderateur1[X][Y] * imageA1[X][Y]), */
/* */
/* et on notera qu'en general, 'ponderateur1' et 'ponderateur2' seront deux */
/* images complementaires (en particulier a cause de 'Iaddition'). */
DEFV(Argument,DEFV(imageF,ponderateur1));
/* Image de ponderation de 'imageA1'. */
DEFV(Argument,DEFV(imageF,imageA1));
/* Premiere image Argument. */
DEFV(Argument,DEFV(imageF,ponderateur2));
/* Image de ponderation de 'imageA2'. */
DEFV(Argument,DEFV(imageF,imageA2));
/* Deuxieme image Argument. */
/*-----------------------------------------------------------------------------------------------------------------------------------*/
Bblock
BDEFV(imageF,imageMA1);
/* Premiere image de manoeuvre, */
BDEFV(imageF,imageMA2);
/* Deuxieme image de manoeuvre, */
BDEFV(imageF,imageMR);
/* Troisieme image de manoeuvre. */
DEFV(genere_Float,INIT(point_courant,FLOT__NIVEAU_UNDEF));
DEFV(genere_Float,INIT(voisin_de_gauche,FLOT__NIVEAU_UNDEF));
DEFV(genere_Float,INIT(voisin_de_droite,FLOT__NIVEAU_UNDEF));
DEFV(genere_Float,INIT(voisin_du_bas,FLOT__NIVEAU_UNDEF));
DEFV(genere_Float,INIT(voisin_du_haut,FLOT__NIVEAU_UNDEF));
/*..............................................................................................................................*/
CALS(IFmultiplication(imageMA1,ponderateur1,imageA1));
/* Calcul de : imageMA1[X][Y]=(ponderateur1[X][Y] * imageA1[X][Y]). */
CALS(IFmultiplication(imageMA2,ponderateur2,imageA2));
/* Calcul de : imageMA2[X][Y]=(ponderateur2[X][Y] * imageA2[X][Y]). */
CALS(IFaddition(imageMR,imageMA1,imageMA2));
/* Calcul de : imageMR[X][Y]=(imageMA1[X][Y] + imageMA2[X][Y]). */
begin_image
Bblock
EGAL(point_courant,loadF_point(imageMR,X,Y));
/* Recuperation du point courant, */
EGAL(voisin_de_gauche,loadF_point_valide(imageMR,PREX(X),NEUT(Y)));
EGAL(voisin_de_droite,loadF_point_valide(imageMR,SUCX(X),NEUT(Y)));
EGAL(voisin_du_bas,loadF_point_valide(imageMR,NEUT(X),PREY(Y)));
EGAL(voisin_du_haut,loadF_point_valide(imageMR,NEUT(X),SUCY(Y)));
/* Et de ses quatre plus proches voisins. */
Test(IFET(IFEQ(voisin_de_gauche,voisin_de_droite)
,IFGT(point_courant,CHOI(voisin_de_gauche,voisin_de_droite))
)
)
Bblock
storeF_point(CHOI(voisin_de_gauche,voisin_de_droite),imageR,X,Y);
/* Lorsque le point courant est plus grand que ses voisins de droite et de gauche, */
/* et que ces deux derniers sont egaux, c'est leur valeur commune qui est attribuee */
/* au point courant {X,Y}. */
Eblock
ATes
Bblock
Test(IFET(IFEQ(voisin_du_bas,voisin_du_haut)
,IFGT(point_courant,CHOI(voisin_du_bas,voisin_du_haut))
)
)
Bblock
storeF_point(CHOI(voisin_du_bas,voisin_du_haut),imageR,X,Y);
/* Lorsque le point courant est plus grand que ses voisins du bas et du haut, */
/* et que ces deux derniers sont egaux, c'est leur valeur commune qui est attribuee */
/* au point courant {X,Y}. */
Eblock
ATes
Bblock
storeF_point(point_courant,imageR,X,Y);
/* Lorsque le point courant semble correct, on le prend tel quel... */
Eblock
ETes
Eblock
ETes
Eblock
end_image
EDEFV(imageF,imageMR);
/* Troisieme image de manoeuvre, */
EDEFV(imageF,imageMA2);
/* Deuxieme image de manoeuvre, */
EDEFV(imageF,imageMA1);
/* Premiere image de manoeuvre. */
RETIF(imageR);
Eblock
EFonctionF
_______________________________________________________________________________________________________________________________________
_______________________________________________________________________________________________________________________________________
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* I N T E R P O L A T I O N L O C A L E D E V O I S I N A G E E N T R E D E U X I M A G E S */
/* F L O T T A N T E S S U I V A N T D E U X P O N D E R A T E U R S F L O T T A N T S : */
/* */
/* */
/* Illustration du principe le 20120422090922 (voir aussi 'v $xiav/INTERPOLE_12.11$R16') : */
/* */
/* Soient les deux images suivantes : */
/* */
/* */
/* I1 I2 */
/* */
/* ---------------- ---------------- */
/* | ....--:ooOO%%##| |################| */
/* | ....--:ooOO%%##| |%%%%%%%%%%%%%%%%| */
/* | ....--:ooOO%%##| |OOOOOOOOOOOOOOOO| */
/* | ....--:ooOO%%##| |oooooooooooooooo| */
/* | ....--:ooOO%%##| |----------------| */
/* | ....--:ooOO%%##| |................| */
/* | ....--:ooOO%%##| |................| */
/* | ....--:ooOO%%##| | | */
/* ---------------- ---------------- */
/* */
/* */
/* et le ponderateur (une mire de barres verticales transformee par la substitution utilisant '$xiP/gris.A3') : */
/* */
/* */
/* Po */
/* */
/* ---------------- */
/* | ..-o%######| */
/* | ..-o%######| */
/* | ..-o%######| */
/* | ..-o%######| */
/* | ..-o%######| */
/* | ..-o%######| */
/* | ..-o%######| */
/* | ..-o%######| */
/* ---------------- */
/* */
/* */
/* ce qui donne ensuite les quatre possibilites d'interpolation : */
/* */
/* */
/* A1=I1 A2=I2 A1=I1 A2=I2 A1=I2 A2=I1 A1=I2 A2=I1 */
/* P=Po inverser=FAUX P=Po inverser=VRAI P=Po inverser=FAUX P=Po inverser=VRAI */
/* */
/* ---------------- ---------------- ---------------- ---------------- */
/* | o o O%%##| | ....- ###| < I2 | #####| < I2 |#####--##oOO%%##| */
/* | oo OO%%##| | ....: %%%%%%%| | %#%%%%| |%%%%%%%%ooOO%%##| */
/* | : oooOO%%##| | ....-ooooO OO O| | OO#OOO| |OOOOOO-:OO%%% | */
/* | ::: : oooO%%##| | ....-::ooo oo | | oo:%%ooo| |oooooo-oo | */
/* | -----:::oO%%##| | ....--::: o | | --:ooO--%##| |------- | */
/* |......... O%%##| | ....-- ::: | | ....--:ooOO%%##| |...... | */
/* |..... O%%##| | ....--:: | | ....--:ooOO%%##| |...... | */
/* I2 > | O%%##| | ....- | I1 > | ....--:ooOO%%##| | | */
/* ---------------- ---------------- ---------------- ---------------- */
/* */
/* /|\ /|\ /|\ /|\ */
/* | | | | */
/* */
/* I1 I1 I2 I1 */
/* */
/* */
/* en notant que les points qui apparaissent NOIR ci dessus sont */
/* majoritairement des points qui ne sont pas atteints dans les */
/* interpolations de coordonnees {X,X_associe} et {Y,Y_associe} */
/* dans le 'storeF_point_valide(...)' ci-apres... */
/* */
/* On notera bien que : */
/* */
/* interpolation(I1,I2) # interpolation(I2,I1) */
/* */
/* et que donc cette operation ne "commute" pas... */
/* */
/* */
/*************************************************************************************************************************************/
BFonctionF
DEFV(Common,DEFV(FonctionF,POINTERF(IFinterpolation_locale_de_voisinage(imageR,imageALPHA,imageA1,imageBETA_,imageA2))))
/* Fonction introduite le 20101011154400. */
/* */
/* Le 20101012102920 l'ordre des arguments a ete modifie de facon a le rendre plus logique */
/* et compatible avec celui de 'v $xiii/tri_image$FON Iinterpolation'... */
DEFV(Argument,DEFV(imageF,imageR));
/* Image Resultat, telle que : imageR=alpha*imageA1+beta*imageA2, sachant que les */
/* coordonnees utilisees sont pour : */
/* */
/* imageA1 : {X,Y}, */
/* imageA2 : (Iassociation_de_voisinage_____X(X,Y),Iassociation_de_voisinage_____Y(X,Y)), */
/* imageR : {X,Y}. */
/* */
/* ce qui implique que cette interpolation ne "commute" pas : */
/* */
/* interpolation(imageA1,imageA2) # interpolation(imageA2,imageA1) */
/* */
DEFV(Argument,DEFV(imageF,imageALPHA));
/* Premier coefficient d'interpolation, */
DEFV(Argument,DEFV(imageF,imageA1));
/* Premiere image Argument, */
DEFV(Argument,DEFV(imageF,imageBETA_));
/* Second coefficient d'interpolation. */
DEFV(Argument,DEFV(imageF,imageA2));
/* Seconde image Argument. */
/*-----------------------------------------------------------------------------------------------------------------------------------*/
Bblock
/*..............................................................................................................................*/
Test(EST_VRAI(Iassociation_de_voisinage_____X_association__et__Y_association__sont_initialisees))
Bblock
begin_image
Bblock
DEFV(Int,INIT(X_associe,loadI_point(Iassociation_de_voisinage_____X,X,Y)));
DEFV(Int,INIT(Y_associe,loadI_point(Iassociation_de_voisinage_____Y,X,Y)));
/* Definition des coordonnees associees dans 'imageA2' a {X,Y} de 'imageA1'. */
Test(TEST_DANS_L_IMAGE(X_associe,Y_associe))
/* Test introduit le 20101013094728 car, en effet, il manquait... */
Bblock
DEFV(Float,INIT(alpha,loadF_point(imageALPHA,X,Y)));
DEFV(Float,INIT(beta_,loadF_point(imageBETA_,X,Y)));
/* Definition des interpolateurs en {X,Y}. */
storeF_point_valide(LIZ2(alpha,loadF_point(imageA1,X,Y)
,beta_,loadF_point_valide(imageA2,X_associe,Y_associe)
)
,imageR
,ARRI(COXA(LIZ2(alpha,FLOT(COXR(X))
,beta_,FLOT(COXR(X_associe))
)
)
)
,ARRI(COYA(LIZ2(alpha,FLOT(COYR(Y))
,beta_,FLOT(COYR(Y_associe))
)
)
)
);
/* Interpolation des niveaux et des coordonnees entre 'imageA1' et les points associes */
/* de 'imageA2'... */
/* */
/* Le 20101012183152 les 'INTE(...)'s furent remplaces par des 'ARRI(...)'s qui donnent un */
/* meilleur resultat... */
/* */
/* Le 20101013183449 je note que ce sont les interpolations 'LIN2(...)'s sur les coordonnees */
/* qui sont responsables des trous et des dechirures dans l'image 'imageR'. A cette date */
/* cela demande des convolutions de correction ('v $xiirf/$Fnota Debut_listG_FRA3_R2'). */
Eblock
ATes
Bblock
Eblock
ETes
Eblock
end_image
Eblock
ATes
Bblock
PRINT_ERREUR("l'initialisation par 'Iassociation_de_voisinage(...)' n'a pas encore etait faite");
/* Les matrices 'Iassociation_de_voisinage_____X' et 'Iassociation_de_voisinage_____Y' */
/* n'ont pas encore ete initialisees... */
Eblock
ETes
RETIF(imageR);
Eblock
EFonctionF
_______________________________________________________________________________________________________________________________________
_______________________________________________________________________________________________________________________________________
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* C O M B I N A I S O N D E T Y P E " HORNER_4_02(...) ' D E Q U A T R E I M A G E S F L O T T A N T E S : */
/* */
/*************************************************************************************************************************************/
BFonctionF
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a2222,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a2221,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a2220,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a2212,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a2211,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a2210,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a2202,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a2201,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a2200,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a2122,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a2121,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a2120,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a2112,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a2111,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a2110,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a2102,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a2101,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a2100,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a2022,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a2021,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a2020,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a2012,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a2011,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a2010,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a2002,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a2001,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a2000,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a1222,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a1221,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a1220,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a1212,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a1211,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a1210,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a1202,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a1201,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a1200,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a1122,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a1121,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a1120,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a1112,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a1111,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a1110,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a1102,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a1101,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a1100,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a1022,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a1021,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a1020,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a1012,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a1011,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a1010,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a1002,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a1001,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a1000,FU)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a0222,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a0221,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a0220,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a0212,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a0211,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a0210,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a0202,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a0201,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a0200,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a0122,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a0121,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a0120,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a0112,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a0111,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a0110,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a0102,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a0101,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a0100,FU)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a0022,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a0021,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a0020,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a0012,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a0011,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a0010,FU)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a0002,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a0001,FU)));
DEFV(Common,DEFV(Float,SINT(IFcombinaison_hornerienne_var4_degre2____a0000,FZERO)));
/* Les valeurs par defaut des coefficients de 'HORNER_4_02(...)' sont telles que : */
/* */
/* imageR = imageA1 + imageA2 + imageA3 + imageA4 */
/* */
/* ('v $ximd/operator.1$FON la.somme..x.y.z.t.'). */
DEFV(Common,DEFV(FonctionF,POINTERF(IFcombinaison_hornerienne_var4_degre2(imageR,imageA1,imageA2,imageA3,imageA4))))
/* Fonction introduite le 20190628111223. */
DEFV(Argument,DEFV(imageF,imageR));
/* Image Resultat. */
DEFV(Argument,DEFV(imageF,imageA1));
DEFV(Argument,DEFV(imageF,imageA2));
DEFV(Argument,DEFV(imageF,imageA3));
DEFV(Argument,DEFV(imageF,imageA4));
/* Images Arguments. */
/*-----------------------------------------------------------------------------------------------------------------------------------*/
Bblock
/*..............................................................................................................................*/
begin_image
Bblock
DEFV(genere_Float,INIT(point_courant_A1,loadF_point(imageA1,X,Y)));
DEFV(genere_Float,INIT(point_courant_A2,loadF_point(imageA2,X,Y)));
DEFV(genere_Float,INIT(point_courant_A3,loadF_point(imageA3,X,Y)));
DEFV(genere_Float,INIT(point_courant_A4,loadF_point(imageA4,X,Y)));
DEFV(genere_Float,INIT(point_courant_R,FLOT__NIVEAU_UNDEF));
EGAL(point_courant_R
,HORNER_4_02(point_courant_A1,point_courant_A2,point_courant_A3,point_courant_A4
,IFcombinaison_hornerienne_var4_degre2____a2222
,IFcombinaison_hornerienne_var4_degre2____a2221
,IFcombinaison_hornerienne_var4_degre2____a2220
,IFcombinaison_hornerienne_var4_degre2____a2212
,IFcombinaison_hornerienne_var4_degre2____a2211
,IFcombinaison_hornerienne_var4_degre2____a2210
,IFcombinaison_hornerienne_var4_degre2____a2202
,IFcombinaison_hornerienne_var4_degre2____a2201
,IFcombinaison_hornerienne_var4_degre2____a2200
,IFcombinaison_hornerienne_var4_degre2____a2122
,IFcombinaison_hornerienne_var4_degre2____a2121
,IFcombinaison_hornerienne_var4_degre2____a2120
,IFcombinaison_hornerienne_var4_degre2____a2112
,IFcombinaison_hornerienne_var4_degre2____a2111
,IFcombinaison_hornerienne_var4_degre2____a2110
,IFcombinaison_hornerienne_var4_degre2____a2102
,IFcombinaison_hornerienne_var4_degre2____a2101
,IFcombinaison_hornerienne_var4_degre2____a2100
,IFcombinaison_hornerienne_var4_degre2____a2022
,IFcombinaison_hornerienne_var4_degre2____a2021
,IFcombinaison_hornerienne_var4_degre2____a2020
,IFcombinaison_hornerienne_var4_degre2____a2012
,IFcombinaison_hornerienne_var4_degre2____a2011
,IFcombinaison_hornerienne_var4_degre2____a2010
,IFcombinaison_hornerienne_var4_degre2____a2002
,IFcombinaison_hornerienne_var4_degre2____a2001
,IFcombinaison_hornerienne_var4_degre2____a2000
,IFcombinaison_hornerienne_var4_degre2____a1222
,IFcombinaison_hornerienne_var4_degre2____a1221
,IFcombinaison_hornerienne_var4_degre2____a1220
,IFcombinaison_hornerienne_var4_degre2____a1212
,IFcombinaison_hornerienne_var4_degre2____a1211
,IFcombinaison_hornerienne_var4_degre2____a1210
,IFcombinaison_hornerienne_var4_degre2____a1202
,IFcombinaison_hornerienne_var4_degre2____a1201
,IFcombinaison_hornerienne_var4_degre2____a1200
,IFcombinaison_hornerienne_var4_degre2____a1122
,IFcombinaison_hornerienne_var4_degre2____a1121
,IFcombinaison_hornerienne_var4_degre2____a1120
,IFcombinaison_hornerienne_var4_degre2____a1112
,IFcombinaison_hornerienne_var4_degre2____a1111
,IFcombinaison_hornerienne_var4_degre2____a1110
,IFcombinaison_hornerienne_var4_degre2____a1102
,IFcombinaison_hornerienne_var4_degre2____a1101
,IFcombinaison_hornerienne_var4_degre2____a1100
,IFcombinaison_hornerienne_var4_degre2____a1022
,IFcombinaison_hornerienne_var4_degre2____a1021
,IFcombinaison_hornerienne_var4_degre2____a1020
,IFcombinaison_hornerienne_var4_degre2____a1012
,IFcombinaison_hornerienne_var4_degre2____a1011
,IFcombinaison_hornerienne_var4_degre2____a1010
,IFcombinaison_hornerienne_var4_degre2____a1002
,IFcombinaison_hornerienne_var4_degre2____a1001
,IFcombinaison_hornerienne_var4_degre2____a1000
,IFcombinaison_hornerienne_var4_degre2____a0222
,IFcombinaison_hornerienne_var4_degre2____a0221
,IFcombinaison_hornerienne_var4_degre2____a0220
,IFcombinaison_hornerienne_var4_degre2____a0212
,IFcombinaison_hornerienne_var4_degre2____a0211
,IFcombinaison_hornerienne_var4_degre2____a0210
,IFcombinaison_hornerienne_var4_degre2____a0202
,IFcombinaison_hornerienne_var4_degre2____a0201
,IFcombinaison_hornerienne_var4_degre2____a0200
,IFcombinaison_hornerienne_var4_degre2____a0122
,IFcombinaison_hornerienne_var4_degre2____a0121
,IFcombinaison_hornerienne_var4_degre2____a0120
,IFcombinaison_hornerienne_var4_degre2____a0112
,IFcombinaison_hornerienne_var4_degre2____a0111
,IFcombinaison_hornerienne_var4_degre2____a0110
,IFcombinaison_hornerienne_var4_degre2____a0102
,IFcombinaison_hornerienne_var4_degre2____a0101
,IFcombinaison_hornerienne_var4_degre2____a0100
,IFcombinaison_hornerienne_var4_degre2____a0022
,IFcombinaison_hornerienne_var4_degre2____a0021
,IFcombinaison_hornerienne_var4_degre2____a0020
,IFcombinaison_hornerienne_var4_degre2____a0012
,IFcombinaison_hornerienne_var4_degre2____a0011
,IFcombinaison_hornerienne_var4_degre2____a0010
,IFcombinaison_hornerienne_var4_degre2____a0002
,IFcombinaison_hornerienne_var4_degre2____a0001
,IFcombinaison_hornerienne_var4_degre2____a0000
)
);
storeF_point(point_courant_R,imageR,X,Y);
Eblock
end_image
RETIF(imageR);
Eblock
EFonctionF
_______________________________________________________________________________________________________________________________________
_______________________________________________________________________________________________________________________________________
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* O P E R A T I O N S C O M P L E X E S D E Q U A T R E I M A G E S : */
/* */
/*************************************************************************************************************************************/
BFonctionF
DEFV(Common,DEFV(Logical,SINT(IFproduit_complexe_____multiplicatif,VRAI)));
DEFV(Common,DEFV(Logical,SINT(IFproduit_complexe_____direct,VRAI)));
/* Indicateurs introduits le 20060620125504 afin de permettre en fait les quatre */
/* operations {{+,-},{*,/}}, la multiplication etant l'operation par defaut... */
DEFV(Common,DEFV(FonctionF,POINTERF(IFproduit_complexe(imageR
,ponderation_R,ponderation_I
,ponderation_M,ponderation_A
,imageA_R_1,imageA_I_1
,imageA_R_2,imageA_I_2
)
)
)
)
/* Fonction introduite le 20060619134805. Le 20061018093427, elle a donne naissance a la */
/* fonction 'v $xiii/GooF_image$FON IFproduit_complexe_etendu'... */
DEFV(Argument,DEFV(imageF,imageR));
/* Image Resultat. */
DEFV(Argument,DEFV(Float,ponderation_R));
DEFV(Argument,DEFV(Float,ponderation_I));
DEFV(Argument,DEFV(Float,ponderation_M));
DEFV(Argument,DEFV(Float,ponderation_A));
/* Ponderations de generation de l'image Resultat. */
DEFV(Argument,DEFV(imageF,imageA_R_1));
DEFV(Argument,DEFV(imageF,imageA_I_1));
/* Definition du doublet d'images {R,I} Argument 1. */
DEFV(Argument,DEFV(imageF,imageA_R_2));
DEFV(Argument,DEFV(imageF,imageA_I_2));
/* Definition du doublet d'images {R,I} Argument 2. */
/*-----------------------------------------------------------------------------------------------------------------------------------*/
Bblock
/*..............................................................................................................................*/
begin_image
Bblock
DEFV(complexe,complexe_A1);
DEFV(complexe,complexe_A2);
DEFV(complexe,complexe_R);
/* Definition des nombres complexes Arguments et Resultat. */
Cinitialisation(complexe_A1
,loadF_point(imageA_R_1,X,Y)
,loadF_point(imageA_I_1,X,Y)
);
Cinitialisation(complexe_A2
,loadF_point(imageA_R_2,X,Y)
,loadF_point(imageA_I_2,X,Y)
);
/* Recuperation des nombres complexes Argument... */
Test(EST_VRAI(IFproduit_complexe_____multiplicatif))
Bblock
Test(EST_VRAI(IFproduit_complexe_____direct))
Bblock
Cproduit(complexe_R,complexe_A1,complexe_A2);
/* Calcul du produit des deux nombres complexes Argument... */
Eblock
ATes
Bblock
Cquotient(complexe_R,complexe_A1,complexe_A2);
/* Calcul du quotient des deux nombres complexes Argument... */
Eblock
ETes
Eblock
ATes
Bblock
Test(EST_VRAI(IFproduit_complexe_____direct))
Bblock
Csomme(complexe_R,complexe_A1,complexe_A2);
/* Calcul de la somme des deux nombres complexes Argument... */
Eblock
ATes
Bblock
Cdifference(complexe_R,complexe_A1,complexe_A2);
/* Calcul de la difference des deux nombres complexes Argument... */
Eblock
ETes
Eblock
ETes
storeF_point(LIZ4(ponderation_R,Reelle(complexe_R)
,ponderation_I,Imaginaire(complexe_R)
,ponderation_M,Cmodule(complexe_R)
,ponderation_A,Cargument_PI(complexe_R)
)
,imageR
,X,Y
);
/* Et enfin, renvoi d'une "partie" du Resultat... */
Eblock
end_image
RETIF(imageR);
Eblock
EFonctionF
_______________________________________________________________________________________________________________________________________
_______________________________________________________________________________________________________________________________________
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* O P E R A T I O N S H Y P E R - C O M P L E X E S D E H U I T I M A G E S : */
/* */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* * * * ** * * * * * ** * */
/* * * * * * * * * * * * * * * * */
/* * * * * * * * * * * * * * */
/* * * * * * * * * * * * * * * * */
/* * * * * * * * * * * * * * * * */
/* * * * * * * * * * * * * * * * * * */
/* * * * * * * * * * * * * * */
/* * * * * * * * * * * * * * * * */
/* * * * * ** * * * * * ** */
/* * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* */
/* ATTENTION : */
/* */
/* Pour bien faire, cette fonction 'IFproduit_hyper_complexe(...)' */
/* devrait etre dans 'v $xiii/nona_image$FON' -"nona" pour 9- qui n'existe pas */
/* et que l'on ne va pas creer specialement pour des raisons economiques */
/* evidentes... */
/* */
/*************************************************************************************************************************************/
BFonctionF
DEFV(Common,DEFV(Logical,SINT(IFproduit_hyper_complexe_____multiplicatif,VRAI)));
DEFV(Common,DEFV(Logical,SINT(IFproduit_hyper_complexe_____direct,VRAI)));
/* Indicateurs introduits le 20060620125504 afin de permettre en fait les quatre */
/* operations {{+,-},{*,/}}, la multiplication etant l'operation par defaut... */
DEFV(Common,DEFV(FonctionF,POINTERF(IFproduit_hyper_complexe(imageR
,ponderation_R,ponderation_I,ponderation_J,ponderation_K
,ponderation_M,ponderation_T,ponderation_P,ponderation_A
,imageA_R_1,imageA_I_1,imageA_J_1,imageA_K_1
,imageA_R_2,imageA_I_2,imageA_J_2,imageA_K_2
)
)
)
)
/* Fonction introduite le 20060619134805. Le 20061018093427, elle a donne naissance a la */
/* fonction 'v $xiii/GooF_image$FON IFproduit_hyper_complexe_etendu'... */
DEFV(Argument,DEFV(imageF,imageR));
/* Image Resultat. */
DEFV(Argument,DEFV(Float,ponderation_R));
DEFV(Argument,DEFV(Float,ponderation_I));
DEFV(Argument,DEFV(Float,ponderation_J));
DEFV(Argument,DEFV(Float,ponderation_K));
DEFV(Argument,DEFV(Float,ponderation_M));
DEFV(Argument,DEFV(Float,ponderation_T));
DEFV(Argument,DEFV(Float,ponderation_P));
DEFV(Argument,DEFV(Float,ponderation_A));
/* Ponderations de generation de l'image Resultat. */
DEFV(Argument,DEFV(imageF,imageA_R_1));
DEFV(Argument,DEFV(imageF,imageA_I_1));
DEFV(Argument,DEFV(imageF,imageA_J_1));
DEFV(Argument,DEFV(imageF,imageA_K_1));
/* Definition du quadruplet d'images {R,I,J,K} Argument 1. */
DEFV(Argument,DEFV(imageF,imageA_R_2));
DEFV(Argument,DEFV(imageF,imageA_I_2));
DEFV(Argument,DEFV(imageF,imageA_J_2));
DEFV(Argument,DEFV(imageF,imageA_K_2));
/* Definition du quadruplet d'images {R,I,J,K} Argument 2. */
/*-----------------------------------------------------------------------------------------------------------------------------------*/
Bblock
/*..............................................................................................................................*/
begin_image
Bblock
DEFV(hyper_complexe,quaternion_A1);
DEFV(hyper_complexe,quaternion_A2);
DEFV(hyper_complexe,quaternion_R);
/* Definition des nombres hyper-complexes Arguments et Resultat. */
HCinitialisation(quaternion_A1
,loadF_point(imageA_R_1,X,Y)
,loadF_point(imageA_I_1,X,Y)
,loadF_point(imageA_J_1,X,Y)
,loadF_point(imageA_K_1,X,Y)
);
HCinitialisation(quaternion_A2
,loadF_point(imageA_R_2,X,Y)
,loadF_point(imageA_I_2,X,Y)
,loadF_point(imageA_J_2,X,Y)
,loadF_point(imageA_K_2,X,Y)
);
/* Recuperation des nombres hyper-complexes Argument... */
Test(EST_VRAI(IFproduit_hyper_complexe_____multiplicatif))
Bblock
Test(EST_VRAI(IFproduit_hyper_complexe_____direct))
Bblock
HCproduit(quaternion_R,quaternion_A1,quaternion_A2);
/* Calcul du produit des deux nombres hyper-complexes Argument... */
Eblock
ATes
Bblock
HCquotient(quaternion_R,quaternion_A1,quaternion_A2);
/* Calcul du quotient des deux nombres hyper-complexes Argument... */
Eblock
ETes
Eblock
ATes
Bblock
Test(EST_VRAI(IFproduit_hyper_complexe_____direct))
Bblock
HCsomme(quaternion_R,quaternion_A1,quaternion_A2);
/* Calcul de la somme des deux nombres hyper-complexes Argument... */
Eblock
ATes
Bblock
HCdifference(quaternion_R,quaternion_A1,quaternion_A2);
/* Calcul de la difference des deux nombres hyper-complexes Argument... */
Eblock
ETes
Eblock
ETes
storeF_point(LIZ8(ponderation_R,HReelle(quaternion_R)
,ponderation_I,HImaginaire(quaternion_R)
,ponderation_J,HJmaginaire(quaternion_R)
,ponderation_K,HKmaginaire(quaternion_R)
,ponderation_M,HCmodule(quaternion_R)
,ponderation_T,HCargumentT_PI(quaternion_R)
,ponderation_P,HCargumentP_PI(quaternion_R)
,ponderation_A,HCargumentA_PI(quaternion_R)
)
,imageR
,X,Y
);
/* Et enfin, renvoi d'une "partie" du Resultat... */
Eblock
end_image
RETIF(imageR);
Eblock
EFonctionF
_______________________________________________________________________________________________________________________________________
_______________________________________________________________________________________________________________________________________
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* O P E R A T I O N S H Y P E R - H Y P E R - C O M P L E X E S D E S E I Z E I M A G E S : */
/* */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* * * * ** * * * * * ** * */
/* * * * * * * * * * * * * * * * */
/* * * * * * * * * * * * * * */
/* * * * * * * * * * * * * * * * */
/* * * * * * * * * * * * * * * * */
/* * * * * * * * * * * * * * * * * * */
/* * * * * * * * * * * * * * */
/* * * * * * * * * * * * * * * * */
/* * * * * ** * * * * * ** */
/* * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* */
/* ATTENTION : */
/* */
/* Pour bien faire, cette fonction 'IFproduit_hyper_hyper_complexe(...)' */
/* devrait etre dans 'v $xiii/????_image$FON' qui n'existe pas et */
/* que l'on ne va pas creer specialement pour des raisons economiques */
/* evidentes... */
/* */
/*************************************************************************************************************************************/
BFonctionF
DEFV(Common,DEFV(Logical,SINT(IFproduit_hyper_hyper_complexe_____multiplicatif,VRAI)));
DEFV(Common,DEFV(Logical,SINT(IFproduit_hyper_hyper_complexe_____direct,VRAI)));
/* Indicateurs permettant d'effectuer les quatre operations {{+,-},{*,/}}, la multiplication */
/* etant l'operation par defaut... */
DEFV(Common,DEFV(FonctionF,POINTERF(IFproduit_hyper_hyper_complexe(imageR
,ponderation_R,ponderation_I,ponderation_J,ponderation_K
,ponderation_S,ponderation_T,ponderation_U,ponderation_V
,ponderation_M_,ponderation_A1,ponderation_A2,ponderation_A3
,ponderation_A4,ponderation_A5,ponderation_A6,ponderation_A7
,imageA_R_1,imageA_I_1,imageA_J_1,imageA_K_1
,imageA_S_1,imageA_T_1,imageA_U_1,imageA_V_1
,imageA_R_2,imageA_I_2,imageA_J_2,imageA_K_2
,imageA_S_2,imageA_T_2,imageA_U_2,imageA_V_2
)
)
)
)
/* Fonction introduite le 20110826104347. */
DEFV(Argument,DEFV(imageF,imageR));
/* Image Resultat. */
DEFV(Argument,DEFV(Float,ponderation_R));
DEFV(Argument,DEFV(Float,ponderation_I));
DEFV(Argument,DEFV(Float,ponderation_J));
DEFV(Argument,DEFV(Float,ponderation_K));
DEFV(Argument,DEFV(Float,ponderation_S));
DEFV(Argument,DEFV(Float,ponderation_T));
DEFV(Argument,DEFV(Float,ponderation_U));
DEFV(Argument,DEFV(Float,ponderation_V));
DEFV(Argument,DEFV(Float,ponderation_M_));
DEFV(Argument,DEFV(Float,ponderation_A1));
DEFV(Argument,DEFV(Float,ponderation_A2));
DEFV(Argument,DEFV(Float,ponderation_A3));
DEFV(Argument,DEFV(Float,ponderation_A4));
DEFV(Argument,DEFV(Float,ponderation_A5));
DEFV(Argument,DEFV(Float,ponderation_A6));
DEFV(Argument,DEFV(Float,ponderation_A7));
/* Ponderations de generation de l'image Resultat. */
DEFV(Argument,DEFV(imageF,imageA_R_1));
DEFV(Argument,DEFV(imageF,imageA_I_1));
DEFV(Argument,DEFV(imageF,imageA_J_1));
DEFV(Argument,DEFV(imageF,imageA_K_1));
DEFV(Argument,DEFV(imageF,imageA_S_1));
DEFV(Argument,DEFV(imageF,imageA_T_1));
DEFV(Argument,DEFV(imageF,imageA_U_1));
DEFV(Argument,DEFV(imageF,imageA_V_1));
/* Definition de l'octuplet d'images {R,I,J,K,S,T,U,V} Argument 1. */
DEFV(Argument,DEFV(imageF,imageA_R_2));
DEFV(Argument,DEFV(imageF,imageA_I_2));
DEFV(Argument,DEFV(imageF,imageA_J_2));
DEFV(Argument,DEFV(imageF,imageA_K_2));
DEFV(Argument,DEFV(imageF,imageA_S_2));
DEFV(Argument,DEFV(imageF,imageA_T_2));
DEFV(Argument,DEFV(imageF,imageA_U_2));
DEFV(Argument,DEFV(imageF,imageA_V_2));
/* Definition de l'octuplet d'images {R,I,J,K,S,T,U,V} Argument 2. */
/*-----------------------------------------------------------------------------------------------------------------------------------*/
Bblock
/*..............................................................................................................................*/
begin_image
Bblock
DEFV(hyper_hyper_complexe,octonion_A1);
DEFV(hyper_hyper_complexe,octonion_A2);
DEFV(hyper_hyper_complexe,octonion_R);
/* Definition des nombres hyper-hyper-complexes Arguments et Resultat. */
HHCinitialisation(octonion_A1
,loadF_point(imageA_R_1,X,Y)
,loadF_point(imageA_I_1,X,Y)
,loadF_point(imageA_J_1,X,Y)
,loadF_point(imageA_K_1,X,Y)
,loadF_point(imageA_S_1,X,Y)
,loadF_point(imageA_T_1,X,Y)
,loadF_point(imageA_U_1,X,Y)
,loadF_point(imageA_V_1,X,Y)
);
HHCinitialisation(octonion_A2
,loadF_point(imageA_R_2,X,Y)
,loadF_point(imageA_I_2,X,Y)
,loadF_point(imageA_J_2,X,Y)
,loadF_point(imageA_K_2,X,Y)
,loadF_point(imageA_S_2,X,Y)
,loadF_point(imageA_T_2,X,Y)
,loadF_point(imageA_U_2,X,Y)
,loadF_point(imageA_V_2,X,Y)
);
/* Recuperation des nombres hyper-hyper-complexes Argument... */
Test(EST_VRAI(IFproduit_hyper_hyper_complexe_____multiplicatif))
Bblock
Test(EST_VRAI(IFproduit_hyper_hyper_complexe_____direct))
Bblock
HHCproduit(octonion_R,octonion_A1,octonion_A2);
/* Calcul du produit des deux nombres hyper-hyper-complexes Argument... */
Eblock
ATes
Bblock
HHCquotient(octonion_R,octonion_A1,octonion_A2);
/* Calcul du quotient des deux nombres hyper-hyper-complexes Argument... */
Eblock
ETes
Eblock
ATes
Bblock
Test(EST_VRAI(IFproduit_hyper_hyper_complexe_____direct))
Bblock
HHCsomme(octonion_R,octonion_A1,octonion_A2);
/* Calcul de la somme des deux nombres hyper-hyper-complexes Argument... */
Eblock
ATes
Bblock
HHCdifference(octonion_R,octonion_A1,octonion_A2);
/* Calcul de la difference des deux nombres hyper-hyper-complexes Argument... */
Eblock
ETes
Eblock
ETes
storeF_point(LIZ16(ponderation_R,HHReelle(octonion_R)
,ponderation_I,HHImaginaire(octonion_R)
,ponderation_J,HHJmaginaire(octonion_R)
,ponderation_K,HHKmaginaire(octonion_R)
,ponderation_S,HHSmaginaire(octonion_R)
,ponderation_T,HHTmaginaire(octonion_R)
,ponderation_U,HHUmaginaire(octonion_R)
,ponderation_V,HHVmaginaire(octonion_R)
,ponderation_M_,HHCmodule(octonion_R)
,ponderation_A1,HHCargumentA1_PI(octonion_R)
,ponderation_A2,HHCargumentA2_PI(octonion_R)
,ponderation_A3,HHCargumentA3_PI(octonion_R)
,ponderation_A4,HHCargumentA4_PI(octonion_R)
,ponderation_A5,HHCargumentA5_PI(octonion_R)
,ponderation_A6,HHCargumentA6_PI(octonion_R)
,ponderation_A7,HHCargumentA7_PI(octonion_R)
)
,imageR
,X,Y
);
/* Et enfin, renvoi d'une "partie" du Resultat... */
Eblock
end_image
RETIF(imageR);
Eblock
EFonctionF
_______________________________________________________________________________________________________________________________________
_______________________________________________________________________________________________________________________________________
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* P R O D U I T S D I V E R S E N T R E S I X I M A G E S : */
/* */
/*************************************************************************************************************************************/
#define GENERE__FonctionF_Produits_RVB(nom_et_arguments_de_la_fonction,produit_RVB) \
/* ATTENTION : le nom de la fonction est suivi de ses arguments pour des raisons liees */ \
/* a la recuperation automatique des fichiers d'arguments. */ \
/* */ \
/* Ce generateur a ete introduit le 20071001095158... */ \
DEFV(FonctionF,POINTERF(nom_et_arguments_de_la_fonction)) \
DEFV(Argument,DEFV(imageF,iR)); \
/* Image Resultat... */ \
DEFV(Argument,DEFV(imageF,iA1)); \
DEFV(Argument,DEFV(imageF,iA2)); \
DEFV(Argument,DEFV(imageF,iA3)); \
DEFV(Argument,DEFV(imageF,iA4)); \
DEFV(Argument,DEFV(imageF,iA5)); \
DEFV(Argument,DEFV(imageF,iA6)); \
/* Images Arguments... */ \
/*-----------------------------------------------------------------------------------------------------------------------------------*/ \
Bblock \
/*..............................................................................................................................*/ \
begin_image \
Bblock \
storeF_point(produit_RVB(loadF_point(iA1,X,Y),loadF_point(iA2,X,Y),loadF_point(iA3,X,Y) \
,loadF_point(iA4,X,Y),loadF_point(iA5,X,Y),loadF_point(iA6,X,Y) \
) \
,iR \
,X \
,Y \
); \
Eblock \
end_image \
\
RETIF(iR); \
Eblock
BFonctionF
DEFV(Common,GENERE__FonctionF_Produits_RVB(IFproduit_scalaire(iR,iA1,iA2,iA3,iA4,iA5,iA6),ps0F3D)) /* Common,DEFV(Fonction,) : */
/* on notera qu'en faisant : */
/* */
/* iA4 = iA1 */
/* iA5 = iA2 */
/* iA6 = iA3 */
/* */
/* alors 'IFproduit_scalaire(...)' calcule la norme au carre du vecteur {iA1,iA2,iA3}, */
/* soit donc le carre de la distance a l'origine... */
EFonctionF
BFonctionF
DEFV(Common,GENERE__FonctionF_Produits_RVB(IFproduit_vectorX(iR,iA1,iA2,iA3,iA4,iA5,iA6),PvectX)) /* Common,DEFV(Fonction,) : */
EFonctionF
BFonctionF
DEFV(Common,GENERE__FonctionF_Produits_RVB(IFproduit_vectorY(iR,iA1,iA2,iA3,iA4,iA5,iA6),PvectY)) /* Common,DEFV(Fonction,) : */
EFonctionF
BFonctionF
DEFV(Common,GENERE__FonctionF_Produits_RVB(IFproduit_vectorZ(iR,iA1,iA2,iA3,iA4,iA5,iA6),PvectZ)) /* Common,DEFV(Fonction,) : */
EFonctionF
#undef GENERE__FonctionF_Produits_RVB
_______________________________________________________________________________________________________________________________________
_______________________________________________________________________________________________________________________________________
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* P R O D U I T M I X T E E N T R E N E U F I M A G E S : */
/* */
/*************************************************************************************************************************************/
BFonctionF
DEFV(Common,DEFV(FonctionF,POINTERF(IFproduit_mixte(iR,iA1,iA2,iA3,iA4,iA5,iA6,iA7,iA8,iA9))))
/* Fonction introduite le 20080708171301... */
DEFV(Argument,DEFV(imageF,iR));
/* Image Resultat... */
DEFV(Argument,DEFV(imageF,iA1));
DEFV(Argument,DEFV(imageF,iA2));
DEFV(Argument,DEFV(imageF,iA3));
DEFV(Argument,DEFV(imageF,iA4));
DEFV(Argument,DEFV(imageF,iA5));
DEFV(Argument,DEFV(imageF,iA6));
DEFV(Argument,DEFV(imageF,iA7));
DEFV(Argument,DEFV(imageF,iA8));
DEFV(Argument,DEFV(imageF,iA9));
/* Images Arguments... */
/*-----------------------------------------------------------------------------------------------------------------------------------*/
Bblock
/*..............................................................................................................................*/
begin_image
Bblock
storeF_point(Pmixte(loadF_point(iA1,X,Y),loadF_point(iA2,X,Y),loadF_point(iA3,X,Y)
,loadF_point(iA4,X,Y),loadF_point(iA5,X,Y),loadF_point(iA6,X,Y)
,loadF_point(iA7,X,Y),loadF_point(iA8,X,Y),loadF_point(iA9,X,Y)
)
,iR
,X
,Y
);
Eblock
end_image
RETIF(iR);
Eblock
EFonctionF
_______________________________________________________________________________________________________________________________________
_______________________________________________________________________________________________________________________________________
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* E G A L I S A T I O N D ' H I S T O G R A M M E D ' U N E I M A G E " S T A N D A R D " ' RVB ' : */
/* */
/*************************************************************************************************************************************/
BFonctionI
DEFV(Common,DEFV(FonctionI,Iegalisation_d_histogrammme_RVB(imageR_ROUGE,imageR_VERTE,imageR_BLEUE
,imageA_ROUGE,imageA_VERTE,imageA_BLEUE
)
)
)
/* Cette fonction a ete introduite le 20081010210517... */
DEFV(Argument,DEFV(image,imageR_ROUGE));
DEFV(Argument,DEFV(image,imageR_VERTE));
DEFV(Argument,DEFV(image,imageR_BLEUE));
/* Images Resultat {ROUGE,VERTE,BLEUE}. */
DEFV(Argument,DEFV(image,imageA_ROUGE));
DEFV(Argument,DEFV(image,imageA_VERTE));
DEFV(Argument,DEFV(image,imageA_BLEUE));
/* Images Argument {ROUGE,VERTE,BLEUE}. */
/*-----------------------------------------------------------------------------------------------------------------------------------*/
Bblock
INIT_ERROR;
BDEFV(image,imageA_Hue);
BDEFV(image,imageA_Luminance);
BDEFV(image,imageA_Saturation);
/* Images Argument {Hue,Luminance,Saturation}. */
BDEFV(image,imageA_Luminance_egalisee);
/* Images 'Luminance' egalisee. */
/*..............................................................................................................................*/
CALS(Iconversion_RVB_en_HLS(imageA_Hue,imageA_Luminance,imageA_Saturation
,imageA_ROUGE,imageA_VERTE,imageA_BLEUE
)
);
/* Conversion 'RVB' --> 'HLS'. */
CALS(Iegalisation_d_histogrammme(imageA_Luminance_egalisee,imageA_Luminance));
/* Egalisation de la luminance. */
CALS(Iconversion_HLS_en_RVB(imageR_ROUGE,imageR_VERTE,imageR_BLEUE
,imageA_Hue,imageA_Luminance_egalisee,imageA_Saturation
)
);
/* Conversion 'HLS' --> 'RVB'. */
EDEFV(image,imageA_Luminance_egalisee);
/* Images 'Luminance' egalisee. */
EDEFV(image,imageA_Saturation);
EDEFV(image,imageA_Luminance);
EDEFV(image,imageA_Hue);
/* Images Argument {Hue,Luminance,Saturation}. */
RETU_ERROR;
Eblock
EFonctionI
_______________________________________________________________________________________________________________________________________
_______________________________________________________________________________________________________________________________________
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* E G A L I S A T I O N D E N I V E A U X V O I S I N S D E S C O M P O S A N T E S */
/* D ' U N E I M A G E " S T A N D A R D " ' RVB ' : */
/* */
/*************************************************************************************************************************************/
BFonctionI
DEFV(Common,DEFV(Int,SINT(Iegalisation_locale_de_composantes_RVB_____epsilon,SEIZE)));
/* Definition du voisinage des composantes {ROUGE,VERTE,BLEUE}. */
DEFV(Common,DEFV(Float,SINT(Iegalisation_locale_de_composantes_RVB_____ponderation_MIN3,FZERO)));
DEFV(Common,DEFV(Float,SINT(Iegalisation_locale_de_composantes_RVB_____ponderation_MOY3,FZERO)));
DEFV(Common,DEFV(Float,SINT(Iegalisation_locale_de_composantes_RVB_____ponderation_MAX3,FU)));
DEFV(Common,DEFV(Float,SINT(Iegalisation_locale_de_composantes_RVB_____translation_____,FZERO)));
/* Choix de la methode d'unification des composantes {ROUGE,VERTE,BLEUE} lorsqu'elles */
/* sont proches. La translation a ete introduite le 20190102095836... */
DEFV(Common,DEFV(FonctionI,Iegalisation_locale_de_composantes_RVB(imageR_ROUGE,imageR_VERTE,imageR_BLEUE
,imageA_ROUGE,imageA_VERTE,imageA_BLEUE
)
)
)
/* Cette fonction a ete introduite le 20181228105503... */
DEFV(Argument,DEFV(image,imageR_ROUGE));
DEFV(Argument,DEFV(image,imageR_VERTE));
DEFV(Argument,DEFV(image,imageR_BLEUE));
/* Images Resultat {ROUGE,VERTE,BLEUE}. */
DEFV(Argument,DEFV(image,imageA_ROUGE));
DEFV(Argument,DEFV(image,imageA_VERTE));
DEFV(Argument,DEFV(image,imageA_BLEUE));
/* Images Argument {ROUGE,VERTE,BLEUE}. */
/*-----------------------------------------------------------------------------------------------------------------------------------*/
Bblock
INIT_ERROR;
/*..............................................................................................................................*/
begin_image
Bblock
DEFV(genere_p,INIT(point_courant_ROUGE,load_point(imageA_ROUGE,X,Y)));
DEFV(genere_p,INIT(point_courant_VERTE,load_point(imageA_VERTE,X,Y)));
DEFV(genere_p,INIT(point_courant_BLEUE,load_point(imageA_BLEUE,X,Y)));
Test(I3ET(IFEQ_a_peu_pres_absolu(point_courant_ROUGE,point_courant_VERTE,Iegalisation_locale_de_composantes_RVB_____epsilon)
,IFEQ_a_peu_pres_absolu(point_courant_VERTE,point_courant_BLEUE,Iegalisation_locale_de_composantes_RVB_____epsilon)
,IFEQ_a_peu_pres_absolu(point_courant_BLEUE,point_courant_ROUGE,Iegalisation_locale_de_composantes_RVB_____epsilon)
)
)
Bblock
DEFV(genere_p,INIT(point_courant_ROUGE_VERTE_BLEUE
,GENP(NIVA(LIN3(Iegalisation_locale_de_composantes_RVB_____ponderation_MIN3
,FLOT(NIVR(MIN3(point_courant_ROUGE
,point_courant_VERTE
,point_courant_BLEUE
)
)
)
,Iegalisation_locale_de_composantes_RVB_____ponderation_MOY3
,FLOT(NIVR(MOY3(point_courant_ROUGE
,point_courant_VERTE
,point_courant_BLEUE
)
)
)
,Iegalisation_locale_de_composantes_RVB_____ponderation_MAX3
,FLOT(NIVR(MAX3(point_courant_ROUGE
,point_courant_VERTE
,point_courant_BLEUE
)
)
)
,Iegalisation_locale_de_composantes_RVB_____translation_____
)
)
)
)
);
store_point(point_courant_ROUGE_VERTE_BLEUE,imageR_ROUGE,X,Y,FVARIABLE);
store_point(point_courant_ROUGE_VERTE_BLEUE,imageR_VERTE,X,Y,FVARIABLE);
store_point(point_courant_ROUGE_VERTE_BLEUE,imageR_BLEUE,X,Y,FVARIABLE);
/* Cas ou les trois niveaux {ROUGE,VERTE,BLEUE} sont proches : ils ne font alors plus qu'un. */
Eblock
ATes
Bblock
store_point(point_courant_ROUGE,imageR_ROUGE,X,Y,FVARIABLE);
store_point(point_courant_VERTE,imageR_VERTE,X,Y,FVARIABLE);
store_point(point_courant_BLEUE,imageR_BLEUE,X,Y,FVARIABLE);
/* Cas ou les trois niveaux {ROUGE,VERTE,BLEUE} sont eloignes : ils sont conserves... */
Eblock
ETes
Eblock
end_image
RETU_ERROR;
Eblock
EFonctionI
_______________________________________________________________________________________________________________________________________
_______________________________________________________________________________________________________________________________________
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* T R A N S F O R M A T I O N 1 D E S C O U L E U R S E N F O N C T I O N D E S C O O R D O N N E E S */
/* P O U R D E U X T R I P L E T S D ' I M A G E S S T A N D A R D : */
/* */
/*************************************************************************************************************************************/
BFonctionI
#define TRANSFORMATION_DE_TROIS_NIVEAUX_RVB_EN_UNE_COORDONNEE(NomCoordonnee) \
Bblock \
EGAL(coordonnee_ ## NomCoordonnee ## _normalisee \
,LRZ3(Itransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_ROUGE_ ## NomCoordonnee \
,niveau_courant_normalise_ROUGE \
,Itransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_VERTE_ ## NomCoordonnee \
,niveau_courant_normalise_VERTE \
,Itransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_BLEUE_ ## NomCoordonnee \
,niveau_courant_normalise_BLEUE \
) \
); \
/* Utilisation simple d'une combinaison lineaire et donc d'une methode plus simple que celle */ \
/* de 'IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY(...)'. */ \
EGAL(coordonnee_ ## NomCoordonnee ## _denormalisee \
,_cDENORMALISE_O ## NomCoordonnee(coordonnee_ ## NomCoordonnee ## _normalisee) \
); \
Eblock \
/* Introduit le 20190725094932 sous cette forme... */ \
/* */ \
/* Cette version a demande les modifications 'v $xiiD/definit.1$DEF 20190726101713'... */
DEFV(Common,DEFV(Float,SINT(Itransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_ROUGE_X,FZERO)));
DEFV(Common,DEFV(Float,SINT(Itransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_VERTE_X,FQU)));
DEFV(Common,DEFV(Float,SINT(Itransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_BLEUE_X,FDU)));
DEFV(Common,DEFV(Float,SINT(Itransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_ROUGE_Y,FDU)));
DEFV(Common,DEFV(Float,SINT(Itransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_VERTE_Y,FQU)));
DEFV(Common,DEFV(Float,SINT(Itransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_BLEUE_Y,FZERO)));
/* Ponderations utiles pour definir les coordonnees {X,Y} de transformation et definies */
/* de facon tout a fait arbitraire... */
/* */
/* On notera le 20190730183556 que les valeurs par defaut des ponderations, a savoir */
/* {FZERO,FQU,FDU}, sont choisies de facon que leur somme soit inferieure a 1. En fait, */
/* je note le 20190731092325 que cela ne sert a rien puisque le 'LRZ3(...)' renormalise */
/* via la somme des trois ponderations (et du 'FZERO'...). */
DEFV(Common,DEFV(FonctionI,Itransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY(imageR_ROUGE,imageR_VERTE,imageR_BLEUE
,imageA_ROUGE,imageA_VERTE,imageA_BLEUE
,imageN_ROUGE,imageN_VERTE,imageN_BLEUE
)
)
)
/* Cette fonction a ete introduite le 20190724091957... */
DEFV(Argument,DEFV(image,imageR_ROUGE));
DEFV(Argument,DEFV(image,imageR_VERTE));
DEFV(Argument,DEFV(image,imageR_BLEUE));
/* Images Resultat {ROUGE,VERTE,BLEUE}. */
DEFV(Argument,DEFV(image,imageA_ROUGE));
DEFV(Argument,DEFV(image,imageA_VERTE));
DEFV(Argument,DEFV(image,imageA_BLEUE));
/* Images Argument {ROUGE,VERTE,BLEUE} a transformer (RVB --0--> XY). */
DEFV(Argument,DEFV(image,imageN_ROUGE));
DEFV(Argument,DEFV(image,imageN_VERTE));
DEFV(Argument,DEFV(image,imageN_BLEUE));
/* Images Argument {ROUGE,VERTE,BLEUE} definissant les Niveaux des images 'imageR'. */
/*-----------------------------------------------------------------------------------------------------------------------------------*/
Bblock
INIT_ERROR;
/*..............................................................................................................................*/
BSaveModifyVariable(Logical,AXES_COORDONNEES_FERMES_OUVERTS_____compatibilite_20090929,FAUX);
BSaveModifyVariable(Logical,AXE_NIVEAUX_OUVERT_FERME_____compatibilite_19951221,VRAI);
/* Introduit le 20190724133544 afin que les axes de niveaux et les axes de coordonnees */
/* soient compatibles (c'est-a-dire utilisant [0,1[), puisqu'ils vont etre "melanges" */
/* ci-apres. Fut ajoute 'AXES_COORDONNEES_FERMES_OUVERTS_____compatibilite_20090929' */
/* le 20190724150704 pour etre certain du bon fonctionnement... */
/* */
/* En format 'Pal' avec '$xcp/Loperators_I$K' utilisant les arguments : */
/* */
/* AXES_COORDONNEES_FERMES_OUVERTS_____compatibilite_20090929=FAUX */
/* AXE_NIVEAUX_OUVERT_FERME_____compatibilite_19951221=VRAI */
/* */
/* cela donne les quelques valeurs interessantes suivantes : */
/* */
/* _cDENORMALISE_OX(+0)=+0 */
/* _cDENORMALISE_OX(+1)=+780 */
/* _cDENORMALISE_OY(+0)=+0 */
/* _cDENORMALISE_OY(+1)=+575 */
/* */
/* ______NORMALISE_NIVEAU(+0)=+0 */
/* ______NORMALISE_NIVEAU(+255)=+0.99609375 */
/* */
begin_image
Bblock
DEFV(Float,INIT(niveau_courant_normalise_ROUGE,______NORMALISE_NIVEAU(load_point(imageA_ROUGE,X,Y))));
DEFV(Float,INIT(niveau_courant_normalise_VERTE,______NORMALISE_NIVEAU(load_point(imageA_VERTE,X,Y))));
DEFV(Float,INIT(niveau_courant_normalise_BLEUE,______NORMALISE_NIVEAU(load_point(imageA_BLEUE,X,Y))));
DEFV(Float,INIT(coordonnee_X_normalisee,FLOT__UNDEF));
DEFV(Float,INIT(coordonnee_Y_normalisee,FLOT__UNDEF));
DEFV(Int,INIT(coordonnee_X_denormalisee,UNDEF));
DEFV(Int,INIT(coordonnee_Y_denormalisee,UNDEF));
TRANSFORMATION_DE_TROIS_NIVEAUX_RVB_EN_UNE_COORDONNEE(X);
TRANSFORMATION_DE_TROIS_NIVEAUX_RVB_EN_UNE_COORDONNEE(Y);
/* Les triplets de niveaux {R,V,B} des trois images 'imageA' sont transformes en couple */
/* de coordonnees {X,Y} d'acces aux trois images 'imageN'... */
store_point(load_point_valide(imageN_ROUGE,coordonnee_X_denormalisee,coordonnee_Y_denormalisee),imageR_ROUGE,X,Y,FVARIABLE);
store_point(load_point_valide(imageN_VERTE,coordonnee_X_denormalisee,coordonnee_Y_denormalisee),imageR_VERTE,X,Y,FVARIABLE);
store_point(load_point_valide(imageN_BLEUE,coordonnee_X_denormalisee,coordonnee_Y_denormalisee),imageR_BLEUE,X,Y,FVARIABLE);
/* Et generation des nouveaux niveaux... */
Eblock
end_image
ESaveModifyVariable(Logical,AXE_NIVEAUX_OUVERT_FERME_____compatibilite_19951221);
ESaveModifyVariable(Logical,AXES_COORDONNEES_FERMES_OUVERTS_____compatibilite_20090929);
RETU_ERROR;
Eblock
#undef TRANSFORMATION_DE_TROIS_NIVEAUX_RVB_EN_UNE_COORDONNEE
EFonctionI
_______________________________________________________________________________________________________________________________________
_______________________________________________________________________________________________________________________________________
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* T R A N S F O R M A T I O N 1 D E S C O U L E U R S E N F O N C T I O N D E S C O O R D O N N E E S */
/* P O U R D E U X T R I P L E T S D ' I M A G E S N O N S T A N D A R D : */
/* */
/*************************************************************************************************************************************/
BFonctionI
#define TRANSFORMATION_DE_TROIS_NIVEAUX_RVB_EN_UNE_COORDONNEE(NomCoo) \
Bblock \
EGAL(coordonnee_ ## NomCoo ## _flottante \
,HORNER_3_02(niveau_courant_ROUGE \
,niveau_courant_VERTE \
,niveau_courant_BLEUE \
,IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a222_ ## NomCoo \
,IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a221_ ## NomCoo \
,IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a220_ ## NomCoo \
,IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a212_ ## NomCoo \
,IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a211_ ## NomCoo \
,IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a210_ ## NomCoo \
,IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a202_ ## NomCoo \
,IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a201_ ## NomCoo \
,IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a200_ ## NomCoo \
,IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a122_ ## NomCoo \
,IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a121_ ## NomCoo \
,IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a120_ ## NomCoo \
,IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a112_ ## NomCoo \
,IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a111_ ## NomCoo \
,IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a110_ ## NomCoo \
,IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a102_ ## NomCoo \
,IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a101_ ## NomCoo \
,IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a100_ ## NomCoo \
,IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a022_ ## NomCoo \
,IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a021_ ## NomCoo \
,IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a020_ ## NomCoo \
,IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a012_ ## NomCoo \
,IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a011_ ## NomCoo \
,IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a010_ ## NomCoo \
,IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a002_ ## NomCoo \
,IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a001_ ## NomCoo \
,IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a000_ ## NomCoo \
) \
); \
/* Utilisation d'un polynome du second degre et donc d'une methode plus generale que celle */ \
/* de 'Itransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY(...)'. */ \
Eblock
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a222_X,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a221_X,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a220_X,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a212_X,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a211_X,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a210_X,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a202_X,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a201_X,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a200_X,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a122_X,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a121_X,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a120_X,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a112_X,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a111_X,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a110_X,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a102_X,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a101_X,FQU)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a100_X,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a022_X,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a021_X,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a020_X,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a012_X,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a011_X,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a010_X,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a002_X,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a001_X,FDU)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a000_X,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a222_Y,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a221_Y,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a220_Y,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a212_Y,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a211_Y,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a210_Y,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a202_Y,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a201_Y,FDU)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a200_Y,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a122_Y,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a121_Y,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a120_Y,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a112_Y,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a111_Y,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a110_Y,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a102_Y,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a101_Y,FQU)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a100_Y,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a022_Y,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a021_Y,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a020_Y,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a012_Y,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a011_Y,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a010_Y,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a002_Y,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a001_Y,FZERO)));
DEFV(Common,DEFV(Float,SINT(IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY_____ponderation_a000_Y,FZERO)));
/* Ponderations utiles pour definir les coordonnees {X,Y} de transformation et definies */
/* de facon tout a fait arbitraire... */
/* */
/* On notera que la somme des ponderations {FZERO,FQU,FDU} est inferieure a 1. En fait, je */
/* note le 20190731092325 que cela ne sert a rien, le 'IFnormalisation_automatique(...)' */
/* renormalisant les valeurs calculees... */
DEFV(Common,DEFV(FonctionI,IFtransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY(imageR_ROUGE,imageR_VERTE,imageR_BLEUE
,imageA_ROUGE,imageA_VERTE,imageA_BLEUE
,imageN_ROUGE,imageN_VERTE,imageN_BLEUE
)
)
)
/* Cette fonction a ete introduite le 20190730105122... */
DEFV(Argument,DEFV(imageF,imageR_ROUGE));
DEFV(Argument,DEFV(imageF,imageR_VERTE));
DEFV(Argument,DEFV(imageF,imageR_BLEUE));
/* Images Resultat {ROUGE,VERTE,BLEUE}. */
DEFV(Argument,DEFV(imageF,imageA_ROUGE));
DEFV(Argument,DEFV(imageF,imageA_VERTE));
DEFV(Argument,DEFV(imageF,imageA_BLEUE));
/* Images Argument {ROUGE,VERTE,BLEUE} a transformer (RVB --0--> XY). */
DEFV(Argument,DEFV(imageF,imageN_ROUGE));
DEFV(Argument,DEFV(imageF,imageN_VERTE));
DEFV(Argument,DEFV(imageF,imageN_BLEUE));
/* Images Argument {ROUGE,VERTE,BLEUE} definissant les Niveaux des images 'imageR'. */
/*-----------------------------------------------------------------------------------------------------------------------------------*/
Bblock
INIT_ERROR;
/*..............................................................................................................................*/
BDEFV(imageF,imageT1_X);
BDEFV(imageF,imageT1_Y);
BDEFV(imageF,imageT2_X);
BDEFV(imageF,imageT2_Y);
/* Images de manoeuvre. */
BSaveModifyVariable(Logical,AXES_COORDONNEES_FERMES_OUVERTS_____compatibilite_20090929,FAUX);
/* Par "symetrie" avec 'Itransformation_1_des_niveaux_RVB_en_fonction_des_coordonnees_XY'... */
begin_image
Bblock
DEFV(genere_Float,INIT(niveau_courant_ROUGE,loadF_point(imageA_ROUGE,X,Y)));
DEFV(genere_Float,INIT(niveau_courant_VERTE,loadF_point(imageA_VERTE,X,Y)));
DEFV(genere_Float,INIT(niveau_courant_BLEUE,loadF_point(imageA_BLEUE,X,Y)));
DEFV(Float,INIT(coordonnee_X_flottante,FLOT__UNDEF));
DEFV(Float,INIT(coordonnee_Y_flottante,FLOT__UNDEF));
TRANSFORMATION_DE_TROIS_NIVEAUX_RVB_EN_UNE_COORDONNEE(X);
TRANSFORMATION_DE_TROIS_NIVEAUX_RVB_EN_UNE_COORDONNEE(Y);
/* Les triplets de niveaux {R,V,B} des trois images 'imageA' sont transformes en couple */
/* de coordonnees {X,Y} d'acces aux trois images 'imageN'... */
storeF_point(coordonnee_X_flottante,imageT1_X,X,Y);
storeF_point(coordonnee_Y_flottante,imageT1_Y,X,Y);
Eblock
end_image
BSaveModifyVariable(Logical,IFnormalisation_____compatibilite_20120705,VRAI);
/* Afin de gerer correctement le cas ou les extrema sont egaux... */
BSaveModifyVariable(Logical,IFnormalisation_____conserver_le_zero,FAUX);
/* On ne sait jamais... */
CALS(IFnormalisation_automatique(imageT2_X,imageT1_X));
CALS(IFnormalisation_automatique(imageT2_Y,imageT1_Y));
/* Normalisation des futures coordonnees 'X' et 'Y'... */
ESaveModifyVariable(Logical,IFnormalisation_____conserver_le_zero);
ESaveModifyVariable(Logical,IFnormalisation_____compatibilite_20120705);
begin_image
Bblock
DEFV(Float,INIT(coordonnee_X_normalisee,loadF_point(imageT2_X,X,Y)));
DEFV(Float,INIT(coordonnee_Y_normalisee,loadF_point(imageT2_Y,X,Y)));
DEFV(Int,INIT(coordonnee_X_denormalisee,UNDEF));
DEFV(Int,INIT(coordonnee_Y_denormalisee,UNDEF));
EGAL(coordonnee_X_denormalisee,_cDENORMALISE_OX(coordonnee_X_normalisee));
EGAL(coordonnee_Y_denormalisee,_cDENORMALISE_OY(coordonnee_Y_normalisee));
storeF_point(loadF_point_valide(imageN_ROUGE,coordonnee_X_denormalisee,coordonnee_Y_denormalisee),imageR_ROUGE,X,Y);
storeF_point(loadF_point_valide(imageN_VERTE,coordonnee_X_denormalisee,coordonnee_Y_denormalisee),imageR_VERTE,X,Y);
storeF_point(loadF_point_valide(imageN_BLEUE,coordonnee_X_denormalisee,coordonnee_Y_denormalisee),imageR_BLEUE,X,Y);
/* Et generation des nouveaux niveaux... */
Eblock
end_image
ESaveModifyVariable(Logical,AXES_COORDONNEES_FERMES_OUVERTS_____compatibilite_20090929);
EDEFV(imageF,imageT2_Y);
EDEFV(imageF,imageT2_X);
EDEFV(imageF,imageT1_Y);
EDEFV(imageF,imageT1_X);
RETU_ERROR;
Eblock
#undef TRANSFORMATION_DE_TROIS_NIVEAUX_RVB_EN_UNE_COORDONNEE
EFonctionI
_______________________________________________________________________________________________________________________________________
Copyright © Jean-François COLONNA, 2019-2024.
Copyright © CMAP (Centre de Mathématiques APpliquées) UMR CNRS 7641 / École polytechnique, Institut Polytechnique de Paris, 2019-2024.