#! /usr/bin/env python PACKAGE='image_proc_scale' NODE='scale_nodelet' CONFIG='Scale' import roslib; roslib.load_manifest(PACKAGE) from dynamic_reconfigure.parameter_generator import * gen = ParameterGenerator() # Decimation parameters gen.add("binning_x", int_t, 0, "Number of pixels to decimate to one horizontally", 1, 1, 16) gen.add("binning_y", int_t, 0, "Number of pixels to decimate to one vertically", 1, 1, 16) # ROI parameters # Maximums are arbitrary set to the resolution of a 5Mp Prosilica, since we can't set # the dynamically. gen.add("roi_offset_x", int_t, 0, "X offset of the region of interest", 0, 0, 2447) gen.add("roi_offset_y", int_t, 0, "Y offset of the region of interest", 0, 0, 2049) gen.add("roi_width", int_t, 0, "Width of the region of interest", 0, 0, 2448) gen.add("roi_height", int_t, 0, "Height of the region of interest", 0, 0, 2050) # Interpolation method methods = gen.enum([gen.const("INTER_NEAREST" , str_t, "nearest" , "nearest neighbor interpolation"), gen.const("INTER_LINEAR" , str_t, "linear" , "linear interpolation"), gen.const("INTER_AREA" , str_t, "area" , "resampling using pixel area relation"), gen.const("INTER_CUBIC" , str_t, "cubic" , "4x4 cubic intepolation"), gen.const("INTER_LANCZOS4", str_t, "lanczos4", "8x8 Lanczos interpolation") ], "Interpolation method.") gen.add("interpolation", str_t,0,"OpenCV interpolation method.", "linear", edit_method = methods) exit(gen.generate(PACKAGE, NODE, CONFIG))