<launch>
  <node pkg="uvc_camera" type="uvc_camera_node" name="camera" />
  <node pkg="image_view2" type="image_view2" name="image_view2">
    <remap from="image" to="image_raw" />
  </node>
  <node pkg="jsk_perception" type="slic_super_pixels" name="super_pixels"
        respawn="true">
    <remap from="image" to="image_raw"/>
  </node>
  <node pkg="image_view" type="image_view" name="super_pixels_view">
    <remap from="image" to="super_pixels/debug" />
  </node>
  <node pkg="jsk_perception" type="hsv_decomposer" name="hsv_decomposer">
    <remap from="~input" to="image_raw" />
  </node>
  <node pkg="jsk_perception" type="rect_to_mask_image" name="rect_to_mask_image">
    <remap from="~input" to="image_raw/screenrectangle" />
    <remap from="~input/camera_info" to="camera_info" />
  </node>
  <node pkg="jsk_perception" type="single_channel_histogram" name="reference_hue_histogram">
    <rosparam>
      use_mask: true
      hist_size: 100
    </rosparam>
    <remap from="~input" to="hsv_decomposer/output/hue" />
    <remap from="~input/mask" to="rect_to_mask_image/output" />
  </node>
  <node pkg="image_view" type="image_view" name="mask_view">
    <remap from="image" to="rect_to_mask_image/output" />
  </node>
  <node pkg="jsk_perception" type="color_histogram_label_match" name="color_histogram_label_match">
    <remap from="~input" to="hsv_decomposer/output/hue" />
    <remap from="~input/label" to="super_pixels/output" />
    <remap from="~input/mask" to="rect_to_mask_image/output"/>
    <remap from="~input/histogram" to="reference_hue_histogram/output" />
    <rosparam>
      use_mask: false
      threshold_method: 2
    </rosparam>
  </node>
  <node pkg="image_view" type="image_view" name="coef_view">
    <remap from="image" to="color_histogram_label_match/output/coefficient_image" />
  </node>
  <node pkg="image_view" type="image_view" name="region_view">
    <remap from="image" to="color_histogram_label_match/output/extracted_region" />
  </node>
</launch>
