#! /usr/bin/env python

PACKAGE='jsk_perception'

from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()

coef_enum = gen.enum([gen.const("correlancy", int_t, 0, "correlency"),
                      gen.const("chi_squared", int_t, 1, "chi squared"),
                      gen.const("intersect", int_t, 2, "intersect"),
                      gen.const("bhattacharyya", int_t, 3, "bhattacharyya"),
                      gen.const("EMD_Manhattan", int_t, 4, "EMD (Manhattan)"),
                      gen.const("EMD_Euclid", int_t, 5, "EMD (Euclid)")],
                      "method to compute coefficient between two histograms")
thr_enum = gen.enum([gen.const("smaller_than", int_t, 0, "smaller than coef_threshold"),
                     gen.const("greater_than", int_t, 1, "greater than coef_threshold"),
                     gen.const("otsu", int_t, 2, "Otsu method"),
                     gen.const("otsu_inv", int_t, 3, "Otsu method inversed")],
                     "method to compute threshold image")
gen.add("coefficient_method", int_t, 0, "method to compute coefficient between two histograms",
        0, 0, 5, edit_method = coef_enum)
gen.add("max_value", double_t, 0, "maximum value of histogram", 255, 0, 1000)
gen.add("min_value", double_t, 0, "minimum value of histogram", 0, 0, 1000)
gen.add("masked_coefficient", double_t, 0, "value for masked region", 0, 0, 1.0)
gen.add("threshold_method", int_t, 0, "method to compute threshold image", 0, 0, 3,
        edit_method = thr_enum)
gen.add("coef_threshold", double_t, 0, "threshold", 0.8, 0, 1.0)

exit(gen.generate(PACKAGE, "jsk_perception", "ColorHistogramLabelMatch"))
