Image filtering based on color detection. The package uses OpenCV package to obtain precise coordinates of the predefined color and draw boxes over it to visualize the result.
This part describes various ROS-related interfaces such as parameters and topics.
-
~visualization: bool
If true, the node publish visualized images to
~visualization
topic. Default:true
-
~lower_color_boundary: int[]
Minimum value of color in RGB to be detected.
-
~upper_color_boundary: int[]
Maximum value of color in RGB to be detected.
-
~box_color: int[]
Color of the box to be drawn over the detected object.
-
~filtered_image: sensor_mgs/Image
Result of filtering (the image which contains a specified color)
-
~visualization: sensor_mgs/Image
Visualized result over an input image.
-
~input: sensor_msgs/Image
Input image to be proccessed
.
├── launch
│ └── filtering.launch
├── scripts
│ └── filter.py
├── CMakeLists.txt
├── LICENSE
├── package.xml
└── README.md
./launch
- *.yaml roslaunch files./scripts
- main folder of the project (contains executables)
The project uses following files
filtering.launch
- starting the filtering node
filter.py
- image filtering node (performance tweak)
CMakeLists.txt
- package building instructionspackage.xml
- data about the packagesetup.py
- rospy instructions
That's not good to try detecting objects on pictures that aren't containing any desired objects. For optimization purposes, there should be a filter. This filter would try to detect some objects based on colors of the desired object and send the image further if there any object you would like it to be.
To start the filtering you should change the parameters in launch/filtering.launch
and then run :
$ roslaunch agrotec_image_filtering filtering.launch