/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        T R A N S F O R M E E   " D E M I - S O M M E / D E M I - D I F F E R E N C E "                                            */
/*        D ' U N E   I M A G E   F L O T T A N T E  :                                                                               */
/*                                                                                                                                   */
/*                                                                                                                                   */
/*        Nota :                                                                                                                     */
/*                                                                                                                                   */
/*                    On notera le 20130821142550 qu'il serait                                                                       */
/*                  logique de rebaptiser '$xci/somme_difference.01$K'                                                               */
/*                  ce programme et ce apres le changement logique                                                                   */
/*                  du nom des fonctions correspondantes, les mots                                                                   */
/*                  "moyenne" et "difference" ayant ete remplaces                                                                    */
/*                  par "demi-somme" et "demi-difference" respectivement.                                                            */
/*                  Malgre tout, je ne le fais pas afin de simplifier les                                                            */
/*                  choses...                                                                                                        */
/*                                                                                                                                   */
/*                                                                                                                                   */
/*        Author of '$xci/moye_diff.01$K' :                                                                                          */
/*                                                                                                                                   */
/*                    Jean-Francois COLONNA (LACTAMME, 20030324141123).                                                              */
/*                                                                                                                                   */
/*************************************************************************************************************************************/

/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        I N T E R F A C E   ' listG '  :                                                                                           */
/*                                                                                                                                   */
/*                                                                                                                                   */
/*        :Debut_listG:                                                                                                              */
/*        :Fin_listG:                                                                                                                */
/*                                                                                                                                   */
/*************************************************************************************************************************************/

/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        D I R E C T I V E S   S P E C I F I Q U E S   D E   C O M P I L A T I O N  :                                               */
/*                                                                                                                                   */
/*************************************************************************************************************************************/

/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        F I C H I E R S   D ' I N C L U D E S  :                                                                                   */
/*                                                                                                                                   */
/*************************************************************************************************************************************/
#include  INCLUDES_BASE
#include  image_image_IMAGESF_EXT
#include  image_image_QUAD_IMAGE_EXT
#include  maths_trans_ONDELETTES_EXT

/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        P A R A M E T R E S  :                                                                                                     */
/*                                                                                                                                   */
/*************************************************************************************************************************************/
#define   CALCULER_LA_TRANSFORMEE_DIRECTE                                                                                               \
                    VRAI                                                                                                                \
                                        /* Faut-il calculer la transformee directe ('VRAI') ou inverse ('FAUX') ?                    */

/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        M A C R O S   U T I L E S  :                                                                                               */
/*                                                                                                                                   */
/*************************************************************************************************************************************/

/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        T R A N S F O R M E E   " D E M I - S O M M E / D E M I - D I F F E R E N C E "                                            */
/*        D ' U N E   I M A G E   F L O T T A N T E  :                                                                               */
/*                                                                                                                                   */
/*************************************************************************************************************************************/
BCommande(nombre_d_arguments,arguments)
/*-----------------------------------------------------------------------------------------------------------------------------------*/
     Bblock
     DEFV(CHAR,INIC(POINTERc(nom_imageR),NOM_PIPE));
     DEFV(CHAR,INIC(POINTERc(nom_imageA),NOM_PIPE));

     DEFV(Logical,INIT(calculer_la_transformee_directe,CALCULER_LA_TRANSFORMEE_DIRECTE));
                                        /* Faut-il calculer la transformee directe ('VRAI') ou inverse ('FAUX') ?                    */
     /*..............................................................................................................................*/
     GET_ARGUMENTSi(nombre_d_arguments
                   ,BLOC(GET_ARGUMENT_C("imageA=""A=",nom_imageA);
                         GET_ARGUMENT_C("imageR=""R=",nom_imageR);

                         GET_ARGUMENT_L("directe=",calculer_la_transformee_directe);
                         GET_ARGUMENT_N("inverser=""inverse=",calculer_la_transformee_directe);

                         GET_ARGUMENT_I("nombre_points_horizontale=""nph="
                                       ,IFsomme_difference_2D_____nombre_de_points_a_la_fin_de_la_recursivite__horizontale
                                        );
                         GET_ARGUMENT_I("nombre_points_verticale=""npv="
                                       ,IFsomme_difference_2D_____nombre_de_points_a_la_fin_de_la_recursivite__verticale
                                        );
                                        /* Arguments introduits le 20151209131802...                                                 */

                         GET_ARGUMENT_F("sm=""seuilm=""ss=""seuils="
                                       ,IFsomme_difference_1D_____seuil_de_filtrage_des_demi_sommes______de_la_transformee_inverse
                                        );
                         GET_ARGUMENT_F("seuild=""sd="
                                       ,IFsomme_difference_1D_____seuil_de_filtrage_des_demi_differences_de_la_transformee_inverse
                                        );
                                        /* ATTENTION : ces seuils sont en general dans [0,1] et non point dans [$NOIR,$BLANC]...     */
                         )
                    );

     CALi(IFinitialisation(IFmageR,FZERO));
                                        /* Initialisation de l'image Resultat.                                                       */

     Test(PAS_D_ERREUR(CODE_ERROR(IloadF_image(IFmageA,nom_imageA))))
          Bblock
          CALS(IFsomme_difference_2D(IFmageR,IFmageA,calculer_la_transformee_directe));
                                        /* Et calcul de la transformee "somme-difference" directe ou inverse...                      */

          CALi(IupdateF_image(nom_imageR,IFmageR));
          Eblock
     ATes
          Bblock
          Test__CODE_ERREUR__ERREUR07;
          Eblock
     ETes

     RETU_Commande;
     Eblock
ECommande



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.