Skip to content

DimensionAttribute

MoscowskyAnton edited this page Dec 16, 2020 · 5 revisions

Dimension

Indicator for checking the aspect ratio of the object.

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

1. Modes

1.1. Detect

Not implemeted

1.2. Check

Check if the ratio of the width and height of the object belongs to the range minRatio ~ maxRatio.

1.3. Extract

Not implemeted

2. XML-description

2.1. Common parameters

  • Name (string, must be set) attribute unique name
  • Type (string, must be "Dimension") attribute type
  • Weight (double, default: 1) attribute weight
  • Probability (double, default: 0.75) not used in that attibute
  • Contour (bool, default: true) not used in that attibute

2.2. Special parameters

  • minRatio (double, default: 1.0) lower threshold of the width-to-height ratio
  • maxRatio (double, default: 1.0) upper threshold of width-to-height ratio

2.3. Example

Below is an example of using this feature together with a color feature. Note that the detection is performed in a soft mode, which allows you to identify the second object as well, but with a confidence factor of 0.5.

<AttributeLib>
    
    <Attribute Name="HistColorBrightYellow" Type="HistColor" Histogram="histograms/BrightYellow.yaml"/>    
    
    <Attribute Name="Square" Type="Dimension" minRatio="0.9" maxRatio="1.1"/>

</AttributeLib>

<SimpleObjectBase>  
    
    <SimpleObject Name="YellowStickerSquared" ID="3" Mode="Soft" Probability="0.5">              
        <Attribute Type="Detect">HistColorBrightYellow</Attribute>
        <Attribute Type="Check">Square</Attribute>            
    </SimpleObject>  

</SimpleObjectBase>

dimention example

Clone this wiki locally