#! /usr/bin/env python

PACKAGE='jsk_perception'

from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()

interp_enum = gen.enum([
    gen.const("INTER_NEAREST", int_t, 0, "a nearest-neighbor interpolation"),
    gen.const("INTER_LINEAR", int_t, 1, "a bilinear interpolation"),
    gen.const("INTER_AREA", int_t, 2, "resampling using pixel area relation. It may be a preferred method for image decimation, as it gives moire-free results. But when the image is zoomed, it is similar to the INTER_NEAREST method."),
    gen.const("INTER_CUBIC", int_t, 3, "a bicubic interpolation over 4x4 pixel neighborhood"),
    gen.const("INTER_LANCZOS4", int_t, 4, "a Lanczos interpolation over 8x8 pixel neighborhood")], "interpolation")


#       name    type     level     description     default      min      max
gen.add("approximate_sync", bool_t, 0, "Enable Approximate Sync", False)
gen.add("queue_size", int_t, 0, "Queue size for message synchronization", 100, 1, 1000)

gen.add('language', str_t, 0, 'OCR target language', 'eng')
gen.add("number_of_jobs", int_t, 0, "Number of jobs for ocr", -1, -1, 128)
gen.add("font_path", str_t, 0, "Font path", "")
gen.add("font_size", int_t, 0, "Font size for visualization", 16, 1, 128)
gen.add("box_thickness", int_t, 0, "Thickness of bounding box.", 2, 1, 64)

gen.add("resolution_factor", double_t, 0, "Factor for resolution", 1.0, 0.5, 5.0)
gen.add("interpolation_method", int_t, 0, "Interpolation method", 4, edit_method=interp_enum)

gen.add("subscribe_polygon", bool_t, 0, "Subscribe polygon", False)

exit(gen.generate(PACKAGE, PACKAGE, "OCR"))
