This commit is contained in:
2020-07-02 16:55:45 +02:00
parent a81d218fc8
commit ed864ea45a
2 changed files with 29 additions and 3 deletions

View File

@@ -307,6 +307,20 @@ printf("%-10s %d\n\n", fname, foo);
return 0;
}
/* --------------------------------------------------------------------- */
int essai_mire(char *outname, int notused)
{
FloatImg fimg;
int re;
fimg_create(&fimg, 1280, 960, FIMG_TYPE_RGB);
re = fimg_test_pattern(&fimg, 9, 1.0);
fimg_save_as_pnm(&fimg, "mire.pnm", 0);
return -1;
}
/* --------------------------------------------------------------------- */
int essai_rampes(void)
{
FloatImg fimg;
@@ -351,7 +365,7 @@ fprintf(stderr, "save as png -> %d\n", foo);
return 0;
}
/* --------------------------------------------------------------------- */
enum nCmd { Equalize=1, Rotate, Sfx0, F3x3 };
enum nCmd { Equalize=1, Rotate, Sfx0, F3x3, MIRE };
typedef struct {
char *name;
int Cmd;
@@ -362,6 +376,7 @@ Command commands[] = {
{ "rotate", Rotate },
{ "sfx0", Sfx0 },
{ "f3x3", F3x3 },
{ "mire", MIRE },
{ NULL, 0 }
} ;
@@ -383,7 +398,7 @@ void help(int k)
{
Command *pcmd;
fprintf(stderr, "usage:\n\t./t command in-filename\n");
fprintf(stderr, "usage:\n\t./t command filename\n");
fprintf(stderr, "commands:\n");
pcmd = commands;
@@ -440,6 +455,9 @@ switch(opt) {
case F3x3:
foo = essai_filtrage_3x3(filename); break;
case MIRE:
foo = essai_mire(filename, 0);
break;
default:
fprintf(stderr, "%s : bad command\n", command);