diff --git a/.gitignore b/.gitignore index 23afd1b9..739851ab 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ doc/co*.tex funcs/t funcs/*.o funcs/*.png +funcs/V/* funcs/*.gif funcs/*.fits funcs/*.tiff diff --git a/floatimg.h b/floatimg.h index c55fc4de..f3d402db 100644 --- a/floatimg.h +++ b/floatimg.h @@ -127,8 +127,10 @@ int fimg_cos_010(FloatImg *s, FloatImg *d, double maxval); int fimg_mix_rgb_gray(FloatImg *img, float mix); int fimg_shift_to_zero(FloatImg *s, FloatImg *d, float coefs[6]); -/* experimental ! */ +/* * * * experimental ! */ int fimg_classif_trial(FloatImg *src, FloatImg*dst, float fval, int notused); +int fimg_qsort_rgb_a(FloatImg *psrc, FloatImg *pdst, int notused); +int fimg_qsort_rgb_b(FloatImg *psrc, FloatImg *pdst, int notused); /* module funcs/geometry.c */ int fimg_equalize_compute(FloatImg *src, void *vptr, float vmax); @@ -163,7 +165,7 @@ int fimg_meanvalues(FloatImg *head, float means[4]); int fimg_to_gray(FloatImg *head); void fimg_add_cste(FloatImg *fi, float value); void fimg_mul_cste(FloatImg *fi, float value); -int fimg_normalize(FloatImg *fi, double maxima, int notused); +int fimg_ajust_from_grab(FloatImg *fi, double maxima, int notused); void fimg_drand48(FloatImg *fi, float kmul); int fimg_count_negativ(FloatImg *fi); int fimg_clamp_negativ(FloatImg *fi); diff --git a/funcs/V/000.png b/funcs/V/000.png new file mode 100644 index 00000000..42aeae31 Binary files /dev/null and b/funcs/V/000.png differ diff --git a/funcs/V/001.png b/funcs/V/001.png new file mode 100644 index 00000000..bb2920d6 Binary files /dev/null and b/funcs/V/001.png differ diff --git a/funcs/V/002.png b/funcs/V/002.png new file mode 100644 index 00000000..b6ec72e4 Binary files /dev/null and b/funcs/V/002.png differ diff --git a/funcs/V/003.png b/funcs/V/003.png new file mode 100644 index 00000000..81c96e1a Binary files /dev/null and b/funcs/V/003.png differ diff --git a/funcs/V/004.png b/funcs/V/004.png new file mode 100644 index 00000000..d0338eb2 Binary files /dev/null and b/funcs/V/004.png differ diff --git a/funcs/V/005.png b/funcs/V/005.png new file mode 100644 index 00000000..615c140c Binary files /dev/null and b/funcs/V/005.png differ diff --git a/funcs/V/006.png b/funcs/V/006.png new file mode 100644 index 00000000..72384dea Binary files /dev/null and b/funcs/V/006.png differ diff --git a/funcs/V/007.png b/funcs/V/007.png new file mode 100644 index 00000000..d04d5b46 Binary files /dev/null and b/funcs/V/007.png differ diff --git a/funcs/V/008.png b/funcs/V/008.png new file mode 100644 index 00000000..9526e900 Binary files /dev/null and b/funcs/V/008.png differ diff --git a/funcs/V/009.png b/funcs/V/009.png new file mode 100644 index 00000000..1e65161a Binary files /dev/null and b/funcs/V/009.png differ diff --git a/funcs/V/010.png b/funcs/V/010.png new file mode 100644 index 00000000..ac7a9c5f Binary files /dev/null and b/funcs/V/010.png differ diff --git a/funcs/V/011.png b/funcs/V/011.png new file mode 100644 index 00000000..8e0e2cea Binary files /dev/null and b/funcs/V/011.png differ diff --git a/funcs/V/012.png b/funcs/V/012.png new file mode 100644 index 00000000..42d7c610 Binary files /dev/null and b/funcs/V/012.png differ diff --git a/funcs/V/013.png b/funcs/V/013.png new file mode 100644 index 00000000..806312c5 Binary files /dev/null and b/funcs/V/013.png differ diff --git a/funcs/V/014.png b/funcs/V/014.png new file mode 100644 index 00000000..5dcf27f7 Binary files /dev/null and b/funcs/V/014.png differ diff --git a/funcs/V/015.png b/funcs/V/015.png new file mode 100644 index 00000000..de11c97a Binary files /dev/null and b/funcs/V/015.png differ diff --git a/funcs/V/016.png b/funcs/V/016.png new file mode 100644 index 00000000..740c5f4b Binary files /dev/null and b/funcs/V/016.png differ diff --git a/funcs/V/017.png b/funcs/V/017.png new file mode 100644 index 00000000..be40129c Binary files /dev/null and b/funcs/V/017.png differ diff --git a/funcs/V/018.png b/funcs/V/018.png new file mode 100644 index 00000000..e69335ce Binary files /dev/null and b/funcs/V/018.png differ diff --git a/funcs/V/019.png b/funcs/V/019.png new file mode 100644 index 00000000..aa8dbf11 Binary files /dev/null and b/funcs/V/019.png differ diff --git a/funcs/V/020.png b/funcs/V/020.png new file mode 100644 index 00000000..bc8602ac Binary files /dev/null and b/funcs/V/020.png differ diff --git a/funcs/V/021.png b/funcs/V/021.png new file mode 100644 index 00000000..880dffb1 Binary files /dev/null and b/funcs/V/021.png differ diff --git a/funcs/V/022.png b/funcs/V/022.png new file mode 100644 index 00000000..06de87e0 Binary files /dev/null and b/funcs/V/022.png differ diff --git a/funcs/V/023.png b/funcs/V/023.png new file mode 100644 index 00000000..f35c1ec9 Binary files /dev/null and b/funcs/V/023.png differ diff --git a/funcs/V/024.png b/funcs/V/024.png new file mode 100644 index 00000000..a79870d7 Binary files /dev/null and b/funcs/V/024.png differ diff --git a/funcs/V/025.png b/funcs/V/025.png new file mode 100644 index 00000000..947be2fe Binary files /dev/null and b/funcs/V/025.png differ diff --git a/funcs/V/026.png b/funcs/V/026.png new file mode 100644 index 00000000..75630523 Binary files /dev/null and b/funcs/V/026.png differ diff --git a/funcs/V/027.png b/funcs/V/027.png new file mode 100644 index 00000000..c6ac16c9 Binary files /dev/null and b/funcs/V/027.png differ diff --git a/funcs/V/028.png b/funcs/V/028.png new file mode 100644 index 00000000..a64eb85e Binary files /dev/null and b/funcs/V/028.png differ diff --git a/funcs/V/029.png b/funcs/V/029.png new file mode 100644 index 00000000..0ac26022 Binary files /dev/null and b/funcs/V/029.png differ diff --git a/funcs/V/030.png b/funcs/V/030.png new file mode 100644 index 00000000..d5fc4ed6 Binary files /dev/null and b/funcs/V/030.png differ diff --git a/funcs/V/031.png b/funcs/V/031.png new file mode 100644 index 00000000..3347a1b3 Binary files /dev/null and b/funcs/V/031.png differ diff --git a/funcs/V/032.png b/funcs/V/032.png new file mode 100644 index 00000000..32f211e0 Binary files /dev/null and b/funcs/V/032.png differ diff --git a/funcs/V/033.png b/funcs/V/033.png new file mode 100644 index 00000000..e689f892 Binary files /dev/null and b/funcs/V/033.png differ diff --git a/funcs/V/034.png b/funcs/V/034.png new file mode 100644 index 00000000..435a09be Binary files /dev/null and b/funcs/V/034.png differ diff --git a/funcs/V/035.png b/funcs/V/035.png new file mode 100644 index 00000000..081be3fc Binary files /dev/null and b/funcs/V/035.png differ diff --git a/funcs/V/036.png b/funcs/V/036.png new file mode 100644 index 00000000..d97b2788 Binary files /dev/null and b/funcs/V/036.png differ diff --git a/funcs/V/037.png b/funcs/V/037.png new file mode 100644 index 00000000..9218845f Binary files /dev/null and b/funcs/V/037.png differ diff --git a/funcs/V/038.png b/funcs/V/038.png new file mode 100644 index 00000000..99f602a7 Binary files /dev/null and b/funcs/V/038.png differ diff --git a/funcs/V/039.png b/funcs/V/039.png new file mode 100644 index 00000000..357012d7 Binary files /dev/null and b/funcs/V/039.png differ diff --git a/funcs/V/040.png b/funcs/V/040.png new file mode 100644 index 00000000..9728b7ab Binary files /dev/null and b/funcs/V/040.png differ diff --git a/funcs/V/041.png b/funcs/V/041.png new file mode 100644 index 00000000..19aea72f Binary files /dev/null and b/funcs/V/041.png differ diff --git a/funcs/V/042.png b/funcs/V/042.png new file mode 100644 index 00000000..955f5ebf Binary files /dev/null and b/funcs/V/042.png differ diff --git a/funcs/V/043.png b/funcs/V/043.png new file mode 100644 index 00000000..fc011226 Binary files /dev/null and b/funcs/V/043.png differ diff --git a/funcs/V/044.png b/funcs/V/044.png new file mode 100644 index 00000000..33455c9c Binary files /dev/null and b/funcs/V/044.png differ diff --git a/funcs/V/045.png b/funcs/V/045.png new file mode 100644 index 00000000..bfbcb078 Binary files /dev/null and b/funcs/V/045.png differ diff --git a/funcs/V/046.png b/funcs/V/046.png new file mode 100644 index 00000000..df60ec17 Binary files /dev/null and b/funcs/V/046.png differ diff --git a/funcs/V/047.png b/funcs/V/047.png new file mode 100644 index 00000000..f82ca1c9 Binary files /dev/null and b/funcs/V/047.png differ diff --git a/funcs/V/048.png b/funcs/V/048.png new file mode 100644 index 00000000..a21caba7 Binary files /dev/null and b/funcs/V/048.png differ diff --git a/funcs/V/049.png b/funcs/V/049.png new file mode 100644 index 00000000..c2b0c22a Binary files /dev/null and b/funcs/V/049.png differ diff --git a/funcs/V/050.png b/funcs/V/050.png new file mode 100644 index 00000000..18ade2aa Binary files /dev/null and b/funcs/V/050.png differ diff --git a/funcs/V/051.png b/funcs/V/051.png new file mode 100644 index 00000000..726d39cb Binary files /dev/null and b/funcs/V/051.png differ diff --git a/funcs/V/052.png b/funcs/V/052.png new file mode 100644 index 00000000..0ca5a725 Binary files /dev/null and b/funcs/V/052.png differ diff --git a/funcs/V/053.png b/funcs/V/053.png new file mode 100644 index 00000000..ae563529 Binary files /dev/null and b/funcs/V/053.png differ diff --git a/funcs/V/054.png b/funcs/V/054.png new file mode 100644 index 00000000..c52c122a Binary files /dev/null and b/funcs/V/054.png differ diff --git a/funcs/V/055.png b/funcs/V/055.png new file mode 100644 index 00000000..786ff951 Binary files /dev/null and b/funcs/V/055.png differ diff --git a/funcs/V/056.png b/funcs/V/056.png new file mode 100644 index 00000000..924f2b99 Binary files /dev/null and b/funcs/V/056.png differ diff --git a/funcs/V/057.png b/funcs/V/057.png new file mode 100644 index 00000000..8787ff10 Binary files /dev/null and b/funcs/V/057.png differ diff --git a/funcs/V/058.png b/funcs/V/058.png new file mode 100644 index 00000000..33f9ec0d Binary files /dev/null and b/funcs/V/058.png differ diff --git a/funcs/V/059.png b/funcs/V/059.png new file mode 100644 index 00000000..aa739a0a Binary files /dev/null and b/funcs/V/059.png differ diff --git a/funcs/V/060.png b/funcs/V/060.png new file mode 100644 index 00000000..d310b773 Binary files /dev/null and b/funcs/V/060.png differ diff --git a/funcs/V/061.png b/funcs/V/061.png new file mode 100644 index 00000000..030e429e Binary files /dev/null and b/funcs/V/061.png differ diff --git a/funcs/V/062.png b/funcs/V/062.png new file mode 100644 index 00000000..00ff9b75 Binary files /dev/null and b/funcs/V/062.png differ diff --git a/funcs/V/063.png b/funcs/V/063.png new file mode 100644 index 00000000..489c9455 Binary files /dev/null and b/funcs/V/063.png differ diff --git a/funcs/V/064.png b/funcs/V/064.png new file mode 100644 index 00000000..b8f5ff8b Binary files /dev/null and b/funcs/V/064.png differ diff --git a/funcs/V/065.png b/funcs/V/065.png new file mode 100644 index 00000000..9fd33062 Binary files /dev/null and b/funcs/V/065.png differ diff --git a/funcs/V/066.png b/funcs/V/066.png new file mode 100644 index 00000000..2238f779 Binary files /dev/null and b/funcs/V/066.png differ diff --git a/funcs/V/067.png b/funcs/V/067.png new file mode 100644 index 00000000..1ebed0f9 Binary files /dev/null and b/funcs/V/067.png differ diff --git a/funcs/V/068.png b/funcs/V/068.png new file mode 100644 index 00000000..450ff613 Binary files /dev/null and b/funcs/V/068.png differ diff --git a/funcs/V/069.png b/funcs/V/069.png new file mode 100644 index 00000000..1cffe887 Binary files /dev/null and b/funcs/V/069.png differ diff --git a/funcs/V/070.png b/funcs/V/070.png new file mode 100644 index 00000000..bf611caa Binary files /dev/null and b/funcs/V/070.png differ diff --git a/funcs/V/071.png b/funcs/V/071.png new file mode 100644 index 00000000..c0ca7024 Binary files /dev/null and b/funcs/V/071.png differ diff --git a/funcs/V/072.png b/funcs/V/072.png new file mode 100644 index 00000000..50278e72 Binary files /dev/null and b/funcs/V/072.png differ diff --git a/funcs/V/073.png b/funcs/V/073.png new file mode 100644 index 00000000..92b6f9f9 Binary files /dev/null and b/funcs/V/073.png differ diff --git a/funcs/V/074.png b/funcs/V/074.png new file mode 100644 index 00000000..507ae621 Binary files /dev/null and b/funcs/V/074.png differ diff --git a/funcs/V/075.png b/funcs/V/075.png new file mode 100644 index 00000000..f50c8b97 Binary files /dev/null and b/funcs/V/075.png differ diff --git a/funcs/V/076.png b/funcs/V/076.png new file mode 100644 index 00000000..1bb0d24e Binary files /dev/null and b/funcs/V/076.png differ diff --git a/funcs/V/077.png b/funcs/V/077.png new file mode 100644 index 00000000..07bdf908 Binary files /dev/null and b/funcs/V/077.png differ diff --git a/funcs/V/078.png b/funcs/V/078.png new file mode 100644 index 00000000..8e2895fd Binary files /dev/null and b/funcs/V/078.png differ diff --git a/funcs/V/079.png b/funcs/V/079.png new file mode 100644 index 00000000..fdf9d4d2 Binary files /dev/null and b/funcs/V/079.png differ diff --git a/funcs/V/080.png b/funcs/V/080.png new file mode 100644 index 00000000..e7e33dad Binary files /dev/null and b/funcs/V/080.png differ diff --git a/funcs/V/081.png b/funcs/V/081.png new file mode 100644 index 00000000..9f0d430b Binary files /dev/null and b/funcs/V/081.png differ diff --git a/funcs/V/082.png b/funcs/V/082.png new file mode 100644 index 00000000..e27cbe79 Binary files /dev/null and b/funcs/V/082.png differ diff --git a/funcs/V/083.png b/funcs/V/083.png new file mode 100644 index 00000000..3cf5a430 Binary files /dev/null and b/funcs/V/083.png differ diff --git a/funcs/V/084.png b/funcs/V/084.png new file mode 100644 index 00000000..8e58f9d0 Binary files /dev/null and b/funcs/V/084.png differ diff --git a/funcs/V/085.png b/funcs/V/085.png new file mode 100644 index 00000000..00d3a690 Binary files /dev/null and b/funcs/V/085.png differ diff --git a/funcs/V/086.png b/funcs/V/086.png new file mode 100644 index 00000000..ed4d0304 Binary files /dev/null and b/funcs/V/086.png differ diff --git a/funcs/V/087.png b/funcs/V/087.png new file mode 100644 index 00000000..aad071cb Binary files /dev/null and b/funcs/V/087.png differ diff --git a/funcs/V/088.png b/funcs/V/088.png new file mode 100644 index 00000000..da73f6c3 Binary files /dev/null and b/funcs/V/088.png differ diff --git a/funcs/V/089.png b/funcs/V/089.png new file mode 100644 index 00000000..75db65aa Binary files /dev/null and b/funcs/V/089.png differ diff --git a/funcs/V/090.png b/funcs/V/090.png new file mode 100644 index 00000000..25fa9b94 Binary files /dev/null and b/funcs/V/090.png differ diff --git a/funcs/V/091.png b/funcs/V/091.png new file mode 100644 index 00000000..93ec89ec Binary files /dev/null and b/funcs/V/091.png differ diff --git a/funcs/V/092.png b/funcs/V/092.png new file mode 100644 index 00000000..90f5f027 Binary files /dev/null and b/funcs/V/092.png differ diff --git a/funcs/V/093.png b/funcs/V/093.png new file mode 100644 index 00000000..c90f022d Binary files /dev/null and b/funcs/V/093.png differ diff --git a/funcs/V/094.png b/funcs/V/094.png new file mode 100644 index 00000000..5098b05c Binary files /dev/null and b/funcs/V/094.png differ diff --git a/funcs/V/095.png b/funcs/V/095.png new file mode 100644 index 00000000..935744ae Binary files /dev/null and b/funcs/V/095.png differ diff --git a/funcs/V/096.png b/funcs/V/096.png new file mode 100644 index 00000000..baec9fb3 Binary files /dev/null and b/funcs/V/096.png differ diff --git a/funcs/V/097.png b/funcs/V/097.png new file mode 100644 index 00000000..b433b415 Binary files /dev/null and b/funcs/V/097.png differ diff --git a/funcs/V/098.png b/funcs/V/098.png new file mode 100644 index 00000000..62131fa0 Binary files /dev/null and b/funcs/V/098.png differ diff --git a/funcs/V/099.png b/funcs/V/099.png new file mode 100644 index 00000000..b103fdfc Binary files /dev/null and b/funcs/V/099.png differ diff --git a/funcs/contour2x2.c b/funcs/contour2x2.c index 7bc6bde8..f33eea5e 100644 --- a/funcs/contour2x2.c +++ b/funcs/contour2x2.c @@ -18,7 +18,8 @@ int fimg_contour_2x2(FloatImg *psrc, FloatImg *pdst, int notused) { float avg[4]; int foo, x, y, q; -int tbl[] = + +int tbl[] = /* deep magic inside */ { 0, 1, 1, 1, 1, 1, 0, 1, diff --git a/funcs/equalize.c b/funcs/equalize.c index 9c0465ec..264856ad 100644 --- a/funcs/equalize.c +++ b/funcs/equalize.c @@ -19,7 +19,7 @@ int foo; float dr, dg, db; #if DEBUG_LEVEL -fprintf(stderr, ">>> %s ( %p )\n", __func__, src); +fprintf(stderr, ">>> %s ( %p %p %f )\n", __func__, src, vptr, vmax); #endif memset(minmax, 0, 6*sizeof(float)); @@ -34,9 +34,9 @@ dr = minmax[1] - minmax[0]; dg = minmax[3] - minmax[2]; db = minmax[5] - minmax[4]; -printf("Rmin %12.4g Rmax %12.4g delta %12.4g\n", minmax[0], minmax[1], dr); -printf("Gmin %12.4g Gmax %12.4g delta %12.4g\n", minmax[2], minmax[3], dg); -printf("Bmin %12.4g Bmax %12.4g delta %12.4g\n", minmax[4], minmax[5], db); +printf("Rmin %12.4g max %12.4g delta %12.4g\n", minmax[0], minmax[1], dr); +printf("Gmin %12.4g max %12.4g delta %12.4g\n", minmax[2], minmax[3], dg); +printf("Bmin %12.4g max %12.4g delta %12.4g\n", minmax[4], minmax[5], db); if ( (minmax[0]<0.0) || (minmax[2]<0.0) || (minmax[4]<0.0) ) { fprintf(stderr, "%s: negative value ?\n", __func__); diff --git a/funcs/qsortrgb.c b/funcs/qsortrgb.c index 05456b24..811f97d3 100644 --- a/funcs/qsortrgb.c +++ b/funcs/qsortrgb.c @@ -14,27 +14,90 @@ int verbosity; /* --------------------------------------------------------------------- */ /* nouveau 7 octobre 2020, juste avant sonoptic de la pluie craignos */ -static int compare(const void *p1, const void *p2) +static int compare_a(const void *p1, const void *p2) { return ( *(float *)p1 < *(float *)p2 ); } -int fimg_qsort_rgb(FloatImg *psrc, FloatImg *pdst, int notused) +int fimg_qsort_rgb_a(FloatImg *psrc, FloatImg *pdst, int notused) { int foo, szimg; #if DEBUG_LEVEL fprintf(stderr, ">>> %s ( %p %p %d )\n", __func__, psrc, pdst, notused); - #endif +#endif foo = fimg_copy_data(psrc, pdst); szimg = pdst->width * pdst->height; fprintf(stderr, "%s : %d pixels\n", __func__, szimg); -qsort(pdst->R, szimg, sizeof(float), compare); -qsort(pdst->G, szimg, sizeof(float), compare); -qsort(pdst->B, szimg, sizeof(float), compare); +qsort(pdst->R, szimg, sizeof(float), compare_a); +qsort(pdst->G, szimg, sizeof(float), compare_a); +qsort(pdst->B, szimg, sizeof(float), compare_a); + +return 0; +} +/* --------------------------------------------------------------------- */ +typedef struct { + float sum; + float r, g, b; + } pix; + +static compare_b(const void *p1, const void *p2) +{ +pix *s1, *s2; +s1 = (pix *)p1; +s2 = (pix *)p2; +return ( s1->sum < s2->sum ); +} + +int fimg_qsort_rgb_b(FloatImg *psrc, FloatImg *pdst, int notused) +{ +int x, y, szimg; +pix *ppix, *ptr; +float rgb[3]; + +// #if DEBUG_LEVEL +fprintf(stderr, ">>> %s ( %p %p %d )\n", __func__, psrc, pdst, notused); +// #endif + +szimg = pdst->width * pdst->height; +fprintf(stderr, "%s : %d pixels\n", __func__, szimg); + +ppix = calloc(szimg, sizeof(pix)); + +ptr = ppix; /* mobile pointer */ +for (y=0; yheight; y++) { + for (x=0; xwidth; x++) { + + fimg_get_rgb(psrc, x, y, rgb); + + ptr->sum = rgb[0] + rgb[1] + rgb[2]; + ptr->r = rgb[0]; + ptr->g = rgb[1]; + ptr->b = rgb[2]; + + ptr++; /* next pixel */ + } + } + +qsort(ppix, szimg, sizeof(pix), compare_b); + +ptr = ppix; /* mobile pointer */ +for (y=0; yheight; y++) { + for (x=0; xwidth; x++) { + + rgb[0] = ptr->r; + rgb[1] = ptr->g; + rgb[2] = ptr->b; + fimg_put_rgb(pdst, x, y, rgb); + + ptr++; /* next pixel */ + } + } + +free(ppix); return 0; } diff --git a/funcs/t.c b/funcs/t.c index 17befa52..8e733c37 100644 --- a/funcs/t.c +++ b/funcs/t.c @@ -19,7 +19,7 @@ float global_fvalue; * nouveau 7 octobre 2020 pendant sonoptic */ -int fimg_qsort_rgb(FloatImg *psrc, FloatImg *pdst, int notused); +// int essai_qsort_rgb(char *infile) { @@ -41,13 +41,13 @@ else { fimg_clone(&src, &dst, 1); -foo = fimg_qsort_rgb(&src, &dst, 0); +foo = fimg_qsort_rgb_b(&src, &dst, 0); if (foo) { fprintf(stderr, "%s: err %d in qsort_rgb\n", __func__, foo); return foo; } -foo = fimg_save_as_pnm(&dst, "out.pnm", 0); +foo = fimg_dump_to_file(&dst, "out.fimg", 0); if (foo) { fprintf(stderr, "%s : err %d saving result\n", __func__, foo); return foo; diff --git a/funcs/vroum.sh b/funcs/vroum.sh index 3ffc3135..7bb88e42 100755 --- a/funcs/vroum.sh +++ b/funcs/vroum.sh @@ -1,11 +1,17 @@ #!/bin/bash -src=foo.fimg -maxi=49 -grabopt=" -s 1280x720 -vv -p 0 -n 200 -c none " +src=/dev/shm/foo.fimg +out=out.fimg + +maxi=99 +W="640" +H="480" +grabopt=" -s 640x480 -v -p 0 -n 100 -c cos01 " mkdir V +G=$(printf "%dx%d+0+0" $W $H) + for foo in $(seq 0 $maxi) do @@ -14,14 +20,13 @@ do grabvidseq -$grabopt -o $src fval=$(echo "$foo / $maxi" | bc -l) - ./t -k $fval -v ctr2x2 $src + ./t -k $fval -v qsortrgb $src + echo $foo ' = ' $fval - echo $foo $fval + dst=$(printf "V/%03d.png" $foo) - nom=$(printf "V/%03d.pnm" $foo) - cp out.pnm $nom - echo $nom + montage $src $out -geometry $G $dst done -convert -delay 20 V/*.pnm foo.gif +convert -delay 10 V/*.png foo.gif diff --git a/lib/fimg-math.c b/lib/fimg-math.c index 32da0d34..3b3c7c65 100644 --- a/lib/fimg-math.c +++ b/lib/fimg-math.c @@ -246,7 +246,7 @@ for (idx=0; idx