is fimg2text ok ?

This commit is contained in:
le vieux 2021-02-27 23:35:27 +01:00
parent 583151302a
commit 4556887358

View File

@ -52,18 +52,18 @@ static int normalize(FloatImg *pimg, float vmax)
float mmv[6], maxi, coef; float mmv[6], maxi, coef;
int foo, sz, idx; int foo, sz, idx;
// #if DEBUG_LEVEL #if DEBUG_LEVEL
fprintf(stderr, ">>> %s ( %p %g )\n", __func__, pimg, vmax); fprintf(stderr, ">>> %s ( %p %g )\n", __func__, pimg, vmax);
// #endif #endif
foo = fimg_get_minmax_rgb(pimg, mmv); foo = fimg_get_minmax_rgb(pimg, mmv);
fimg_print_minmax(mmv, "norm it ?"); // fimg_print_minmax(mmv, "norm it ?");
maxi = mmv[1]; maxi = mmv[1];
if (mmv[3] > maxi) maxi = mmv[3]; if (mmv[3] > maxi) maxi = mmv[3];
if (mmv[5] > maxi) maxi = mmv[5]; if (mmv[5] > maxi) maxi = mmv[5];
fprintf(stderr, "maximum = %f\n", maxi); // fprintf(stderr, "maximum = %f\n", maxi);
coef = vmax / maxi; coef = vmax / maxi;
fprintf(stderr, "coef = %f\n", coef); // fprintf(stderr, "coef = %f\n", coef);
sz = pimg->width * pimg->height; sz = pimg->width * pimg->height;