diff --git a/.gitignore b/.gitignore index 23afd1b..739851a 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 c55fc4d..f3d402d 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 0000000..42aeae3 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 0000000..bb2920d 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 0000000..b6ec72e 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 0000000..81c96e1 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 0000000..d0338eb 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 0000000..615c140 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 0000000..72384de 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 0000000..d04d5b4 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 0000000..9526e90 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 0000000..1e65161 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 0000000..ac7a9c5 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 0000000..8e0e2ce 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 0000000..42d7c61 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 0000000..806312c 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 0000000..5dcf27f 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 0000000..de11c97 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 0000000..740c5f4 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 0000000..be40129 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 0000000..e69335c 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 0000000..aa8dbf1 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 0000000..bc8602a 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 0000000..880dffb 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 0000000..06de87e 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 0000000..f35c1ec 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 0000000..a79870d 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 0000000..947be2f 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 0000000..7563052 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 0000000..c6ac16c 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 0000000..a64eb85 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 0000000..0ac2602 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 0000000..d5fc4ed 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 0000000..3347a1b 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 0000000..32f211e 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 0000000..e689f89 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 0000000..435a09b 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 0000000..081be3f 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 0000000..d97b278 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 0000000..9218845 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 0000000..99f602a 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 0000000..357012d 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 0000000..9728b7a 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 0000000..19aea72 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 0000000..955f5eb 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 0000000..fc01122 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 0000000..33455c9 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 0000000..bfbcb07 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 0000000..df60ec1 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 0000000..f82ca1c 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 0000000..a21caba 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 0000000..c2b0c22 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 0000000..18ade2a 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 0000000..726d39c 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 0000000..0ca5a72 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 0000000..ae56352 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 0000000..c52c122 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 0000000..786ff95 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 0000000..924f2b9 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 0000000..8787ff1 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 0000000..33f9ec0 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 0000000..aa739a0 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 0000000..d310b77 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 0000000..030e429 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 0000000..00ff9b7 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 0000000..489c945 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 0000000..b8f5ff8 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 0000000..9fd3306 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 0000000..2238f77 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 0000000..1ebed0f 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 0000000..450ff61 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 0000000..1cffe88 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 0000000..bf611ca 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 0000000..c0ca702 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 0000000..50278e7 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 0000000..92b6f9f 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 0000000..507ae62 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 0000000..f50c8b9 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 0000000..1bb0d24 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 0000000..07bdf90 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 0000000..8e2895f 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 0000000..fdf9d4d 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 0000000..e7e33da 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 0000000..9f0d430 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 0000000..e27cbe7 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 0000000..3cf5a43 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 0000000..8e58f9d 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 0000000..00d3a69 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 0000000..ed4d030 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 0000000..aad071c 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 0000000..da73f6c 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 0000000..75db65a 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 0000000..25fa9b9 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 0000000..93ec89e 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 0000000..90f5f02 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 0000000..c90f022 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 0000000..5098b05 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 0000000..935744a 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 0000000..baec9fb 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 0000000..b433b41 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 0000000..62131fa 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 0000000..b103fdf Binary files /dev/null and b/funcs/V/099.png differ diff --git a/funcs/contour2x2.c b/funcs/contour2x2.c index 7bc6bde..f33eea5 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 9c0465e..264856a 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 05456b2..811f97d 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 17befa5..8e733c3 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 3ffc313..7bb88e4 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 32da0d3..3b3c7c6 100644 --- a/lib/fimg-math.c +++ b/lib/fimg-math.c @@ -246,7 +246,7 @@ for (idx=0; idx