Skip to content

HSVColor

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

HSV Color

This feature allows you to set the color characteristics of an object by setting thresholds in the HSV space (hue-saturation-brightness).

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

1. Modes

1.1. Detect

Defines areas in the image that meet the specified parameters.

1.2. Check

It is checked if the given area meets the specified color parameters. For determination, the Probability parameter is used - such a percentage of all pixels of the object must meet the thresholds.

1.3. Extract

Not implemented

2. XML-description

2.1. Common parameters

  • Name (string, must be set) attribute unique name
  • Type (string, must be "HSVColor") 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

  • Hmin (default: 0) lower threshold of hue parameter [0-180].
  • Hmax (default: 0) upper threshold of hue parameter [0-180].
  • Smin (default: 0) lower threshold of saturation parameter [0-255].
  • Smax (default: 0) upper threshold of saturation parameter [0-255].
  • Vmin (default: 0) lower threshold of value parameter [0-255].
  • Vmax (default: 0) upper threshold of value parameter [0-255].

2.3. Example

<AttributeLib>
    
    <Attribute Name="HSVColorBrightYellow" Type="HSVColor" Hmin="35" Hmax="103" Smin="104" Smax="255" Vmin="0" Vmax="255"/>
  
</AttributeLib>

<SimpleObjectBase>  
      
    <SimpleObject Name="YellowSticer" ID="1">              
        <Attribute Type="Detect">HSVColorBrightYellow</Attribute>            
    </SimpleObject>  
    
</SimpleObjectBase>

hsv color example

2.4. Parameter extraction utilities

To obtain color parameters from a real object, it is recommended to use the utility hsv_color_params_collector.

Clone this wiki locally