minor fixes
This commit is contained in:
parent
75f36c0f6a
commit
57af8c2e93
@ -130,7 +130,7 @@ int fimg_mix_rgb_gray(FloatImg *img, float mix);
|
|||||||
int fimg_shift_to_zero(FloatImg *s, FloatImg *d, float coefs[6]);
|
int fimg_shift_to_zero(FloatImg *s, FloatImg *d, float coefs[6]);
|
||||||
|
|
||||||
/* --> funcs/plasmas.c */
|
/* --> funcs/plasmas.c */
|
||||||
int fimg_prototype_plasma(FloatImg *img, char *txt, int type);
|
int fimg_prototype_plasma(FloatImg *img, double time, int type);
|
||||||
|
|
||||||
/* * * * experimental ! */
|
/* * * * experimental ! */
|
||||||
int fimg_classif_trial(FloatImg *src, FloatImg*dst, float fval, int notused);
|
int fimg_classif_trial(FloatImg *src, FloatImg*dst, float fval, int notused);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#---------------------------------------------------------------
|
#---------------------------------------------------------------
|
||||||
|
|
||||||
COPT = -Wall -fpic -g -no-pie -DDEBUG_LEVEL=1
|
COPT = -Wall -fpic -g -no-pie -DDEBUG_LEVEL=0
|
||||||
DEPS = ../floatimg.h Makefile
|
DEPS = ../floatimg.h Makefile
|
||||||
|
|
||||||
OBJS = fimg-png.o fimg-tiff.o misc-plots.o filtrage.o utils.o \
|
OBJS = fimg-png.o fimg-tiff.o misc-plots.o filtrage.o utils.o \
|
||||||
@ -29,7 +29,7 @@ tests.o: tests.c tests.h $(DEPS)
|
|||||||
../libfloatimg.a: $(OBJS)
|
../libfloatimg.a: $(OBJS)
|
||||||
$(AR) r $@ $?
|
$(AR) r $@ $?
|
||||||
|
|
||||||
displacement.o: displacement.c
|
displacement.o: displacement.c $(DEPS)
|
||||||
gcc $(COPT) -c $<
|
gcc $(COPT) -c $<
|
||||||
|
|
||||||
fimg-png.o: fimg-png.c $(DEPS)
|
fimg-png.o: fimg-png.c $(DEPS)
|
||||||
|
@ -170,7 +170,7 @@ unsigned char *bytes, *bptr;
|
|||||||
double maximum, fk;
|
double maximum, fk;
|
||||||
|
|
||||||
#if DEBUG_LEVEL
|
#if DEBUG_LEVEL
|
||||||
fprintf(stderr, ">>> %-25s ( %p '%s' %x )\n", __func__, src, outname, flags);
|
fprintf(stderr, ">>> %-25s ( %p '%s' 0x%x )\n", __func__, src, outname, flags);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* convert ou floating datas to a byte/rgb array */
|
/* convert ou floating datas to a byte/rgb array */
|
||||||
|
@ -171,7 +171,7 @@ switch(opt) {
|
|||||||
foo = essai_lecture_png(filename, outfile, 0);
|
foo = essai_lecture_png(filename, outfile, 0);
|
||||||
break;
|
break;
|
||||||
case Plasmas:
|
case Plasmas:
|
||||||
foo = essai_plasma(filename, outfile, 1, 13.37);
|
foo = essai_plasma(filename, outfile, 1, global_fvalue);
|
||||||
fprintf(stderr, "we are all plasmafields\n");
|
fprintf(stderr, "we are all plasmafields\n");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
extern int verbosity;
|
extern int verbosity;
|
||||||
|
|
||||||
/* --------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------- */
|
||||||
|
/*
|
||||||
|
*/
|
||||||
int essai_plasma(char *infile, char *outfile, int ikoef, float fkoef)
|
int essai_plasma(char *infile, char *outfile, int ikoef, float fkoef)
|
||||||
{
|
{
|
||||||
FloatImg src, dst;
|
FloatImg src, dst;
|
||||||
@ -27,15 +29,24 @@ fprintf(stderr, ">>> %s ( '%s' '%s' %d %g )\n", __func__,
|
|||||||
|
|
||||||
/* if infile is loadable, use it for background */
|
/* if infile is loadable, use it for background */
|
||||||
foo = fimg_create_from_dump(infile, &src);
|
foo = fimg_create_from_dump(infile, &src);
|
||||||
if (foo) {
|
if (0 == foo) {
|
||||||
fprintf(stderr, "%s: error loading '%s'\n", __func__, infile);
|
fprintf(stderr, "%s: image '%s' loaded\n", __func__, infile);
|
||||||
return foo;
|
}
|
||||||
|
else {
|
||||||
|
/* make a fancy synthetic picture */
|
||||||
|
foo = fimg_create(&src, 800, 600, FIMG_TYPE_RGB);
|
||||||
}
|
}
|
||||||
fprintf(stderr, "'%s' loaded\n", infile);
|
|
||||||
fimg_printhead(&src);
|
|
||||||
|
|
||||||
|
fimg_printhead(&src);
|
||||||
fimg_clone(&src, &dst, 1);
|
fimg_clone(&src, &dst, 1);
|
||||||
|
|
||||||
|
foo = fimg_prototype_plasma(&dst, fkoef, 0);
|
||||||
|
if (foo) {
|
||||||
|
fprintf(stderr, "%s: err %d on plasma proto\n", __func__, foo);
|
||||||
|
return -88;
|
||||||
|
}
|
||||||
|
|
||||||
|
fimg_mul_3(&src, &dst, &dst);
|
||||||
|
|
||||||
foo = fimg_export_picture(&dst, outfile, 0);
|
foo = fimg_export_picture(&dst, outfile, 0);
|
||||||
if (foo) {
|
if (foo) {
|
||||||
|
@ -7,7 +7,7 @@ device=/dev/video2
|
|||||||
maxi=59
|
maxi=59
|
||||||
W="320"
|
W="320"
|
||||||
H="240"
|
H="240"
|
||||||
grabopt=" -s ${W}x${H}w -vv -d $device -p 0 -n 30
|
grabopt=" -s ${W}x${H} -vv -u -d $device -p 0 -n 30
|
||||||
0 -c none "
|
0 -c none "
|
||||||
|
|
||||||
mkdir /tmp/V
|
mkdir /tmp/V
|
||||||
@ -22,10 +22,10 @@ do
|
|||||||
|
|
||||||
grabvidseq -$grabopt -o $src
|
grabvidseq -$grabopt -o $src
|
||||||
|
|
||||||
fval=$(echo "$foo / $maxi" | bc -l)
|
fval=$(echo "$foo / $maxi * 13.56636" | bc -l)
|
||||||
echo $foo ' => ' $fval
|
echo ; echo $foo ' => ' $fval
|
||||||
|
|
||||||
./t -vv -k $fval -o $out classif $src
|
./t -vv -k $fval -o $out plasma $src
|
||||||
|
|
||||||
# fimgstats $out
|
# fimgstats $out
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ do
|
|||||||
echo $dst
|
echo $dst
|
||||||
montage $src $out -tile 1x2 -geometry $G $dst
|
montage $src $out -tile 1x2 -geometry $G $dst
|
||||||
|
|
||||||
sleep 2
|
sleep 55
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user