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