Color Filter
The Color Filter uses normalized RGB values to focus the attention towards certain colors.
Depending on the colors selected this filter will
diminish all pixels that are not of the selected colors. This function is
different than RGB filter in that multiple colors can be specified.
This module can be used to segment/highlight certain colors out from an image. This is important when you want to
segment the image to certain colors that contain objects that you want to focus on.
The module functions by determining the Euclidian distance from the current color to one of the specified colors.
The Euclidean distance is defined as
sqrt(((source_red-current_red)*(source_red-current_red))+((source_green-current_green)*(source_green-current_green))+((source_blue-current_blue)*(source_blue-current_blue)))
The resulting distance is then normalized with respect to the maximum distance value.
Due to RGB normalization [ R = R/(R+G+B), G = G/(R+G+B), etc. ] really dark pixels can be elevated in
intensity and generate too much noise in the resulting image. The Min Pixel
Value allows you to specify a minimum value below which pixels are considered
to be black and will be ignored when calculating the image results. Default
value is 40 (0-255).
You can use this filter to focus the image towards certain colors even with diminished lighting
conditions.
Interface
Instructions
1. Chose the desired way to add RGB values to the focus Added Colors.
Add Red - adds the RGB red value to the list
Add Blue - adds the RGB blue value to the list
Add Green - adds the RGB green value to the list
Add Grey - adds the RGB grey value to the list
Add Custom - you can select the RGB value from the color picker
Add Picker - adds the current RGB value selected from the color picker
Add Sample - adds the RGB values from the current image center
Add Variable - adds the RGB value specified in the selected RoboRealm variable
2. If you make a mistake you can delete a color by using 'Del All' or selecting the color and pressing 'Del'
3. Select the cutoff value that specified which values should be removed that are below a certain threshold
4. Select how the results should be represented
RGB Scale - resulting values are scaled RGB values from 0 to 255 that depend on how close the original color is to one in the Added Colors list
RGB Mask - resulting value is the color that is most similar to one in the Added Colors list
Grayscale - resulting value is how close the color is to a color in the Added Colors list but represented in grayscale values
White Mask - resulting match value is white, non-match is black
Black Mask - resulting match value is black, non-match is white
The color picker works by showing the color of the pixel the mouse is currently hovering over. When you click
the second square box is updated with that color. Selecting Add Picker will then add that value to the Added Colors list.
This functionality allows you to select any color on your desktop (except colors within the RGBFilter interface) to be
added to the Added Colors list.
Example
| Source Image | Color Filter on Purple |
 |  |
See Also
RGB Filter
RGB Channel
Threshold
Auto Threshold
|