Compare commits

...

5 Commits

Author SHA1 Message Date
tth
31ba65f01d wip again... 2020-10-30 13:14:23 +01:00
tth
6ff326d7d5 some tuning on tests 2020-10-30 10:03:35 +01:00
tth
2d072bdfc9 silencing an useless values display 2020-10-29 22:40:00 +01:00
tth
76b7e9ad55 remove useless message 2020-10-29 18:49:02 +01:00
tth
a6658532de remove useless message, fix parameter bug in vroum 2020-10-28 13:00:12 +01:00
7 changed files with 68 additions and 11 deletions

View File

@ -6,7 +6,7 @@ OBJS = fimg-png.o fimg-tiff.o misc-plots.o filtrage.o utils.o \
fimg-libpnm.o rampes.o sfx0.o geometry.o rotate.o \
equalize.o fimg-fits.o saturation.o histogram.o \
hsv.o classif.o contour2x2.o qsortrgb.o exporter.o \
displacement.o
displacement.o dithering.o
#---------------------------------------------------------------
@ -56,6 +56,10 @@ histogram.o: histogram.c $(DEPS)
equalize.o: equalize.c $(DEPS)
gcc $(COPT) -c $<
dithering.o: dithering.c $(DEPS)
gcc $(COPT) -c $<
sfx0.o: sfx0.c $(DEPS)
gcc $(COPT) -c $<

20
funcs/README.md Normal file
View File

@ -0,0 +1,20 @@
# Fonctions
Plein de fonctions qu'il serait bon de documenter :)
## Contours
Détecter des contours est une activité respectable.
## Exporter
Une méta-fonction qui va sauvegarder (dans la mesure de ses conséquences)
une image en fonction de l'extension du nom de fichier.
## Sfx
Effets spéciaux divers.
## Dithering
Work in progress...

View File

@ -49,7 +49,7 @@ else {
}
foo = fimg_meanvalues(psrc, avg);
if (verbosity) {
if (verbosity > 1) {
fprintf(stderr, "mean values : %f %f %f\n", avg[0], avg[1], avg[2]);
}

View File

@ -73,15 +73,11 @@ for (y=0; y<psrc->height; y++) {
rgb[1] = rgb[2] = rgb[0];
}
fimg_put_rgb(pdst, dstx, dsty, rgb);
// fprintf(stderr, "%5d %5d %f\n", dstx, dsty, rgb[1]);
in++;
}
}
if (verbosity > 2) {
fprintf(stderr, "%4d / %4d\n", y, psrc->height);
}
}
if (verbosity) fprintf(stderr, "%s -> in %d out %d\n", __func__, in, out);

31
funcs/dithering.c Normal file
View File

@ -0,0 +1,31 @@
/*
* FloatImg : some dithering experiments
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "../floatimg.h"
extern int verbosity;
/* --------------------------------------------------------------------- */
int fimg_dither_0(FloatImg *psrc, FloatImg *pdst, int flags)
{
int x, y;
for (y=0; y<psrc->height; y++) {
for (x=0; x<psrc->width; x++)
{
}
}
return -1;
}
/* --------------------------------------------------------------------- */

View File

@ -82,6 +82,8 @@ if (foo) {
return foo;
}
fimg_destroy(&src); fimg_destroy(&dst);
return 0;
}
@ -122,6 +124,8 @@ if (foo) {
return foo;
}
fimg_destroy(&src); fimg_destroy(&dst);
return 0;
}
/* --------------------------------------------------------------------- */
@ -162,6 +166,8 @@ if (foo) {
return foo;
}
fimg_destroy(&src); fimg_destroy(&dst);
return 0;
}
/* --------------------------------------------------------------------- */

View File

@ -3,10 +3,10 @@
src=/dev/shm/foo.fimg
out=out.fimg
maxi=49
W="640"
H="480"
grabopt=" -s 640x480 -vv -p 0 -n 500 -c cos01 "
maxi=249
W="320"
H="240"
grabopt=" -s ${W}x${H}w -vv -p 0 -n 60 -c none "
mkdir /tmp/V
@ -20,7 +20,7 @@ do
grabvidseq -$grabopt -o $src
fval=$(echo "$foo / $maxi" | bc -l)
./t -vv -k 0.333 -o $out displace $src
./t -vv -k 0.333 -o $out classif $src
# fimgstats $out