-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[smoothing_filter] Add sample and test
- Loading branch information
Showing
2 changed files
with
98 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<launch> | ||
<arg name="gui" default="true" /> | ||
<arg name="image" default="image" doc="The image topic. Should be remapped to the name of the real image topic." /> | ||
|
||
<!-- smoothing.cpp --> | ||
<node name="normalized_block_filter" pkg="opencv_apps" type="normalized_block_filter" > | ||
<remap from="image" to="$(arg image)" /> | ||
</node> | ||
|
||
<node name="bilateral_filter" pkg="opencv_apps" type="bilateral_filter" > | ||
<remap from="image" to="$(arg image)" /> | ||
</node> | ||
|
||
<node name="gaussian_filter" pkg="opencv_apps" type="gaussian_filter" > | ||
<remap from="image" to="$(arg image)" /> | ||
</node> | ||
|
||
<node name="median_filter" pkg="opencv_apps" type="median_filter" > | ||
<remap from="image" to="$(arg image)" /> | ||
</node> | ||
|
||
<group if="$(arg gui)"> | ||
<node name="image_view0" | ||
pkg="image_view" type="image_view"> | ||
<remap from="image" to="image_rect_color" /> | ||
</node> | ||
<node name="image_view1" | ||
pkg="image_view" type="image_view"> | ||
<remap from="image" to="normalized_block_filter/image" /> | ||
</node> | ||
<node name="image_view2" | ||
pkg="image_view" type="image_view"> | ||
<remap from="image" to="bilateral_filter/image" /> | ||
</node> | ||
<node name="image_view3" | ||
pkg="image_view" type="image_view"> | ||
<remap from="image" to="gaussian_filter/image" /> | ||
</node> | ||
<node name="image_view4" | ||
pkg="image_view" type="image_view"> | ||
<remap from="image" to="median_filter/image" /> | ||
</node> | ||
</group> | ||
|
||
</launch> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<launch> | ||
<arg name="gui" default="false" /> | ||
<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)" /> | ||
|
||
<!-- smoothing.cpp --> | ||
<include file="$(find opencv_apps)/launch/smoothing_filter.launch" > | ||
<arg name="image" value="image_rect_color" /> | ||
<arg name="gui" value="$(arg gui)" /> | ||
</include> | ||
|
||
<!-- Test Codes --> | ||
<node name="normalized_block_filter_saver_result" pkg="image_view" type="image_saver" args="image:=normalized_block_filter/image" > | ||
<param name="filename_format" value="$(find opencv_apps)/test/normalized_block_filter_result.png"/> | ||
</node> | ||
<node name="bilateral_filter_saver_result" pkg="image_view" type="image_saver" args="image:=bilateral_filter/image" > | ||
<param name="filename_format" value="$(find opencv_apps)/test/bilateral_filter_result.png"/> | ||
</node> | ||
<node name="gaussian_filter_saver_result" pkg="image_view" type="image_saver" args="image:=gaussian_filter/image" > | ||
<param name="filename_format" value="$(find opencv_apps)/test/gaussian_filter_result.png"/> | ||
</node> | ||
<node name="median_filter_saver_result" pkg="image_view" type="image_saver" args="image:=median_filter/image" > | ||
<param name="filename_format" value="$(find opencv_apps)/test/median_filter_result.png"/> | ||
</node> | ||
<param name="normalized_block_filter_test/topic" value="normalized_block_filter/image" /> | ||
<test test-name="normalized_block_filter_test" pkg="rostest" type="hztest" name="normalized_block_filter_test" > | ||
<param name="hz" value="20" /> | ||
<param name="hzerror" value="15" /> | ||
<param name="test_duration" value="5.0" /> | ||
</test> | ||
<param name="bilateral_filter_test/topic" value="bilateral_filter/image" /> | ||
<test test-name="bilateral_filter_test" pkg="rostest" type="hztest" name="bilateral_filter_test" > | ||
<param name="hz" value="20" /> | ||
<param name="hzerror" value="15" /> | ||
<param name="test_duration" value="5.0" /> | ||
</test> | ||
<param name="gaussian_filter_test/topic" value="gaussian_filter/image" /> | ||
<test test-name="gaussian_filter_test" pkg="rostest" type="hztest" name="gaussian_filter_test" > | ||
<param name="hz" value="20" /> | ||
<param name="hzerror" value="15" /> | ||
<param name="test_duration" value="5.0" /> | ||
</test> | ||
<param name="median_filter_test/topic" value="median_filter/image" /> | ||
<test test-name="median_filter_test" pkg="rostest" type="hztest" name="median_filter_test" > | ||
<param name="hz" value="20" /> | ||
<param name="hzerror" value="15" /> | ||
<param name="test_duration" value="5.0" /> | ||
</test> | ||
</group> | ||
</launch> |