RGB Filter
The RGB Filter uses RGB values to focus the attention towards the primary RGB colors.
Depending on the color selected this filter will
diminish all pixels that are not of the selected colors. This function is
different than RGB Channel in that white pixels are also diminished even though
they may contain the color selected.
For example, if Red is chosen:
R = ((R-B)+(R-G))
G = 0
B = 0
R is then normalized with respect to the maximum red value.
Based on the above formula it can be seen that white pixels
result in a zero value whereas pure primary colors (R=255, G=0, B=0) R doubles
its value. Thus function does a better job than RGB Channel in filtering for a
particular color as white light is removed.
Due to normalization 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. Colors - Chose the desired color Red, Green, Blue, etc. by selecting the appropriate checkbox. Note that "Colors" refers to those pixels that have
strong colors in the image regardless of what color the pixel is (color saturation) while "Gray" refers to how close to a gray color pixels are. These
two selections can be used to diminish colors and pronounce gray areas ("Gray") or diminish white areas and pronounce colors ("Colors").
2. Threshold - Select the min intensity pixel value that specified which values should be removed that are below a certain threshold. This helps remove pixels
that are dark and do not contain enough color information. This is typically seen when detecting blue in dark areas.
3. Threshold - Select the hue threshold. This removes colors that are not 'blue' enough or not 'red' enough, etc.
4. Threshold - If needed select a hysteresis level. The hysteresis level will allow blobs that have
at least one pixel above the hue threshold to grow into the surrounding area as long as the hue level is above
the threshold minus the hysteresis level. Thus if the hue threshold is set to 80 and the hysteresis is set to 20 then
only blobs that have a pixel above 80 will be preserved and any that do will include all pixels with hue
above 60. This is useful to grow/connect a blob below the hue threshold while still preserving the filtering effects
of the hue level.
5. Results - 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 Colors list
RGB Mask - resulting value is the color that is most similar to one in the Color list
Grayscale - resulting value is how close the color is to a color in the 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
Fore Masked - resulting image shows original color where a match is made
Back Masked - resulting image shows original colors where a match was NOT made. This is useful in determining how
well your matched colors are working on the actual image.
Example
| Source Image | Green Filter with 10, 30 threshold |
 |  |
See Also
Color Filter
RGB Channel
Threshold
Auto Threshold
| RGB_Filter Related Forum Posts | Last post | Posts | Views |
color sorting
I'm working on a project that will sort red, green and yellow blocks with an Arduino controlled robotic arm. What would be the... |
2 months |
2 |
702 |
roborealm counting
hi..im new to roborealm..i want to use it to detect and count the number of balls of a particular color. so far i used the rgb f... |
3 months |
11 |
1277 |
Best practices for detecting small color blobs
I have 4 different colored blobs that I want to detect. I want to generate a log file showing when and how long the blobs were p... |
2 years |
2 |
679 |
Robot Tracking with LEDS
I am planning to make a project using RoboRealm that uses a static overhead camera to track the robot's position and angle. I h... |
2 years |
2 |
625 |
Tracking tennis balls
I'm trying to track tennis balls in a playing field shown in the attached figures. A robot will move around until the closest t... |
2 years |
4 |
990 |
6 object
Hi steven,
I have calculated the angle between 3 object previously. The objects were mov... |
2 years |
3 |
587 |
Weld seam detection
Dear Sir
I have an application for detection of welding seam with a laser line generator. The line is broken at th... |
3 years |
4 |
1106 |
Vision based PID Control
1) I am thinking about making soccer playing robots. The vision system gives me about 5.5 FPS due to the demanding c... |
3 years |
6 |
1367 |
Roborealm + Sabertooth 2x5 + DB9 - HOW?
Hello Guys!
I just recieved my Sabaertooth 2x5 today, unfortunately i've not been able to get it connected to my... |
3 years |
5 |
1269 |
MEAN_COLOR and AREA
I am trying to track two specific colors, red and green. I am using the RGB filter to filter all blue and leave just... |
3 years |
3 |
992 |
RGB filter
hi all!
i'm newbies in this field, i have see tutorial about tracking green ball, but i have something understand... |
3 years |
2 |
974 |
triangle direction
hi!
how can i find a triangle direction using RR?
... |
3 years |
5 |
1566 |
|