MergingPolicySimpleObjects - Extended-Object-Detection-ROS/wiki_english GitHub Wiki
Let's remind that a Simple Object is a set of attributes, and software detectors correspond to attributes. These detectors work independently and return a different output, which, however, must be uniform within a single object. This applies to bounding rectangles, contours and positions in three-dimensional space. Bounding rectangles and contours can be merged in different ways. The most common options are intersection and union, so the corresponding policies have been added in the Simple Object description (the MergingPolicy parameter in the SimpleObject tag):
- Intersection Basic merge policy, used by default.
- Union
<SimpleObject Name="Aruco6Black" ID="42" MergingPolicy="Union">
<Attribute Type="Detect">Aruco6</Attribute>
<Attribute Type="Detect">HSVColorBlack</Attribute>
</SimpleObject>
The merge policy for rectangles is used in the IOU Matcher (see section 2).
- When two rectangles intersect, the third one is matched according to the standard scheme.
- When uniting two rectangles are matched the third, which is the minimum rectangle containing the original ones.
For contours, intersection and union in the classical sense are used. The current implementation uses the OpenCV functionality, which cannot be called fast. If you do not want to waste processor time on this, then disable the export of the contour for the attributes with the Contour = "false" parameter.
Also, some signs can give out the position of an object in space. In this implementation, the position is the average point of all available non-single positions. This is independent of the selected merge policy.