SizeAttribute - Extended-Object-Detection-ROS/wiki_english GitHub Wiki

Size

This attribute checks if the object meets the size parameters in the image.

Modes Accuracy assessment 3D-translation 3D-rotation Contour extraction Additional info
- C -

1. Modes

1.1. Detect

Not implemented

1.2. Check

Checks that the object's area is greater than (MinAreaPc * image area) and less than (MaxAreaPc * image area).

1.3. Extract

Not implemented

2. XML-description

2.1. Common parameters

  • Name (string, must be set) attribute unique name
  • Type (string, must be "Size") attribute type
  • Weight (double, default: 1) attribute weight
  • Probability (double, default: 0.75) not used for this aatibute
  • Contour (bool, default: true) not used for this aatibute

2.2. Special parameters

  • MinAreaPc (default: 0) The minimum threshold in percents for the ratio of object area to image area.
  • MaxAreaPc (default: 100) The maximum threshold in percents for the ratio of object area to image area.

2.3. Example

The example also contains a description of the color detection attribute, since the size attribute should be paired with attribute in the detection mode.

<AttributeLib>
    
    <Attribute Name="HistColorPink" Type="HistColor" Histogram="histograms/Pink.yaml"/>
    
    <Attribute Name="NotFractal" Type="Size" MinAreaPc="0.5" MaxAreaPc="100"/>

</AttributeLib>

<SimpleObjectBase>  
    
    <SimpleObject Name="PinkSticker" ID="2">              
        <Attribute Type="Detect">HistColorPink</Attribute>  
        <Attribute Type="Check">NotFractal</Attribute>
    </SimpleObject>  
    
</SimpleObjectBase>

size example

In the example of the histogram filtering attribute, you can see that without the size attribute, unwanted noises are present in the image.

⚠️ **GitHub.com Fallback** ⚠️