Color Tracking
This module Tracks objects based on their color.
The average position of all points similar to a target color determine the x- and y-values. And the number of points (= size and distance) is used as the z-value.
Ports:
Per registered color there are the following output ports:
The average x-position of all pixels that fall into the selected color range.
Range: 0.0 to 1.0
The average y-position of all pixels that fall into the selected color range.
Range: 0.0 to 1.0
The number of pixels in the selected color range relative to all pixels on the camera image. Or in other words the size of the tracked color object on the camera image.
The size is not linear, the curve is adjusted so that it can be used (more or less) as the distance of the object.
Range: 0.0 to 1.0
Settings:
Colors: Tap on the plus sign to register a new color. Then tap the new button to enter the settings for that color.
Name: The name of the registered color range (used to identify it in the ports).
Color Picker: A button that starts the color picker. In the color picker you can hold an object with a specific color in front of the camera, tap on "Capture color" to capture that color and you can change the threshold. The pixels that belong to the color range are shown in red, so this is a good way to test how well the color detection works, and adjust it when necessary.
Color: Here you can change the color (Note: Changing the color in the color picker is probably more useful).
Threshold: How different to the selected color can the color of a pixel be to still be in the color range? (Note: If you change the threshold in the Color Picker instead, you can see the effect immediately).