diff --git a/.gitignore b/.gitignore index cb77163..5fba36f 100644 --- a/.gitignore +++ b/.gitignore @@ -67,6 +67,7 @@ Fonderie/*.o Fonderie/*.png Fonderie/*.pnm Fonderie/*.gif +Fonderie/*.fimg Fonderie/fonderie Fonderie/interpolator Fonderie/t diff --git a/Fonderie/crapulator.c b/Fonderie/crapulator.c index 4485e69..62fca29 100644 --- a/Fonderie/crapulator.c +++ b/Fonderie/crapulator.c @@ -97,9 +97,19 @@ FimgFilter3x3 hipass = { 1.0, 0.0 }; +FimgFilter3x3 diagonal = { + { + 2.0, 1.0, 0.0, + 1.0, 0.0, -1.0, + 0.0, -1.0, -2.0, + }, + 1.0, 0.0 + }; + switch (typef) { case 0: pfiltre = &lowpass; break; case 1: pfiltre = &hipass; break; + case 2: pfiltre = &diagonal; break; default: fprintf(stderr, "%s: bad filter number %d\n", __func__, typef); @@ -114,7 +124,9 @@ if (retval) { fprintf(stderr, "%s error %d on filter\n", __func__, retval); exit(1); } -fimg_killborders(&img); /* XXX WTF OMG */ +/* + * may be, here, we can check for negative values ? */ +fimg_killborders(&img); fimg_copy_data(&img, pimg); fimg_destroy(&img); @@ -220,6 +232,9 @@ switch (idFx) { /* hipass filter */ retval = insitu_filtre3x3(image, 1); break; + case CR_diagonal: + retval = insitu_filtre3x3(image, 2); + break; case CR_octotree: retval = octotree_classif(image, 0.500, 0); break; diff --git a/Fonderie/crapulors.liste b/Fonderie/crapulors.liste index 05fd1f2..f1afc31 100644 --- a/Fonderie/crapulors.liste +++ b/Fonderie/crapulors.liste @@ -26,6 +26,7 @@ 27 shiftln0 1 1.0 28 qsortrgb 2 1.0 30 multidots 100 1.333 +31 diagonal 1 1.0 42 nothing 42 3.1415926 99 message 1 1.0 -1 end 1 1.0 diff --git a/Fonderie/essai.sh b/Fonderie/essai.sh index a3fe3d4..d800226 100755 --- a/Fonderie/essai.sh +++ b/Fonderie/essai.sh @@ -9,7 +9,8 @@ FILTRES=$(./t -L | awk 'NR>1 { print $1 }' | sort) rm /tmp/fstack*.png -SRC=$(ls -rt1 $HOME/Essais/FondageDePlomb/capture/* | tail -1) +# SRC=$(ls -rt1 $HOME/Essais/FondageDePlomb/capture/* | tail -1) +SRC=mire.fimg for F in $FILTRES do @@ -53,6 +54,6 @@ ffmpeg -nostdin \ # ------------------------------------------------------------ # MAIN -essai_singlepass +essai_filtres # ------------------------------------------------------------