fine tuning fimgfx with a script

This commit is contained in:
tth 2019-11-29 19:55:52 +01:00
parent 9ae7e4d85f
commit 8a68cc24c6
4 changed files with 41 additions and 11 deletions

4
.gitignore vendored
View File

@ -27,6 +27,10 @@ doc/*.ind
funcs/t
scripts/*.fimg
scripts/*.pnm
scripts/*.gif
v4l2/t
v4l2/capture
v4l2/grabvidseq

View File

@ -4,7 +4,7 @@ cp libfloatimg.a /usr/local/lib
cp floatimg.h /usr/local/include
cp tools/mkfimg tools/fimg2pnm tools/fimgops \
tools/png2fimg tools/fimgstats \
tools/png2fimg tools/fimgstats tools/fimgfx \
/usr/local/bin
cp v4l2/grabvidseq v4l2/video-infos \

27
scripts/contrast-test.sh Executable file
View File

@ -0,0 +1,27 @@
#!/bin/bash
GRAB="quux.fimg"
COS01="cos01.fimg"
SQRT="sqrt.fimg"
POW2="pow2.fimg"
f2p ()
{
echo ========== $1
fimg2pnm -v $1 $(basename $1 .fimg).pnm
}
grabvidseq -v -n 777 -p 0.07 -o $GRAB
f2p $GRAB
fimgfx -v pow2 $GRAB $POW2
f2p $POW2
fimgfx -v sqrt $GRAB $SQRT
f2p $SQRT
fimgfx -v cos01 $GRAB $COS01
f2p $COS01
convert -delay 10 *.pnm foo.gif

View File

@ -66,7 +66,7 @@ FloatImg src, dest;
int foo;
double maxval;
#if 1
#if DEBUG_LEVEL
fprintf(stderr, ">>> %s ( '%s' %d '%s' )\n", __func__,
sf, act, df);
#endif
@ -125,7 +125,7 @@ while ((opt = getopt(argc, argv, "hk:v")) != -1) {
}
}
#if 1
#if DEBUG_LEVEL
fprintf(stderr, "argc %d optind %d\n", argc, optind);
for (foo=0; foo<argc; foo++)
fprintf(stderr, "%3d %c %s\n", foo, foo==optind?'*':' ', argv[foo]);
@ -144,9 +144,9 @@ if (action < 0) {
}
if (verbosity) {
fprintf(stderr, "global fvalue %f\n", global_fvalue);
fprintf(stderr, "action %d\n", action);
fprintf(stderr, "verbosity %d\n", verbosity);
fprintf(stderr, " global fvalue %f\n", global_fvalue);
fprintf(stderr, " action %d\n", action);
fprintf(stderr, " verbosity %d\n", verbosity);
}
if ((nba=fx_list[action].nbarg)) {
@ -155,13 +155,12 @@ if ((nba=fx_list[action].nbarg)) {
srcname = argv[optind+1];
dstname = argv[optind+2];
fprintf(stderr, "%s ==> %s\n", srcname, dstname);
if (verbosity) fprintf(stderr, "%s ==> %s\n", srcname, dstname);
foo = do_an_effect(srcname, action, dstname);
fprintf(stderr, "do an effect -> %d\n", foo);
fprintf(stderr, "\n%s [done]\n", argv[0]);
if (foo) {
fprintf(stderr, "do an effect -> %d\n", foo);
}
return 0;
}