<launch>
  <arg name="gui" default="true" />
  <node name="play_face_bag" pkg="rosbag" type="play" args="-l $(find opencv_apps)/test/face_detector_withface_test_diamondback.bag" />

  <group ns="wide_stereo/left" >
    <node name="image_proc" pkg="image_proc" type="image_proc" />
    <node name="image_view" pkg="image_view" type="image_view" args="image:=image_rect_color" if="$(arg gui)" />

    <!-- general_contours.cpp -->
    <include file="$(find opencv_apps)/launch/general_contours.launch" >
      <arg name="debug_view" value="$(arg gui)" />
      <arg name="image" value="image_rect" />
      <arg name="threshold" value="30" />
    </include>

    <!-- Test Codes -->
    <node name="general_contours_saver" pkg="image_view" type="image_saver" args="image:=general_contours/image" >
      <param name="filename_format" value="$(find opencv_apps)/test/general_contours.png"/>
    </node>
    <param name="general_contours_rectangles_test/topic" value="general_contours/rectangles" />    <!-- opencv_apps/RotatedRectArrayStamped -->
    <test test-name="general_contours_rectangles_test" pkg="rostest" type="hztest" name="general_contours_rectangles_test" >
      <param name="hz" value="20" />
      <param name="hzerror" value="15" />
      <param name="test_duration" value="5.0" /> 
    </test>
    <param name="general_contours_test_ellipses/topic" value="general_contours/ellipses" />    <!-- opencv_apps/RotatedRectArrayStamped -->
    <test test-name="general_contours_ellipses_test" pkg="rostest" type="hztest" name="general_contours_test_ellipses" >
      <param name="hz" value="20" />
      <param name="hzerror" value="15" />
      <param name="test_duration" value="5.0" /> 
    </test>
  </group>
</launch>
