EN
106
Software Module
11.8. Module Threshold HSV
11.8.1. Overview
Objective
Teach in certain colors and differentiate them from other colors.
Prerequisites
1. Sensor is correctly connected (see section 5.5)
2. Connection has been established from the sensor to the software (see section
10.1.1)
3. The camera is configured / images are selected (see section 11.2)
4. If applicable, tracking is configured (see sections 11.3 and 11.4)
5. Region of interest is specified (see section 11.5)
6. If applicable, a filter is activated (see section 11.6)
Procedure
A binary black and white image must be generated in order to be able to process
objects. The objective is to separate the foreground from the background. Suitable pa-
rameter values are selected for the respective application to this end (hue, saturation
and brightness). In order to make best possible use of options offered by the filters, a
brief overview of the HSV color space is provided in the following.
A color is broken down into three channels in HSV color space.
H (hue)
S (saturation)
V (brightness value)
Hue H can have a value within a range of 0° to 360°, and is generally depicted as a
circle. All colors are represented within the circle. Red is at 0°, green is at 120° and
blue is at 240°. All of the various hues lie between these points. Black and white are not
included as hues. They are achieved by means of saturation and brightness. The circle
is divided into steps of 0 to 255 for the Vision Sensor.
Saturation S is the luminosity of a given color. If saturation is set to its maximum value,
a pure color appears. If saturation is set to its minimum value, a gray-scale value ap-
pears which is dependent upon the current brightness value (V). All colors between
gray and the pure color can be found between these minimum and maximum values.
Brightness value V is the brightness of a color ranging from black to maximum bright-
ness. Attainable maximum brightness is dependent upon saturation.
A color with a brightness value of 0 appears black regardless of H and S. A color with
a maximum brightness value appears as the brightest variant of the respective H-S
combination, regardless of its H and S values.
Example:
H=0 (red)
S=255
V=128
H=0 (red)
S=255
V=255
H=170 (blue)
S=0
V=128
H=85(green)
S=255
V=255