X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=images%2Fconfig.c;h=4494348b303f2b7e9532b91246d8246fb22cc017;hb=0bdd67d0699f51198d917be1ef64293e39f89199;hp=a268525e6c919adf75b6b24df83dd642103ff39a;hpb=487f19b958da5875f0c05e53d5c229874662735e;p=libucw.git diff --git a/images/config.c b/images/config.c index a268525e..4494348b 100644 --- a/images/config.c +++ b/images/config.c @@ -9,7 +9,9 @@ #include "lib/lib.h" #include "lib/conf.h" #include "images/images.h" +#if defined(CONFIG_IMAGES_SIM) || defined(CONFIG_IMAGES_DUP) #include "images/signature.h" +#endif #include @@ -18,6 +20,7 @@ uns image_trace; uns image_max_dim = 0xffff; uns image_max_bytes = ~0U; +#if defined(CONFIG_IMAGES_SIM) || defined(CONFIG_IMAGES_DUP) /* ImageSig section */ uns image_sig_min_width; uns image_sig_min_height; @@ -31,6 +34,7 @@ double image_sig_inertia_scale[3]; double image_sig_textured_threshold; int image_sig_compare_method; uns image_sig_cmp_features_weights[IMAGE_REG_F + IMAGE_REG_H]; +#endif static struct cf_section image_lib_config = { CF_ITEMS{ @@ -41,6 +45,7 @@ static struct cf_section image_lib_config = { } }; +#if defined(CONFIG_IMAGES_SIM) || defined(CONFIG_IMAGES_DUP) static struct cf_section image_sig_config = { CF_ITEMS{ CF_UNS("MinWidth", &image_sig_min_width), @@ -53,15 +58,18 @@ static struct cf_section image_sig_config = { CF_INT("BorderBonus", &image_sig_border_bonus), CF_DOUBLE_ARY("InertiaScale", image_sig_inertia_scale, 3), CF_DOUBLE("TexturedThreshold", &image_sig_textured_threshold), - CF_LOOKUP("CompareMethod", &image_sig_compare_method, ((byte *[]){"integrated", "fuzzy", "average", NULL})), + CF_LOOKUP("CompareMethod", &image_sig_compare_method, ((char *[]){"integrated", "fuzzy", "average", NULL})), CF_UNS_ARY("CompareFeaturesWeights", image_sig_cmp_features_weights, IMAGE_REG_F + IMAGE_REG_H), CF_END } }; +#endif static void CONSTRUCTOR images_init_config(void) { cf_declare_section("ImageLib", &image_lib_config, 0); +#if defined(CONFIG_IMAGES_SIM) || defined(CONFIG_IMAGES_DUP) cf_declare_section("ImageSig", &image_sig_config, 0); +#endif }