Ignore:
Timestamp:
Feb 17, 2016, 4:12:02 PM (9 years ago)
Author:
meunier
Message:
  • Added function realloc
  • Started to put the bootloader on 2 Big Pages (warning: does not work yet)
  • Fixed errors in the rosenfeld application
Location:
soft/giet_vm/applications/rosenfeld/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/applications/rosenfeld/src/ecc_examples.c

    r772 r791  
    2222#include "ecc_features.h"
    2323#include "ecc_generation.h"
     24
    2425
    2526// --------------------------------------------------------------
     
    14161417    set_ui8vector_str(X[i++], 0, w-1, "                              "); // 27
    14171418   
    1418     display_ui8matrix_positive(X, 0, h-1, 0, w-1, 4, "forme_boulon1"); printf("");
    1419     write_ui8matrix_positive(  X, 0, h-1, 0, w-1, 4, "forme_boulon1.txt");
    1420 }
     1419    display_ui8matrix_positive(X, 0, h-1, 0, w-1, 4, "forme_boulon1");
     1420    printf("");
     1421    write_ui8matrix_positive(X, 0, h-1, 0, w-1, 4, "forme_boulon1.txt");
     1422}
  • soft/giet_vm/applications/rosenfeld/src/ecc_generation.c

    r777 r791  
    2121#include "mt19937.h" // Mersenne Twister generator
    2222#include "ecc_generation.h"
     23
    2324
    2425// -------------------------------------------------------------------------------------------------------------------------
  • soft/giet_vm/applications/rosenfeld/src/ecc_main_rosenfeld_sa.c

    r777 r791  
    9292    init_forme_boulon1(&X0, &i0, &i1, &j0, &j1);
    9393
    94     // allocatin memoire
     94    // allocation memoire
    9595    X   = ui8matrix (i0-border, i1+border, j0-border, j1+border);
    9696    E8  = ui8matrix (i0-border, i1+border, j0-border, j1+border);
    9797    E32 = ui32matrix(i0-border, i1+border, j0-border, j1+border);
    98     
    99     // initialisation de la memoir
     98 
     99    // initialisation de la memoire
    100100    zero_ui32matrix(E32, i0-border, i1+border, j0-border, j1+border);
    101101    zero_ui8matrix (E8,  i0-border, i1+border, j0-border, j1+border);
    102102    zero_ui8matrix (X,   i0-border, i1+border, j0-border, j1+border);
    103    
     103
    104104    // pre-traitements
    105105    binarisation_ui8matrix(X0, i0, i1, j0, j1, 1, 1, X);    // pour le traitement
     
    182182    int na;
    183183   
    184     RegionStats *Stats = NULL;
     184    RegionStats * Stats = NULL;
    185185
    186186    RGBQuad palette[256];
     
    191191
    192192    // chargement d'une image depuis le disque
    193     X0 = LoadPGM_ui8matrix(complete_filename, &i0, &i1, &j0, &j1);
    194    
    195     // allocatin memoire
    196     X   = ui8matrix (i0-border, i1+border, j0-border, j1+border);
    197     E8  = ui8matrix (i0-border, i1+border, j0-border, j1+border);
    198     E32 = ui32matrix(i0-border, i1+border, j0-border, j1+border);
    199 
    200     // initialisation de la memoir
    201     zero_ui32matrix(E32, i0-border, i1+border, j0-border, j1+border);
    202     zero_ui8matrix (E8,  i0-border, i1+border, j0-border, j1+border);
    203     zero_ui8matrix (X,   i0-border, i1+border, j0-border, j1+border);
     193    //X0 = LoadPGM_ui8matrix(complete_filename, &i0, &i1, &j0, &j1);
     194    init_forme_boulon1(&X0, &i0, &i1, &j0, &j1);
     195   
     196    // allocation memoire
     197    X   = ui8matrix (i0 - border, i1 + border, j0 - border, j1 + border);
     198    E8  = ui8matrix (i0 - border, i1 + border, j0 - border, j1 + border);
     199    E32 = ui32matrix(i0 - border, i1 + border, j0 - border, j1 + border);
     200
     201    // initialisation de la memoire
     202    zero_ui32matrix(E32, i0 - border, i1 + border, j0 - border, j1 + border);
     203    zero_ui8matrix (E8,  i0 - border, i1 + border, j0 - border, j1 + border);
     204    zero_ui8matrix (X,   i0 - border, i1 + border, j0 - border, j1 + border);
    204205
    205206    // pre-traitements
    206207    binarisation_ui8matrix(X0, i0, i1, j0, j1, 20, 1, X); // pour le traitement
    207     binarisation_ui8matrix(X0, i0, i1, j0, j1, 20, 255, X0); // pour la verif visuelle
    208     generate_path_filename(pathDst, "verif.pgm", complete_filename, 1024);
    209     SavePGM_ui8matrix(X0, i0, i1, j0, j1, complete_filename);
    210 
    211     height = i1-i0+1; width = j1-j0+1;
    212    
    213     nemax = ((height+1)*(width+1)) / 2; // majorant strict
    214     nermax = (width+1) / 2;
     208    //binarisation_ui8matrix(X0, i0, i1, j0, j1, 20, 255, X0); // pour la verif visuelle
     209    //generate_path_filename(pathDst, "verif.pgm", complete_filename, 1024);
     210    //SavePGM_ui8matrix(X0, i0, i1, j0, j1, complete_filename);
     211
     212    height = i1 - i0 + 1;
     213    width  = j1 - j0 + 1;
     214   
     215    nemax = ((height + 1) * (width + 1)) / 2; // majorant strict
     216    nermax = (width + 1) / 2;
    215217   
    216218    // alloc init des tables d'equivalences pour UF, Suzuki et Bailey
     
    234236    na = Rosenfeld_UF_Org1_8C(X, height, width, E32, T, A, nemax, Stats);
    235237    printf("na = %d\n", na);
    236     filename = "Rosenfeld_UF_Org1_8C.bmp";
     238    //filename = "Rosenfeld_UF_Org1_8C.bmp";
    237239    mod_ui32matrix_ui8matrix(E32, i0, i1, j0, j1, E8);
    238     generate_path_filename(pathDst, filename, complete_filename, 1024);
    239     SaveBMP2_ui8matrix(E8, width, height, palette, complete_filename);
     240    //generate_path_filename(pathDst, filename, complete_filename, 1024);
     241    //SaveBMP2_ui8matrix(E8, width, height, palette, complete_filename);
    240242    zero_ui32matrix(E32, i0 - border, i1 + border, j0 - border, j1 + border);
    241243    display_RegionStatsVector(Stats, 1, na, "Stats");
     
    313315// -----------------------------
    314316{
     317#if TARGET_OS==GIET_VM
     318    giet_tty_alloc(1);
     319#endif
    315320    display_arg(argc, argv);
    316321    ecc_info_define();
Note: See TracChangeset for help on using the changeset viewer.