| 1 | # Trouver des images au pif |
|---|
| 2 | % find ~/4chan/unsorted-4chan/http* -name '1[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9].???' | rev | sort -k2 -t. | rev | xargs -n 1 ./main | tee fs-4chan.txt |
|---|
| 3 | % find ~/4chan/unsorted-4chan/http* -name '1[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9].???' | rev | sort -k2 -t. | rev | xargs -n 1 ./main-jajuni | tee jajuni-4chan.txt |
|---|
| 4 | % cat /tmp/4chanlist.txt | xargs -n 1 ./main | tee -a fs-4chan.txt |
|---|
| 5 | |
|---|
| 6 | # Lena |
|---|
| 7 | set hidden3d |
|---|
| 8 | set grid |
|---|
| 9 | unset colorbox |
|---|
| 10 | splot "lena-min.txt" with lines lc 7 notitle |
|---|
| 11 | set terminal epslatex color size 2.5,2 blacktext |
|---|
| 12 | set tmargin screen 0.75 |
|---|
| 13 | set bmargin screen 0.25 |
|---|
| 14 | set lmargin screen 0.05 |
|---|
| 15 | set rmargin screen 0.95 |
|---|
| 16 | set output "lena-min.tex" |
|---|
| 17 | splot "lena-min.txt" with lines lc 7 notitle |
|---|
| 18 | unset output |
|---|
| 19 | set term pop |
|---|
| 20 | |
|---|
| 21 | # Dans gnuplot |
|---|
| 22 | set xrange [-.1:.4] |
|---|
| 23 | set yrange [.45:-.05] |
|---|
| 24 | set grid |
|---|
| 25 | plot "fs-4chan.txt" using 6:7 lc 1 pt 7 ps .08 title "4chan", \ |
|---|
| 26 | "fs-tobefred.txt" using 6:7 lc 3 pt 7 ps .08 title "tobefred", \ |
|---|
| 27 | "fs-uscsipi.txt" using 6:7 lc 2 pt 7 ps .08 title "USC-SIPI", \ |
|---|
| 28 | "fs-jylam.txt" using 6:7 lc 4 pt 7 ps .08 title "Jylam", \ |
|---|
| 29 | "merge.txt" using 5:6 lc 7 ps .2 with lines |
|---|
| 30 | #plot "fs-textures.txt" using 6:7 lc 3 pt 7 ps .2, "fs-aerials.txt" using 6:7 lc 3 pt 7 ps .2, "fs-misc.txt" using 6:7 lc 7 pt 7 ps .2, "fs-4chan.txt" using 6:7 lc 1 pt 7 ps .2 |
|---|
| 31 | |
|---|
| 32 | # Histogramme de la tache Floyd-Steinberg |
|---|
| 33 | sed -ne 's/.* for //p' fs-*txt | ./xy2d >| histo-fs.txt |
|---|
| 34 | # Et ensuite dans gnuplot: |
|---|
| 35 | set xrange [-.1:.4] |
|---|
| 36 | set yrange [.4:-.1] |
|---|
| 37 | set grid |
|---|
| 38 | set lmargin screen 0.05 |
|---|
| 39 | set bmargin screen 0.15 |
|---|
| 40 | set tmargin screen 0.95 |
|---|
| 41 | set rmargin screen 0.95 |
|---|
| 42 | unset colorbox |
|---|
| 43 | set pm3d explicit map interpolate 1.8,1.8 |
|---|
| 44 | set palette model RGB defined(0 "white", 1 "blue", 2 "red", 3 "yellow") |
|---|
| 45 | unset key |
|---|
| 46 | #splot "histo-fs.txt" notitle |
|---|
| 47 | set terminal epslatex color size 1.8,1.8 blacktext |
|---|
| 48 | set output "fs-histo.tex" |
|---|
| 49 | splot "histo-fs.txt" notitle |
|---|
| 50 | unset output |
|---|
| 51 | set term pop |
|---|
| 52 | |
|---|
| 53 | set xrange [-.1:.9] |
|---|
| 54 | set yrange [.95:-.05] |
|---|
| 55 | set grid |
|---|
| 56 | plot "jajuni-4chan.txt" using 6:7 lc 1 pt 7 ps .08 title "4chan", \ |
|---|
| 57 | "jajuni-tobefred.txt" using 6:7 lc 3 pt 7 ps .08 title "tobefred", \ |
|---|
| 58 | "jajuni-uscsipi.txt" using 6:7 lc 2 pt 7 ps .08 title "USC-SIPI" |
|---|
| 59 | |
|---|
| 60 | # Histogramme de la tache JaJuNi |
|---|
| 61 | sed -ne 's/.* for //p' jajuni*txt | ./xy2d-jajuni >| histo-jajuni.txt |
|---|
| 62 | # Et ensuite dans gnuplot: |
|---|
| 63 | set xrange [-.1:.9] |
|---|
| 64 | set yrange [.9:-.1] |
|---|
| 65 | set grid |
|---|
| 66 | set lmargin screen 0.05 |
|---|
| 67 | set bmargin screen 0.15 |
|---|
| 68 | set tmargin screen 0.95 |
|---|
| 69 | set rmargin screen 0.95 |
|---|
| 70 | unset colorbox |
|---|
| 71 | set pm3d explicit map interpolate 1.8,1.8 |
|---|
| 72 | set palette model RGB defined(0 "white", 1 "blue", 2 "red", 3 "yellow") |
|---|
| 73 | unset key |
|---|
| 74 | #splot "histo-jajuni.txt" notitle |
|---|
| 75 | set terminal epslatex color size 1.8,1.8 blacktext |
|---|
| 76 | set output "jajuni-histo.tex" |
|---|
| 77 | splot "histo-jajuni.txt" notitle |
|---|
| 78 | unset output |
|---|
| 79 | set term pop |
|---|
| 80 | |
|---|
| 81 | # Test de merde |
|---|
| 82 | set xrange [0:5] |
|---|
| 83 | set yrange [0:5] |
|---|
| 84 | set grid |
|---|
| 85 | plot "fs-uscsipi.txt" using 2:4 lc 1 pt 7 ps .5, "fs-4chan.txt" using 2:4 lc 7 pt 7 ps .5, "fs-tobefred.txt" using 2:4 lc 3 pt 7 ps .5 |
|---|
| 86 | |
|---|
| 87 | # Ostromoukhov |
|---|
| 88 | set xrange [-.2:.2] |
|---|
| 89 | set yrange [.3:-.1] |
|---|
| 90 | set grid |
|---|
| 91 | plot "ostro-4chan.txt" using 6:7 lc 1 pt 7 ps .08 title "4chan", \ |
|---|
| 92 | "ostro-tobefred.txt" using 6:7 lc 3 pt 7 ps .08 title "tobefred", \ |
|---|
| 93 | "ostro-uscsipi.txt" using 6:7 lc 2 pt 7 ps .08 title "USC-SIPI" |
|---|
| 94 | |
|---|
| 95 | # Histogramme de la tache Ostro |
|---|
| 96 | sed -ne 's/.* for //p' ostro*txt | ./xy2d-ostro >| histo-ostro.txt |
|---|
| 97 | # Et ensuite dans gnuplot: |
|---|
| 98 | set xrange [-.2:.2] |
|---|
| 99 | set yrange [.3:-.1] |
|---|
| 100 | set grid |
|---|
| 101 | set lmargin screen 0.05 |
|---|
| 102 | set bmargin screen 0.15 |
|---|
| 103 | set tmargin screen 0.95 |
|---|
| 104 | set rmargin screen 0.95 |
|---|
| 105 | unset colorbox |
|---|
| 106 | set pm3d explicit map interpolate 1.8,1.8 |
|---|
| 107 | set palette model RGB defined(0 "white", 1 "blue", 2 "red", 3 "yellow") |
|---|
| 108 | unset key |
|---|
| 109 | splot "histo-ostro.txt" notitle |
|---|
| 110 | set terminal epslatex color size 1.8,1.8 blacktext |
|---|
| 111 | set output "ostro-histo.tex" |
|---|
| 112 | splot "histo-ostro.txt" notitle |
|---|
| 113 | unset output |
|---|
| 114 | set term pop |
|---|
| 115 | |
|---|
| 116 | # Optimum |
|---|
| 117 | set xrange [-.5:.2] |
|---|
| 118 | set yrange [.6:-.1] |
|---|
| 119 | set grid |
|---|
| 120 | plot "optimum-4chan.txt" using 6:7 lc 1 pt 7 ps .08 title "4chan", \ |
|---|
| 121 | "optimum-tobefred.txt" using 6:7 lc 3 pt 7 ps .08 title "tobefred", \ |
|---|
| 122 | "optimum-uscsipi.txt" using 6:7 lc 2 pt 7 ps .08 title "USC-SIPI" |
|---|
| 123 | |
|---|
| 124 | # Histogramme de la tache Optimum |
|---|
| 125 | sed -ne 's/.* for //p' optimum*txt | ./xy2d-optimum >| histo-optimum.txt |
|---|
| 126 | # Et ensuite dans gnuplot: |
|---|
| 127 | set xrange [-.5:.2] |
|---|
| 128 | set yrange [.6:-.1] |
|---|
| 129 | set grid |
|---|
| 130 | set lmargin screen 0.05 |
|---|
| 131 | set bmargin screen 0.15 |
|---|
| 132 | set tmargin screen 0.95 |
|---|
| 133 | set rmargin screen 0.95 |
|---|
| 134 | unset colorbox |
|---|
| 135 | set pm3d explicit map interpolate 1.8,1.8 |
|---|
| 136 | set palette model RGB defined(0 "white", 1 "blue", 2 "red", 3 "yellow") |
|---|
| 137 | unset key |
|---|
| 138 | splot "histo-optimum.txt" notitle |
|---|
| 139 | set terminal epslatex color size 1.8,1.8 blacktext |
|---|
| 140 | set output "optimum-histo.tex" |
|---|
| 141 | splot "histo-optimum.txt" notitle |
|---|
| 142 | unset output |
|---|
| 143 | set term pop |
|---|
| 144 | |
|---|
| 145 | # Serpentine Optimum |
|---|
| 146 | set xrange [-.3:.3] |
|---|
| 147 | set yrange [.5:-.1] |
|---|
| 148 | set grid |
|---|
| 149 | plot "serpopt-4chan.txt" using 6:7 lc 1 pt 7 ps .08 title "4chan", \ |
|---|
| 150 | "serpopt-tobefred.txt" using 6:7 lc 3 pt 7 ps .08 title "tobefred", \ |
|---|
| 151 | "serpopt-uscsipi.txt" using 6:7 lc 2 pt 7 ps .08 title "USC-SIPI" |
|---|
| 152 | |
|---|
| 153 | # Histogramme de la tache Serpentine Optimum |
|---|
| 154 | sed -ne 's/.* for //p' serpopt*txt | ./xy2d-serpopt >| histo-serpopt.txt |
|---|
| 155 | # Et ensuite dans gnuplot: |
|---|
| 156 | set xrange [-.3:.3] |
|---|
| 157 | set yrange [.6:-.1] |
|---|
| 158 | set grid |
|---|
| 159 | set lmargin screen 0.05 |
|---|
| 160 | set bmargin screen 0.15 |
|---|
| 161 | set tmargin screen 0.95 |
|---|
| 162 | set rmargin screen 0.95 |
|---|
| 163 | unset colorbox |
|---|
| 164 | set pm3d explicit map interpolate 1.8,1.8 |
|---|
| 165 | set palette model RGB defined(0 "white", 1 "blue", 2 "red", 3 "yellow") |
|---|
| 166 | unset key |
|---|
| 167 | splot "histo-serpopt.txt" notitle |
|---|
| 168 | set terminal epslatex color size 1.8,1.8 blacktext |
|---|
| 169 | set output "serpopt-histo.tex" |
|---|
| 170 | splot "histo-serpopt.txt" notitle |
|---|
| 171 | unset output |
|---|
| 172 | set term pop |
|---|
| 173 | |
|---|
| 174 | # Combinaison jajuni / floyd-steinberg |
|---|
| 175 | set xrange [-.1:.4] |
|---|
| 176 | set yrange [.9:-.1] |
|---|
| 177 | set grid |
|---|
| 178 | plot "fs-4chan.txt" using 6:7 lc 2 pt 7 ps .1 title "Floyd-Steinberg", "jajuni-tobefred.txt" using 6:7 lc 1 pt 7 ps .1 title "Jarvis-Judice-Ninke" |
|---|
| 179 | |
|---|
| 180 | ######################## Trucs en cours ######################## |
|---|
| 181 | |
|---|
| 182 | # Lancés sur canard: |
|---|
| 183 | boat.png elaine.png texture[2345].png |
|---|
| 184 | |
|---|
| 185 | # Lancés sur poulet : |
|---|
| 186 | ./main /var/www/net/tobefred/www/htdocs/media/romane_bohringer.jpg | tee out-bohringer.txt ; ./main /var/www/net/tobefred/www/htdocs/media/juliette_binoche_05.jpg | tee out-binoche.txt ; ./main /var/www/net/tobefred/www/htdocs/media/kate_beckinsale02.jpg | tee out-beckinsale.txt |
|---|
| 187 | |
|---|
| 188 | #### Pour les out-* |
|---|
| 189 | scp canard.zoy.org:out-'*'.txt . |
|---|
| 190 | for x in out-*.txt; do sort -k7 $x | head -20 ; done | cut -f1 -d: | sort | uniq -c | sort -n |
|---|
| 191 | |
|---|
| 192 | ### Pour faire des répertoires |
|---|
| 193 | for x in $(seq -w 00 09); do echo $x; mkdir -p /tmp/4chan/$x; cp $(find ~/4chan/unsorted-4chan/http* -name '1[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'$x'.???') /tmp/4chan/$x; done |
|---|
| 194 | |
|---|
| 195 | ### Conversion du vieux format de résultats |
|---|
| 196 | cat -n $x | sed 's/^ *[0-9]*\([0-9]\)[[:space:]]*/[\1] /; s/....###/###/; s/\[[27]/[1/; s/\[[38]/[2/; s/\[[49]/[3/; s/\[[50]/[4/' |
|---|
| 197 | |
|---|