|
| 1 | +#! /usr/bin/env python |
| 2 | +# Software License Agreement (BSD License) |
| 3 | +# |
| 4 | +# Copyright (c) 2022, Kei Okada |
| 5 | +# All rights reserved. |
| 6 | +# |
| 7 | +# Redistribution and use in source and binary forms, with or without |
| 8 | +# modification, are permitted provided that the following conditions |
| 9 | +# are met: |
| 10 | +# |
| 11 | +# * Redistributions of source code must retain the above copyright |
| 12 | +# notice, this list of conditions and the following disclaimer. |
| 13 | +# * Redistributions in binary form must reproduce the above |
| 14 | +# copyright notice, this list of conditions and the following |
| 15 | +# disclaimer in the documentation and/or other materials provided |
| 16 | +# with the distribution. |
| 17 | +# * Neither the name of Kei Okada nor the names of its |
| 18 | +# contributors may be used to endorse or promote products derived |
| 19 | +# from this software without specific prior written permission. |
| 20 | +# |
| 21 | +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 22 | +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 23 | +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 24 | +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
| 25 | +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
| 26 | +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
| 27 | +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 28 | +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| 29 | +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 30 | +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN |
| 31 | +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 32 | +# POSSIBILITY OF SUCH DAMAGE. |
| 33 | + |
| 34 | + |
| 35 | +PACKAGE = "opencv_apps" |
| 36 | + |
| 37 | +from dynamic_reconfigure.parameter_generator_catkin import * |
| 38 | + |
| 39 | +gen = ParameterGenerator() |
| 40 | +gen.add("use_camera_info", bool_t, 0, "Indicates that the camera_info topic should be subscribed to to get the default input_frame_id. Otherwise the frame from the image message will be used.", False) |
| 41 | + |
| 42 | +histogram_comparison_type = gen.enum([ gen.const("Correlation", int_t, 0, "Correlation"), |
| 43 | + gen.const("Chi_Square", int_t, 1, "Chi-Square"), |
| 44 | + gen.const("Intersection", int_t, 2, "Intersection"), |
| 45 | + gen.const("Bhattacharyya", int_t, 3, "Bhattacharyya distance")], |
| 46 | + "Histogram Comparison method") |
| 47 | +gen.add("histogram_comparison_type", int_t, 1, "Histogram Comparison method", 0, 0, 3, edit_method=histogram_comparison_type) |
| 48 | + |
| 49 | +gen.add("histogram_size", int_t, 2, "Array of histogram sizes in each dimension", 256, 1, 1024) |
| 50 | +gen.add("uniform", bool_t, 3, "Flag indicating whether the histogram is uniform or not", True) |
| 51 | +gen.add("accumulate", bool_t, 4, "Accumulation flag. If it is set, the histogram is not cleared in the beginning when it is allocated", False) |
| 52 | + |
| 53 | +exit(gen.generate(PACKAGE, "compare_histogram", "CompareHistogram")) |
0 commit comments