forked from tTh/FloatImg
zzzz.....
This commit is contained in:
parent
24a8ff2dd7
commit
e81055756e
@ -2,7 +2,7 @@
|
||||
# building the base library
|
||||
#
|
||||
|
||||
COPT = -Wall -fpic -g -no-pie -DDEBUG_LEVEL=0
|
||||
COPT = -Wall -fpic -g -no-pie -DDEBUG_LEVEL=1
|
||||
OBJS = fimg-core.o fimg-pnm.o fimg-file.o fimg-math.o \
|
||||
fimg-timers.o operators.o fimg-2gray.o \
|
||||
interpolate.o fimg-compare.o contrast.o
|
||||
|
19
lib/runme.sh
Executable file
19
lib/runme.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
make t && ./t
|
||||
|
||||
for picz in src power2 squareroot
|
||||
do
|
||||
|
||||
../tools/fimgstats -v ${picz}.fimg
|
||||
../tools/fimg2pnm -v ${picz}.fimg ${picz}.pnm
|
||||
|
||||
convert -pointsize 36 \
|
||||
-fill white -annotate +10+28 "${picz}" \
|
||||
-fill black -annotate +12+30 "${picz}" \
|
||||
${picz}.pnm ${picz}.png
|
||||
|
||||
done
|
||||
|
||||
convert -delay 50 *.png foo.gif
|
||||
|
19
lib/t.c
19
lib/t.c
@ -71,20 +71,27 @@ return 0;
|
||||
int essai_contraste(char *fname)
|
||||
{
|
||||
int foo;
|
||||
FloatImg dessin;
|
||||
FloatImg dessin, copy;
|
||||
double maxi;
|
||||
|
||||
foo = fimg_create_from_dump(fname, &dessin);
|
||||
|
||||
maxi = (double)fimg_get_maxvalue(&dessin);
|
||||
fprintf(stderr, "avant valeur maxi = %f\n", maxi);
|
||||
foo = fimg_clone(&dessin, ©, 0);
|
||||
|
||||
fimg_power_2(&dessin, NULL, maxi);
|
||||
|
||||
maxi = (double)fimg_get_maxvalue(&dessin);
|
||||
fprintf(stderr, "apres valeur maxi = %f\n", maxi);
|
||||
fprintf(stderr, "avant power_2 valeur maxi = %f\n", maxi);
|
||||
|
||||
fimg_power_2(&dessin, ©, maxi);
|
||||
maxi = (double)fimg_get_maxvalue(&dessin);
|
||||
fprintf(stderr, "apres power_2 valeur maxi = %f\n", maxi);
|
||||
fimg_dump_to_file(©, "power2.fimg", 0);
|
||||
|
||||
fimg_square_root(&dessin, ©, maxi);
|
||||
maxi = (double)fimg_get_maxvalue(&dessin);
|
||||
fprintf(stderr, "apres square_root valeur maxi = %f\n", maxi);
|
||||
fimg_dump_to_file(©, "squareroot.fimg", 0);
|
||||
|
||||
fimg_dump_to_file(&dessin, "dst.fimg", 0);
|
||||
|
||||
fimg_destroy(&dessin);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user