IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

MATLAB Discussion :

convertir code C en MATLAB


Sujet :

MATLAB

  1. #1
    Membre à l'essai
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2013
    Messages
    26
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Conseil

    Informations forums :
    Inscription : Avril 2013
    Messages : 26
    Points : 14
    Points
    14
    Par défaut convertir code C en MATLAB
    Bonsoir,

    SVP je veux exécute le code ci -joint en C sous Matlab . Merci bcp
    Fichiers attachés Fichiers attachés

  2. #2
    Rédacteur/Modérateur

    Avatar de Jerome Briot
    Homme Profil pro
    Freelance mécatronique - Conseil, conception et formation
    Inscrit en
    Novembre 2006
    Messages
    20 302
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Freelance mécatronique - Conseil, conception et formation

    Informations forums :
    Inscription : Novembre 2006
    Messages : 20 302
    Points : 53 166
    Points
    53 166
    Par défaut
    Pour commencer, il est plus respectueux de citer ses sources : Perception and Neurodynamics Laboratory (PNL) et plus précisément : http://www.cse.ohio-state.edu/~dwang...are/wang-nc97/

    Le code est suffisamment simple pour être facilement transformé en MEX :

    Code C : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
           /*****************************************************************/
           /* This program is for 2D segmentation using the LEGION network  */
           /* The equations were modeled as a PDP algorithm for efficiency  */
           /* by DeLiang Wang in 7/94. For a detailed description of the    */
           /* algorithm see D.L. Wang and D. Terman: "Image segmentation    */
           /* based on oscillatory correlation", Neural Computation, Vol. 9 */
           /* pp. 805-836, 1997 (For errata see Neural Computation 9,       */
           /* 1623-1626, 1997), on page 822.                                */
           /*****************************************************************/
     
    #include "mex.h"
    #include "segment.h"
     
    #define MAXVAL 32768.0
                   /* 2147483648.0 or 32768.0,machine (HP or SUN) dependable*/
    #define MAX 32767 /* 2147483647 or 32767, machine dependable */
    #define GRAY 255  /* Maximum value of a pixel */
     
    int bi();
    int jump[2], z, Num = 1;             /* so we can change step size at will */
                                   /* Num: number of the segments */
    FILE *outfile, *fopen();
    float x[N1][N2][2], lateral[N1][N2];
                          /* lateral: the sum of input from lateral connections */
    float W[N1][N2][8];   /* strength of the interactions for 4 directions */
    int stim[N1][N2], matrix[N1][N2];
    int y[N1][N2], cycle[N1][N2], trigger[N1][N2];
         /* y: integer of x; cycle: test for 1st cycle; trigger: jumping signal */
     
     
    void inputs(void)
    {
       int i, j;
       int width, height, c;
       char magic[25];
       float stimulus = 0.2;
       FILE *IN;
     
       for (i = 0; i < N1; i++) 
         for (j = 0; j < N2; j++)
           matrix[i][j] = 0;
     
       IN = fopen("lake1.pgm", "r");
       fscanf(IN,"%s\n%d %d\n%d\n",magic,&width,&height,&c);
       fprintf(stderr,"[Type %s %dx%d colours %d]\n",magic,width,height,c);
     
       for(i=0;i<160;i++)  
          for(j=0;j<160;j++)
             stim[i][j] = getc(IN);
     
       fclose(IN);
    }
     
    void connections(void)
    {
       int i, j, k;
       float baseline = 0.0, Wtotal = 6.0, sum;
     
       for (i = 0; i < N1; i++) /* for eight nearest neighbors */
         for (j = 0; j < N2; j++) {
           W[i][j][0] = W[i][j][1] = W[i][j][2] = W[i][j][3] = 0.0;
           W[i][j][4] = W[i][j][5] = W[i][j][6] = W[i][j][7] = 0.0;
         }
     
       for (i = 0; i < N1; i++) 
         for (j = 0; j < N2; j++) {
    	 sum = 0.0;
     
             if (j-1 >= 0)
    	    W[i][j][0] = (float) GRAY/(1+abs(stim[i][j]-stim[i][j-1]));
             if (i-1 >= 0 && j-1 >= 0)
    	    W[i][j][1] = (float) GRAY/(1+abs(stim[i][j]-stim[i-1][j-1]));
             if (i-1 >= 0)
    	    W[i][j][2] = (float) GRAY/(1+abs(stim[i][j]-stim[i-1][j]));
             if (i-1 >= 0 && j+1 < N2)
    	    W[i][j][3] = (float) GRAY/(1+abs(stim[i][j]-stim[i-1][j+1]));
             if (j+1 < N2)
    	    W[i][j][4] = (float) GRAY/(1+abs(stim[i][j]-stim[i][j+1]));
             if (i+1 < N1 && j+1 < N2) 
    	    W[i][j][5] = (float) GRAY/(1+abs(stim[i][j]-stim[i+1][j+1]));
             if (i+1 < N1)
    	    W[i][j][6] = (float) GRAY/(1+abs(stim[i][j]-stim[i+1][j]));
             if (i+1 < N1 && j-1 >= 0)
    	    W[i][j][7] = (float) GRAY/(1+abs(stim[i][j]-stim[i+1][j-1]));
     
             for (k = 0; k < 8; k++) lateral[i][j] += W[i][j][k];
        }
    }
     
    void initiate(void)
    {
       int i,j,t, temp;  /* labels for setting up display intervals */
     
       for (i = 0; i < N1; i++)   /* randomize the initial phases */
         for (j = 0; j < N2; j++) {
            y[i][j] = rand();
            x[i][j][0] = y[i][j]/(MAXVAL + 1.0);
    	y[i][j] -= 2;
    	if (y[i][j] < 0)
    	  y[i][j] = 0;
    	trigger[i][j] = 0;
    	cycle[i][j] = 0;
         }
       z = 0; 
     
     /* initial display values for 2D */
       for (i = 0; i < N1; i++)
          for (j = 0; j < N2; j++) {
            temp = x[i][j][0]*RP;       
            fprintf(outfile, "%d ", temp);
          }
    }
     
    void select(void)
    {
       int i, j, max, imax=0, jmax=0;
       float baseline = 1200.0, temp;
    /* baseline 1200 -> 17 regions; 1000 -> 23 regions. Both reasonable */
     
       max = -1;
       for (i = 0; i < N1; i++)
         for (j = 0; j < N2; j++) {
           trigger[i][j] = 0;
           if (lateral[i][j] > baseline && y[i][j] != MAX && y[i][j] > max) {
    	 max = y[i][j];
    	 imax = i;
    	 jmax = j;
           }
         }
     
       if (cycle[imax][jmax]) {     /* find out jumpers */
         for (i = 0; i < N1; i++)
           for (j = 0; j < N2; j++)
    	 if (y[i][j] == max && cycle[i][j])
    	   trigger[i][j] = 1;
       } else
         trigger[imax][jmax] = 1;
     
       for (i = 0; i < N1; i++)   /* advance oscillators on the left branch */
         for (j = 0; j < N2; j++) 
           if (y[i][j] != MAX && (cycle[i][j] || lateral[i][j] > baseline)) {
    	 y[i][j] = y[i][j] + (MAX - max);
             x[i][j][0] = y[i][j]/(MAXVAL + 1.0);
           }
    }
     
    void evaluate(void)
    {
       float temp, thetae = 2.0, temp2, temp3;
       int i,j,t, cat, count;  /* labels for setting up display intervals */
     
       jump[0] = 0;
     
       select();
       for ( t = 0; t < WIDTH-1; t++) {
          count = 0;
          for (i = 0; i < N1; i++)
    	for (j = 0; j < N2; j++) { /* compute net input */
    	  if (x[i][j][0] > thetae && jump[0] == 0) {  /* jumping down */
                 x[i][j][1] = LP;
    	     y[i][j] = -1;
    	     cycle[i][j] = 1;
    	     count++;
    	  } else if (x[i][j][0] < thetae) {  /* summing up overall input */
                 temp =  -20.0 * bi((float) z,0.5);  /* used to be 50 */
     
    /* the following is based on traversing through strongest link */
                 temp2 = 0.0;
                 if (j-1 >= 0) {
                    temp3 = W[i][j][0] * bi(x[i][j-1][0], thetae);
                    if (temp2 < temp3) temp2 = temp3; }
                 if (i-1 >= 0 && j-1 >= 0) {
                    temp3 = W[i][j][1] * bi(x[i-1][j-1][0], thetae);
                    if (temp2 < temp3) temp2 = temp3; }
                 if (i-1 >= 0) {
                    temp3 = W[i][j][2] * bi(x[i-1][j][0], thetae);
                    if (temp2 < temp3) temp2 = temp3; }
                 if (i-1 >= 0 && j+1 < N2) {
                    temp3 = W[i][j][3] * bi(x[i-1][j+1][0], thetae);
                    if (temp2 < temp3) temp2 = temp3; }
                 if (j+1 < N2) {
                    temp3 = W[i][j][4] * bi(x[i][j+1][0], thetae);
                    if (temp2 < temp3) temp2 = temp3; }
                 if (i+1 < N1 && j+1 < N2) {
                    temp3 = W[i][j][5] * bi(x[i+1][j+1][0], thetae);
                    if (temp2 < temp3) temp2 = temp3; }
                 if (i+1 < N1) {
                    temp3 = W[i][j][6] * bi(x[i+1][j][0], thetae);
                    if (temp2 < temp3) temp2 = temp3; }
                 if (i+1 < N1 && j-1 >= 0) {
                    temp3 = W[i][j][7] * bi(x[i+1][j-1][0], thetae);
                    if (temp2 < temp3) temp2 = temp3; }
                 temp += temp2;
     
    	     if (trigger[i][j] || temp > 0.25) {        /* jumping up */
    	        x[i][j][1] = RP; 
    		y[i][j] = MAX;
    	        jump[1] = 1;
    	        z++;
    	     } else
    	        x[i][j][1] = x[i][j][0];
    	  } else 
    	     x[i][j][1] = x[i][j][0];
    	}
          z -= count;
     
          if (jump[1] == 0 && z == 0) 
            select();
     
        /* store for display in 2d case*/
          if (jump[1] == 0 && jump[0] == 1) {
    mexPrintf("we are here \n");
    	Num++;
            for (i = 0; i < N1; i++)
              for (j = 0; j < N2; j++) {
                 if (z > 0) {
    	          if (x[i][j][1] < thetae)
                         cat = 0;       
    		  else cat = x[i][j][1];       
    	     } else  
    		  cat = x[i][j][1];       
                 fprintf(outfile, "%d ", cat);
     
                 if (Num < 25 && cat > 0)
                    matrix[N1-1-i][j] = 26-Num;  /* 17 regions, or 23 */
    	  }
          }
     
     
          for (i = 0; i < N1; i++)
             for (j = 0; j < N2; j++)  /* replace OLD by NEW */
               x[i][j][0] = x[i][j][1];
          jump[0] = jump[1];
          jump[1] = 0;
       }
    }
     
    void store(void)
    {
       int i, j;
       FILE *out, *out1, *fopen();
     
       mexPrintf("The number of the segments/cycles is %d\n", Num);
     
       out = fopen("NUMBER", "w");
       out1 = fopen("Result", "w");
       fprintf(out, "%d ", Num);
       for (i = 0; i < N1; i++)
         for (j = 0; j < N2; j++)
           fprintf(out1, "%d ", matrix[i][j]);
       fclose(out);
       fclose(out1);
    }	
     
    void mexFunction(int nlhs, mxArray *plhs[],
            int nrhs, const mxArray *prhs[])
    {
        int *pr_seed;
     
        pr_seed = (int *)mxGetData(prhs[0]);
     
        srand(*pr_seed);
     
        outfile = fopen("Out", "w");
     
        inputs();
        connections();
        initiate();
        evaluate();
        store();
        fclose(outfile);
    }
     
    int bi(x, threshold)
       float x, threshold;
    {
        if (x > threshold) return (1);
        else return (0);
    }

    A compiler comme ceci :

    Et à utiliser comme ceci :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    seed = int32(5);
    segment(seed);
    Ingénieur indépendant en mécatronique - Conseil, conception et formation
    • Conception mécanique (Autodesk Fusion 360)
    • Impression 3D (Ultimaker)
    • Développement informatique (Python, MATLAB, C)
    • Programmation de microcontrôleur (Microchip PIC, ESP32, Raspberry Pi, Arduino…)

    « J'étais le meilleur ami que le vieux Jim avait au monde. Il fallait choisir. J'ai réfléchi un moment, puis je me suis dit : "Tant pis ! J'irai en enfer" » (Saint Huck)

  3. #3
    Membre à l'essai
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2013
    Messages
    26
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Conseil

    Informations forums :
    Inscription : Avril 2013
    Messages : 26
    Points : 14
    Points
    14
    Par défaut
    Merci Mr.Jérôme Briot pour votre aide , mais je vous demande plus de détailles car je suis débutant en programmation ,

    est ce que je dois convertie le code .txt en code .c puis en MEX ??? Merci d’avance

  4. #4
    Rédacteur/Modérateur

    Avatar de Jerome Briot
    Homme Profil pro
    Freelance mécatronique - Conseil, conception et formation
    Inscrit en
    Novembre 2006
    Messages
    20 302
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Freelance mécatronique - Conseil, conception et formation

    Informations forums :
    Inscription : Novembre 2006
    Messages : 20 302
    Points : 53 166
    Points
    53 166
    Par défaut
    Comme mentionné dans la FAQ, il te faut tout d'abord un compilateur pour compiler le fichier MEX.

    Quelle version de MATLAB utilises-tu ? Avec quel système d'exploitation ? 32 ou 64 bits ?

    Voir la FAQ Quels sont les différents compilateurs supportés pour compiler un fichier MEX ? pour choisir un compilateur.
    Ingénieur indépendant en mécatronique - Conseil, conception et formation
    • Conception mécanique (Autodesk Fusion 360)
    • Impression 3D (Ultimaker)
    • Développement informatique (Python, MATLAB, C)
    • Programmation de microcontrôleur (Microchip PIC, ESP32, Raspberry Pi, Arduino…)

    « J'étais le meilleur ami que le vieux Jim avait au monde. Il fallait choisir. J'ai réfléchi un moment, puis je me suis dit : "Tant pis ! J'irai en enfer" » (Saint Huck)

  5. #5
    Membre à l'essai
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2013
    Messages
    26
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Conseil

    Informations forums :
    Inscription : Avril 2013
    Messages : 26
    Points : 14
    Points
    14
    Par défaut
    MATLAB 7.10.0 (R2010a) , windows 7 ,32 bits

  6. #6
    Rédacteur/Modérateur

    Avatar de Jerome Briot
    Homme Profil pro
    Freelance mécatronique - Conseil, conception et formation
    Inscrit en
    Novembre 2006
    Messages
    20 302
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Freelance mécatronique - Conseil, conception et formation

    Informations forums :
    Inscription : Novembre 2006
    Messages : 20 302
    Points : 53 166
    Points
    53 166
    Par défaut
    OK, donc tu suis les instructions données ici Comment choisir le compilateur à utiliser pour créer un fichier MEX ? et tu choisis le compilateur Lcc dans la liste proposée.
    Ingénieur indépendant en mécatronique - Conseil, conception et formation
    • Conception mécanique (Autodesk Fusion 360)
    • Impression 3D (Ultimaker)
    • Développement informatique (Python, MATLAB, C)
    • Programmation de microcontrôleur (Microchip PIC, ESP32, Raspberry Pi, Arduino…)

    « J'étais le meilleur ami que le vieux Jim avait au monde. Il fallait choisir. J'ai réfléchi un moment, puis je me suis dit : "Tant pis ! J'irai en enfer" » (Saint Huck)

  7. #7
    Membre à l'essai
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2013
    Messages
    26
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Conseil

    Informations forums :
    Inscription : Avril 2013
    Messages : 26
    Points : 14
    Points
    14
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    Please verify your choices: 
     
    Compiler: Lcc-win32 C 2.4.1 
    Location: C:\PROGRA~1\MATLAB\R2010a\sys\lcc
    J'ai essai , matlab m'affiche ce message :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    Are these correct [y]/n? y 
     
    Trying to update options file: C:\Users\zied\AppData\Roaming\MathWorks\MATLAB\R2010a\mexopts.bat 
    From template:              C:\PROGRA~1\MATLAB\R2010a\bin\win32\mexopts\lccopts.bat 
     
    Done . . . 
     
    ************************************************************************** 
      Warning: The MATLAB C and Fortran API has changed to support MATLAB 
               variables with more than 2^32-1 elements.  In the near future 
               you will be required to update your code to utilize the new 
               API. You can find more information about this at: 
               http://www.mathworks.com/support/sol...ution=1-5C27B9 
               Building with the -largeArrayDims option enables the new API. 
    **************************************************************************

  8. #8
    Rédacteur/Modérateur

    Avatar de Jerome Briot
    Homme Profil pro
    Freelance mécatronique - Conseil, conception et formation
    Inscrit en
    Novembre 2006
    Messages
    20 302
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Freelance mécatronique - Conseil, conception et formation

    Informations forums :
    Inscription : Novembre 2006
    Messages : 20 302
    Points : 53 166
    Points
    53 166
    Par défaut
    Donc maintenant tu enregistres le code C que j'ai fourni précédemment dans un fichier segment.c

    Tu copies le fichier segment.h dans le même dossier que segment.c puis tu fais :

    Ingénieur indépendant en mécatronique - Conseil, conception et formation
    • Conception mécanique (Autodesk Fusion 360)
    • Impression 3D (Ultimaker)
    • Développement informatique (Python, MATLAB, C)
    • Programmation de microcontrôleur (Microchip PIC, ESP32, Raspberry Pi, Arduino…)

    « J'étais le meilleur ami que le vieux Jim avait au monde. Il fallait choisir. J'ai réfléchi un moment, puis je me suis dit : "Tant pis ! J'irai en enfer" » (Saint Huck)

  9. #9
    Membre à l'essai
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2013
    Messages
    26
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Conseil

    Informations forums :
    Inscription : Avril 2013
    Messages : 26
    Points : 14
    Points
    14
    Par défaut
    j'ai copier les deux fichier segment .c + segment.h a "C:\PROGRA~1\MATLAB\R2010A\BIN\"
    j'ai executé la commande mex segment.c

    Matlab affiche ce message

    C:\PROGRA~1\MATLAB\R2010A\BIN\MEX.PL: Error: 'segment.c' not found.

    ??? Error using ==> mex at 222
    Unable to complete successfully.

    :''(
    Fichiers attachés Fichiers attachés

  10. #10
    Rédacteur/Modérateur

    Avatar de Jerome Briot
    Homme Profil pro
    Freelance mécatronique - Conseil, conception et formation
    Inscrit en
    Novembre 2006
    Messages
    20 302
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Freelance mécatronique - Conseil, conception et formation

    Informations forums :
    Inscription : Novembre 2006
    Messages : 20 302
    Points : 53 166
    Points
    53 166
    Par défaut
    Citation Envoyé par zied113 Voir le message
    j'ai copier les deux fichier segment .c + segment.h a "C:\PROGRA~1\MATLAB\R2010A\BIN\"
    Premièrement, il ne faut pas utiliser le fichier segment.c que tu as téléchargé sur le site du "Perception and Neurodynamics Laboratory" mais celui que j'ai modifié dans ce message . As-tu au moins remarqué les quelques différences entre les deux codes… j'en doute.

    Deuxièmement, il ne faut pas copier les fichiers dans le dossier d'installation de MATLAB.
    Place les, par exemple, dans le dossier dans lequel MATLAB démarre.

    Pour finir, il faut absolument que le dossier où se trouvent ces deux fichiers soit le dossier courant de MATLAB avant de les compiler avec mex
    Ingénieur indépendant en mécatronique - Conseil, conception et formation
    • Conception mécanique (Autodesk Fusion 360)
    • Impression 3D (Ultimaker)
    • Développement informatique (Python, MATLAB, C)
    • Programmation de microcontrôleur (Microchip PIC, ESP32, Raspberry Pi, Arduino…)

    « J'étais le meilleur ami que le vieux Jim avait au monde. Il fallait choisir. J'ai réfléchi un moment, puis je me suis dit : "Tant pis ! J'irai en enfer" » (Saint Huck)

  11. #11
    Membre à l'essai
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2013
    Messages
    26
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Conseil

    Informations forums :
    Inscription : Avril 2013
    Messages : 26
    Points : 14
    Points
    14
    Par défaut
    Bonjour , normalement c'est bon , matlab m’affiche le message suivant


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    >> mex segment.c
    seed = int32(5);
    segment(seed);
    we are here 
    .......
    we are here 
    The number of the segments/cycles is 348
    Mais la question qui ce pose comment modifier l'Input de segment.c avec mon Input ??????? !!!!!

    en attendant monsieur votre réponse veuillez agréer mes salutations les meilleures.

  12. #12
    Rédacteur/Modérateur

    Avatar de Jerome Briot
    Homme Profil pro
    Freelance mécatronique - Conseil, conception et formation
    Inscrit en
    Novembre 2006
    Messages
    20 302
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Freelance mécatronique - Conseil, conception et formation

    Informations forums :
    Inscription : Novembre 2006
    Messages : 20 302
    Points : 53 166
    Points
    53 166
    Par défaut
    Citation Envoyé par zied113 Voir le message
    Mais la question qui ce pose comment modifier l'Input de segment.c avec mon Input ??????? !!!!!
    C'est à dire ?

    Tu veux appliquer le code sur une autre image que celle mentionnée ici ?

    Code C : Sélectionner tout - Visualiser dans une fenêtre à part
    IN = fopen("lake1.pgm", "r");
    Ingénieur indépendant en mécatronique - Conseil, conception et formation
    • Conception mécanique (Autodesk Fusion 360)
    • Impression 3D (Ultimaker)
    • Développement informatique (Python, MATLAB, C)
    • Programmation de microcontrôleur (Microchip PIC, ESP32, Raspberry Pi, Arduino…)

    « J'étais le meilleur ami que le vieux Jim avait au monde. Il fallait choisir. J'ai réfléchi un moment, puis je me suis dit : "Tant pis ! J'irai en enfer" » (Saint Huck)

  13. #13
    Membre à l'essai
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2013
    Messages
    26
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Conseil

    Informations forums :
    Inscription : Avril 2013
    Messages : 26
    Points : 14
    Points
    14
    Par défaut
    oui exactement c'est ca

  14. #14
    Rédacteur/Modérateur

    Avatar de Jerome Briot
    Homme Profil pro
    Freelance mécatronique - Conseil, conception et formation
    Inscrit en
    Novembre 2006
    Messages
    20 302
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Freelance mécatronique - Conseil, conception et formation

    Informations forums :
    Inscription : Novembre 2006
    Messages : 20 302
    Points : 53 166
    Points
    53 166
    Par défaut
    Voici une version :

    Code C : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
           /*****************************************************************/
           /* This program is for 2D segmentation using the LEGION network  */
           /* The equations were modeled as a PDP algorithm for efficiency  */
           /* by DeLiang Wang in 7/94. For a detailed description of the    */
           /* algorithm see D.L. Wang and D. Terman: "Image segmentation    */
           /* based on oscillatory correlation", Neural Computation, Vol. 9 */
           /* pp. 805-836, 1997 (For errata see Neural Computation 9,       */
           /* 1623-1626, 1997), on page 822.                                */
           /*****************************************************************/
     
    #include "mex.h"
    #include "segment.h"
     
    #define MAXVAL 32768.0
                   /* 2147483648.0 or 32768.0,machine (HP or SUN) dependable*/
    #define MAX 32767 /* 2147483647 or 32767, machine dependable */
    #define GRAY 255  /* Maximum value of a pixel */
     
    int bi();
    int jump[2], z, Num = 1;             /* so we can change step size at will */
                                   /* Num: number of the segments */
    FILE *outfile, *fopen();
    float x[N1][N2][2], lateral[N1][N2];
                          /* lateral: the sum of input from lateral connections */
    float W[N1][N2][8];   /* strength of the interactions for 4 directions */
    int stim[N1][N2], matrix[N1][N2];
    int y[N1][N2], cycle[N1][N2], trigger[N1][N2];
         /* y: integer of x; cycle: test for 1st cycle; trigger: jumping signal */
     
     
    int inputs(char *filename)
    {
       int i, j;
       int width, height, c;
       char magic[25];
       float stimulus = 0.2;
       FILE *IN;
     
       for (i = 0; i < N1; i++) 
         for (j = 0; j < N2; j++)
           matrix[i][j] = 0;
     
       IN = fopen(filename, "r");
       if(IN==NULL)
           return -1;
     
       fscanf(IN,"%s\n%d %d\n%d\n",magic,&width,&height,&c);
       fprintf(stderr,"[Type %s %dx%d colours %d]\n",magic,width,height,c);
     
       for(i=0;i<160;i++)  
          for(j=0;j<160;j++)
             stim[i][j] = getc(IN);
     
       fclose(IN);
     
       return 0;
    }
     
    void connections(void)
    {
       int i, j, k;
       float baseline = 0.0, Wtotal = 6.0, sum;
     
       for (i = 0; i < N1; i++) /* for eight nearest neighbors */
         for (j = 0; j < N2; j++) {
           W[i][j][0] = W[i][j][1] = W[i][j][2] = W[i][j][3] = 0.0;
           W[i][j][4] = W[i][j][5] = W[i][j][6] = W[i][j][7] = 0.0;
         }
     
       for (i = 0; i < N1; i++) 
         for (j = 0; j < N2; j++) {
    	 sum = 0.0;
     
             if (j-1 >= 0)
    	    W[i][j][0] = (float) GRAY/(1+abs(stim[i][j]-stim[i][j-1]));
             if (i-1 >= 0 && j-1 >= 0)
    	    W[i][j][1] = (float) GRAY/(1+abs(stim[i][j]-stim[i-1][j-1]));
             if (i-1 >= 0)
    	    W[i][j][2] = (float) GRAY/(1+abs(stim[i][j]-stim[i-1][j]));
             if (i-1 >= 0 && j+1 < N2)
    	    W[i][j][3] = (float) GRAY/(1+abs(stim[i][j]-stim[i-1][j+1]));
             if (j+1 < N2)
    	    W[i][j][4] = (float) GRAY/(1+abs(stim[i][j]-stim[i][j+1]));
             if (i+1 < N1 && j+1 < N2) 
    	    W[i][j][5] = (float) GRAY/(1+abs(stim[i][j]-stim[i+1][j+1]));
             if (i+1 < N1)
    	    W[i][j][6] = (float) GRAY/(1+abs(stim[i][j]-stim[i+1][j]));
             if (i+1 < N1 && j-1 >= 0)
    	    W[i][j][7] = (float) GRAY/(1+abs(stim[i][j]-stim[i+1][j-1]));
     
             for (k = 0; k < 8; k++) lateral[i][j] += W[i][j][k];
        }
    }
     
    void initiate(void)
    {
       int i,j,t, temp;  /* labels for setting up display intervals */
     
       for (i = 0; i < N1; i++)   /* randomize the initial phases */
         for (j = 0; j < N2; j++) {
            y[i][j] = rand();
            x[i][j][0] = y[i][j]/(MAXVAL + 1.0);
    	y[i][j] -= 2;
    	if (y[i][j] < 0)
    	  y[i][j] = 0;
    	trigger[i][j] = 0;
    	cycle[i][j] = 0;
         }
       z = 0; 
     
     /* initial display values for 2D */
       for (i = 0; i < N1; i++)
          for (j = 0; j < N2; j++) {
            temp = x[i][j][0]*RP;       
            fprintf(outfile, "%d ", temp);
          }
    }
     
    void select(void)
    {
       int i, j, max, imax=0, jmax=0;
       float baseline = 1200.0, temp;
    /* baseline 1200 -> 17 regions; 1000 -> 23 regions. Both reasonable */
     
       max = -1;
       for (i = 0; i < N1; i++)
         for (j = 0; j < N2; j++) {
           trigger[i][j] = 0;
           if (lateral[i][j] > baseline && y[i][j] != MAX && y[i][j] > max) {
    	 max = y[i][j];
    	 imax = i;
    	 jmax = j;
           }
         }
     
       if (cycle[imax][jmax]) {     /* find out jumpers */
         for (i = 0; i < N1; i++)
           for (j = 0; j < N2; j++)
    	 if (y[i][j] == max && cycle[i][j])
    	   trigger[i][j] = 1;
       } else
         trigger[imax][jmax] = 1;
     
       for (i = 0; i < N1; i++)   /* advance oscillators on the left branch */
         for (j = 0; j < N2; j++) 
           if (y[i][j] != MAX && (cycle[i][j] || lateral[i][j] > baseline)) {
    	 y[i][j] = y[i][j] + (MAX - max);
             x[i][j][0] = y[i][j]/(MAXVAL + 1.0);
           }
    }
     
    void evaluate(void)
    {
       float temp, thetae = 2.0, temp2, temp3;
       int i,j,t, cat, count;  /* labels for setting up display intervals */
     
       jump[0] = 0;
     
       select();
       for ( t = 0; t < WIDTH-1; t++) {
          count = 0;
          for (i = 0; i < N1; i++)
    	for (j = 0; j < N2; j++) { /* compute net input */
    	  if (x[i][j][0] > thetae && jump[0] == 0) {  /* jumping down */
                 x[i][j][1] = LP;
    	     y[i][j] = -1;
    	     cycle[i][j] = 1;
    	     count++;
    	  } else if (x[i][j][0] < thetae) {  /* summing up overall input */
                 temp =  -20.0 * bi((float) z,0.5);  /* used to be 50 */
     
    /* the following is based on traversing through strongest link */
                 temp2 = 0.0;
                 if (j-1 >= 0) {
                    temp3 = W[i][j][0] * bi(x[i][j-1][0], thetae);
                    if (temp2 < temp3) temp2 = temp3; }
                 if (i-1 >= 0 && j-1 >= 0) {
                    temp3 = W[i][j][1] * bi(x[i-1][j-1][0], thetae);
                    if (temp2 < temp3) temp2 = temp3; }
                 if (i-1 >= 0) {
                    temp3 = W[i][j][2] * bi(x[i-1][j][0], thetae);
                    if (temp2 < temp3) temp2 = temp3; }
                 if (i-1 >= 0 && j+1 < N2) {
                    temp3 = W[i][j][3] * bi(x[i-1][j+1][0], thetae);
                    if (temp2 < temp3) temp2 = temp3; }
                 if (j+1 < N2) {
                    temp3 = W[i][j][4] * bi(x[i][j+1][0], thetae);
                    if (temp2 < temp3) temp2 = temp3; }
                 if (i+1 < N1 && j+1 < N2) {
                    temp3 = W[i][j][5] * bi(x[i+1][j+1][0], thetae);
                    if (temp2 < temp3) temp2 = temp3; }
                 if (i+1 < N1) {
                    temp3 = W[i][j][6] * bi(x[i+1][j][0], thetae);
                    if (temp2 < temp3) temp2 = temp3; }
                 if (i+1 < N1 && j-1 >= 0) {
                    temp3 = W[i][j][7] * bi(x[i+1][j-1][0], thetae);
                    if (temp2 < temp3) temp2 = temp3; }
                 temp += temp2;
     
    	     if (trigger[i][j] || temp > 0.25) {        /* jumping up */
    	        x[i][j][1] = RP; 
    		y[i][j] = MAX;
    	        jump[1] = 1;
    	        z++;
    	     } else
    	        x[i][j][1] = x[i][j][0];
    	  } else 
    	     x[i][j][1] = x[i][j][0];
    	}
          z -= count;
     
          if (jump[1] == 0 && z == 0) 
            select();
     
        /* store for display in 2d case*/
          if (jump[1] == 0 && jump[0] == 1) {
    mexPrintf("we are here \n");
    	Num++;
            for (i = 0; i < N1; i++)
              for (j = 0; j < N2; j++) {
                 if (z > 0) {
    	          if (x[i][j][1] < thetae)
                         cat = 0;       
    		  else cat = x[i][j][1];       
    	     } else  
    		  cat = x[i][j][1];       
                 fprintf(outfile, "%d ", cat);
     
                 if (Num < 25 && cat > 0)
                    matrix[N1-1-i][j] = 26-Num;  /* 17 regions, or 23 */
    	  }
          }
     
     
          for (i = 0; i < N1; i++)
             for (j = 0; j < N2; j++)  /* replace OLD by NEW */
               x[i][j][0] = x[i][j][1];
          jump[0] = jump[1];
          jump[1] = 0;
       }
    }
     
    void store(void)
    {
       int i, j;
       FILE *out, *out1, *fopen();
     
       mexPrintf("The number of the segments/cycles is %d\n", Num);
     
       out = fopen("NUMBER", "w");
       out1 = fopen("Result", "w");
       fprintf(out, "%d ", Num);
       for (i = 0; i < N1; i++)
         for (j = 0; j < N2; j++)
           fprintf(out1, "%d ", matrix[i][j]);
       fclose(out);
       fclose(out1);
    }	
     
    void mexFunction(int nlhs, mxArray *plhs[],
            int nrhs, const mxArray *prhs[])
    {
        int *pr_seed, status;
        mwSize buflen;
        char *buf;
     
        pr_seed = (int *)mxGetData(prhs[0]);
     
        buflen = mxGetM(prhs[1])*mxGetN(prhs[1]);
        buf = mxCalloc(buflen, sizeof(char));
     
        mxGetString(prhs[1], buf, buflen+1);
     
        srand(*pr_seed);    
     
        status = inputs(buf);
     
        if(status) {        
            mxFree(buf);
            mexErrMsgTxt("Pb with file");
        }        
     
        outfile = fopen("Out", "w");
        connections();
        initiate();
        evaluate();
        store();
        fclose(outfile);
     
        mxFree(buf);
    }
     
    int bi(x, threshold)
       float x, threshold;
    {
        if (x > threshold) return (1);
        else return (0);
    }

    A utiliser comme ceci :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    seed = int32(5);
    segment(seed,'lake1.pgm');
    Ingénieur indépendant en mécatronique - Conseil, conception et formation
    • Conception mécanique (Autodesk Fusion 360)
    • Impression 3D (Ultimaker)
    • Développement informatique (Python, MATLAB, C)
    • Programmation de microcontrôleur (Microchip PIC, ESP32, Raspberry Pi, Arduino…)

    « J'étais le meilleur ami que le vieux Jim avait au monde. Il fallait choisir. J'ai réfléchi un moment, puis je me suis dit : "Tant pis ! J'irai en enfer" » (Saint Huck)

  15. #15
    Membre à l'essai
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2013
    Messages
    26
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Conseil

    Informations forums :
    Inscription : Avril 2013
    Messages : 26
    Points : 14
    Points
    14
    Par défaut
    mon entrée dans la fonction segmentation est une image de "Canal de corrélation croisée" d'un signal mixer, le Canal corrélation croisée est définie dans matlab par cette fonction :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    cross = crossChanCorr(c)
    jai tapé la code suivant
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    mex segment.c
    seed = int32(5);
    segment(seed,cross);
    j'ai obtenu le message suivant :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    we are here 
    The number of the segments/cycles is 695
    je sais pas est ce que juste ou nn !!!!!!

    vous trouvez ci joint limage de "Canal de corrélation croisée" avec le système.
    Images attachées Images attachées  

  16. #16
    Rédacteur/Modérateur

    Avatar de Jerome Briot
    Homme Profil pro
    Freelance mécatronique - Conseil, conception et formation
    Inscrit en
    Novembre 2006
    Messages
    20 302
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Freelance mécatronique - Conseil, conception et formation

    Informations forums :
    Inscription : Novembre 2006
    Messages : 20 302
    Points : 53 166
    Points
    53 166
    Par défaut
    La ligne suivante n'a pas besoin d'être répétée à chaque fois :

    Sauf si tu modifies le contenu du fichier segment.c

    Pour le reste, tout ce que je peux dire c'est que le code génère trois fichiers : Out, NUMBER et Result
    Ingénieur indépendant en mécatronique - Conseil, conception et formation
    • Conception mécanique (Autodesk Fusion 360)
    • Impression 3D (Ultimaker)
    • Développement informatique (Python, MATLAB, C)
    • Programmation de microcontrôleur (Microchip PIC, ESP32, Raspberry Pi, Arduino…)

    « J'étais le meilleur ami que le vieux Jim avait au monde. Il fallait choisir. J'ai réfléchi un moment, puis je me suis dit : "Tant pis ! J'irai en enfer" » (Saint Huck)

  17. #17
    Membre à l'essai
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2013
    Messages
    26
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Conseil

    Informations forums :
    Inscription : Avril 2013
    Messages : 26
    Points : 14
    Points
    14
    Par défaut
    Bonjour M. Jérôme Briot , j'ai téléchargé le code de groupe.c et groupe.h par le lien : http://www.cse.ohio-state.edu/pnl/sh...tnn99/dynamic/

    J'ai essayé de le exécuté sur matlab par la code :
    matlab affiche l'erreur suivante
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    mex group.c
    c:\users\zied\appdata\local\temp\mex_kf~1\group.obj: multiple definition of _main 
    first definition is in file c:\progra~1\matlab\r2010a\sys\lcc\lib\libcrt0.obj 
    Specified export _mexFunction is not defined 
    Missing exports. Aborting 
     
      C:\PROGRA~1\MATLAB\R2010A\BIN\MEX.PL: Error: Link of 'group.mexw32' failed. 
     
    ??? Error using ==> mex at 222
    Unable to complete successfully.

  18. #18
    Invité
    Invité(e)
    Par défaut
    Citation Envoyé par Dut Voir le message
    Premièrement, il ne faut pas utiliser le fichier segment.c que tu as téléchargé sur le site du "Perception and Neurodynamics Laboratory" mais celui que j'ai modifié dans ce message . As-tu au moins remarqué les quelques différences entre les deux codes… j'en doute.
    Différences sûrement toujours pas remarquées...
    Il serait temps de lire minutieusement le contenu de ce lien afin de bien comprendre la logique des fichiers MEX qui ne passent pas par une fonction d'entrée main() mais mexFunction() !

  19. #19
    Membre à l'essai
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2013
    Messages
    26
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Conseil

    Informations forums :
    Inscription : Avril 2013
    Messages : 26
    Points : 14
    Points
    14
    Par défaut
    bonjour , j'ai pas trouvé la bonne explication dans ce lien http://matlab.developpez.com/faq/?page=mex

  20. #20
    Rédacteur/Modérateur

    Avatar de Jerome Briot
    Homme Profil pro
    Freelance mécatronique - Conseil, conception et formation
    Inscrit en
    Novembre 2006
    Messages
    20 302
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Freelance mécatronique - Conseil, conception et formation

    Informations forums :
    Inscription : Novembre 2006
    Messages : 20 302
    Points : 53 166
    Points
    53 166
    Par défaut
    Ouvre les deux fichiers segment.c (l'original et celui que j'ai modifié) côte à côte dans un éditeur de texte.

    Compare les lignes par lignes pour bien identifier les différences, dont la plus notable est, comme l'a fait remarqué Winjerome, l'absence de main dans le MEX
    Ingénieur indépendant en mécatronique - Conseil, conception et formation
    • Conception mécanique (Autodesk Fusion 360)
    • Impression 3D (Ultimaker)
    • Développement informatique (Python, MATLAB, C)
    • Programmation de microcontrôleur (Microchip PIC, ESP32, Raspberry Pi, Arduino…)

    « J'étais le meilleur ami que le vieux Jim avait au monde. Il fallait choisir. J'ai réfléchi un moment, puis je me suis dit : "Tant pis ! J'irai en enfer" » (Saint Huck)

Discussions similaires

  1. [Débutant] Convertir code Fortran en MATLAB
    Par zakmakaay9 dans le forum MATLAB
    Réponses: 10
    Dernier message: 25/02/2019, 17h11
  2. Code Ada et MATLAB
    Par coacoa dans le forum MATLAB
    Réponses: 1
    Dernier message: 15/02/2007, 08h57
  3. convertir code php en asp
    Par goaim dans le forum ASP
    Réponses: 1
    Dernier message: 19/10/2006, 15h53
  4. Convertir code C en delphi
    Par jt-tronix dans le forum Langage
    Réponses: 12
    Dernier message: 29/03/2006, 20h55
  5. convertir code clavier en caractère
    Par danyboy85 dans le forum Général JavaScript
    Réponses: 13
    Dernier message: 22/02/2006, 19h15

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo