2 * Image Library -- Configuration
4 * (c) 2006 Pavel Charvat <pchar@ucw.cz>
11 #include "images/images.h"
12 #if defined(CONFIG_IMAGES_SIM) || defined(CONFIG_IMAGES_DUP)
13 #include "images/signature.h"
18 /* ImageLib section */
20 uns image_max_dim = 0xffff;
21 uns image_max_bytes = ~0U;
23 #if defined(CONFIG_IMAGES_SIM) || defined(CONFIG_IMAGES_DUP)
24 /* ImageSig section */
25 uns image_sig_min_width;
26 uns image_sig_min_height;
27 uns *image_sig_prequant_thresholds;
28 uns image_sig_postquant_min_steps;
29 uns image_sig_postquant_max_steps;
30 uns image_sig_postquant_threshold;
31 double image_sig_border_size;
32 int image_sig_border_bonus;
33 double image_sig_inertia_scale[3];
34 double image_sig_textured_threshold;
35 int image_sig_compare_method;
36 uns image_sig_cmp_features_weights[IMAGE_REG_F + IMAGE_REG_H];
39 static struct cf_section image_lib_config = {
41 CF_UNS("Trace", &image_trace),
42 CF_UNS("ImageMaxDim", &image_max_dim),
43 CF_UNS("ImageMaxBytes", &image_max_bytes),
48 #if defined(CONFIG_IMAGES_SIM) || defined(CONFIG_IMAGES_DUP)
49 static struct cf_section image_sig_config = {
51 CF_UNS("MinWidth", &image_sig_min_width),
52 CF_UNS("MinHeight", &image_sig_min_height),
53 CF_UNS_DYN("PreQuantThresholds", &image_sig_prequant_thresholds, CF_ANY_NUM),
54 CF_UNS("PostQuantMinSteps", &image_sig_postquant_min_steps),
55 CF_UNS("PostQuantMaxSteps", &image_sig_postquant_max_steps),
56 CF_UNS("PostQuantThreshold", &image_sig_postquant_threshold),
57 CF_DOUBLE("BorderSize", &image_sig_border_size),
58 CF_INT("BorderBonus", &image_sig_border_bonus),
59 CF_DOUBLE_ARY("InertiaScale", image_sig_inertia_scale, 3),
60 CF_DOUBLE("TexturedThreshold", &image_sig_textured_threshold),
61 CF_LOOKUP("CompareMethod", &image_sig_compare_method, ((byte *[]){"integrated", "fuzzy", "average", NULL})),
62 CF_UNS_ARY("CompareFeaturesWeights", image_sig_cmp_features_weights, IMAGE_REG_F + IMAGE_REG_H),
68 static void CONSTRUCTOR
69 images_init_config(void)
71 cf_declare_section("ImageLib", &image_lib_config, 0);
72 #if defined(CONFIG_IMAGES_SIM) || defined(CONFIG_IMAGES_DUP)
73 cf_declare_section("ImageSig", &image_sig_config, 0);