Skip to content

HistColor

Moscowsky Anton edited this page Dec 3, 2020 · 3 revisions

Histogram Color

An attribute that allows you to identify an object by color using histogram filtering. The theory of histogram filtering can be viewed here and here.

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

1. Modes

1.1. Detect

Searches for connected regions of the specified color.

1.2. Check

Checks if the specified percentage of object pixels meet the specified parameters.

1.3. Extract

Not implemented

2. XML-description

2.1. Common parameters

  • Name (string, must be set) attribute unique name
  • Type (string, must be "HistColor") attribute type
  • Weight (double, default: 1) attribute weight
  • Probability (double, default: 0.75) acceptable detection accuracy, used in Check mode.
  • Contour (bool, default: true) Returns the contour of the attribute if true.

2.2. Special parameters

  • Histogram (must be provided) Path to .yaml file with histogram. If the path starts with '/', then it is considered global, if not, then local from the location of the object base.

2.3. Example

<AttributeLib>
    
    <Attribute Name="HistColorPink" Type="HistColor" Histogram="histograms/Pink.yaml"/>

</AttributeLib>

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

hist color example

As you can see, with color filtering, there may be small areas that match the color and the specified parameters. To filter them out, it is recommended to use size attribute on the image

2.4. Parameter extraction utilities

Clone this wiki locally