forked from tTh/FloatImg
classif trial in fimgfx
This commit is contained in:
@@ -22,6 +22,7 @@ typedef struct {
|
||||
|
||||
enum fxid { Fx_cos01=5, Fx_cos010, Fx_pow2, Fx_sqrt, Fx_gray0, Fx_halfsz0,
|
||||
Fx_rot90, Fx_cmixa, Fx_desat, Fx_ctr2x2, Fx_norm,
|
||||
Fx_classtrial,
|
||||
Fx_xper, Fx_binarize, Fx_trinarize,Fx_hilight_R };
|
||||
|
||||
Fx fx_list[] = {
|
||||
@@ -37,6 +38,7 @@ Fx fx_list[] = {
|
||||
{ "desat", Fx_desat, 0, 1 },
|
||||
{ "ctr2x2", Fx_ctr2x2, 0, 1 },
|
||||
{ "norm", Fx_norm, 0, 1 },
|
||||
{ "classtrial", Fx_classtrial, 0, 1 },
|
||||
{ "binarize", Fx_binarize, 0, 1 },
|
||||
{ "trinarize", Fx_trinarize, 0, 1 },
|
||||
{ "hilightr", Fx_hilight_R, 0, 1 },
|
||||
@@ -149,6 +151,7 @@ if (fx_list[fxidx].flags & 1) {
|
||||
else {
|
||||
fprintf(stderr, "%s: ???\n", __func__); /* XXX */
|
||||
memset(&dest, 0, sizeof(dest));
|
||||
return -888;
|
||||
}
|
||||
|
||||
action = fx_list[fxidx].id;
|
||||
@@ -182,6 +185,12 @@ switch (action) {
|
||||
fprintf(stderr, "see 'fimghalfsize.c'. \n");
|
||||
return -3;
|
||||
|
||||
case Fx_classtrial:
|
||||
fprintf(stderr, "classif trial with %f fvalue\n",
|
||||
global_fvalue);
|
||||
foo = fimg_classif_trial(&src, &dest, global_fvalue, 0);
|
||||
break;
|
||||
|
||||
case Fx_desat:
|
||||
fimg_copy_data(&src, &dest);
|
||||
foo = fimg_mix_rgb_gray(&dest, global_fvalue);
|
||||
|
||||
Reference in New Issue
Block a user