Blob Colorize
The Blob Colorize module provides a way to recolorize blobs (segmented objects) based on another image (normally the source pixel data). This is required when you have processed an image into separated blobs but need to recombine the blobs with their original color information that was lost during processing.The Blob Colorize will use a source pixel image and replace each non-black object with the various colors drawn from the source image. This is functionally similar to using the blobs as masks into the source pixel image and summing the resulting pixels to form the new color.
Interface
Instructions
1. Source - Select which image represents the source pre-processed RGB pixel image of the current image.
2. Color - Select which color statistic to gather based on the source image that will be the new color of the respective blob. When 'nearest' is selected the bottom part of the GUI interface will be enabled.
3. Label - specify the name of the color (as will be used in the variable array) such that you can easily identify a color based on a name as apposed to an RGB triplet.
4. Add X - add in colors as needed in order to create a list of colors that will be matched against. For each detected blob in the image the color those most closely matches that blobs color will become that blobs color. This allows an almost white or almost red blob to become pure white or pure red assuming that you have both white and red as "Nearest Colors".
5. Match Threshold - specify how closely a color should match one of the "Nearest Colors" to be replaced with that color.
6. Summary Weight - enabled when Summation is selected. A weighting factor that is multiplied on each pixel prior to the final intensity being capped.
Example
Source | Blob Colorize |
The above demonstrates the blob colorizing routine after thresholding the image for high intensity, dilating by 2 and then using the blob colorizing module to recolor the resulting white blobs.
This technique is very handy for laser light detection. The issue with laser lights is that while we see them as red (or green) but the camera sees them as white light surrounded by a red halo due to the color range limitation of CCDs. In order to detect "red" spots we need to first detect likely laser spots, expand the blob and then test for color. The following shows two laser lights from the SRV-1 robot and the final step of the detected two laser lights with the X coordinate of the blobs (this can be used for distance sensing). Download the robofile that accomplishes this.
Source | Laser Detected |
Variables
BLOB_COLORIZE_LABELS - contains an array of matched color information for each blob. The array contains blocks of 6 values per colorized blob. The elements are as follows: Offset Contents 0 x coordinate of the center of gravity of the blob 1 y coordinate of the center of gravity of the blob 2 hex formatted color information or label (when nearest color used) 3 Red color value 4 Blue color value 5 Green color value For example, to look for red colored blobs you could now use labels = GetArrayVariable("BLOB_COLORIZE_LABELS") for i = 0 to ubound(labels)-1 step 6 if labels(i+3) = "255" and labels(i+4) = "0" and labels(i+5) = "0" then write "Found a red blob" & vbCRLF end if next
See Also
Colorize
New Post |
Blob_Colorize Related Forum Posts | Last post | Posts | Views |
Track 5 Bots
I’d like to start a thread here to get some assistance on using RoboRealm for a specific project. Here is what I’m trying to... |
7 year | 2 | 2015 |
Bug Blob_Colorize
Hello, I have a problem with the Blob_Colorize module. Every time when I start RoboRe... |
8 year | 7 | 2379 |
Bug
Hello, I have a problem with the Blob_Colorize module. Every time when I start RoboRe... |
8 year | 1 | 1664 |
document processing
I have a document and need to read out the corssed rectangles. How can i do that?... |
10 year | 4 | 2563 |
blob detection
hi, i want to play game on samsung tab using roborealm. for that i need to detect the given game-blocks from camera. attached ar... |
10 year | 2 | 2744 |
Blob reduction
Hi STeven In the image I attached, each blob is represented by at least 3 shades of grey (meaning t... |
11 year | 3 | 2584 |
help!!!!!
work with 3 different colors with variables... |
11 year | 5 | 2851 |
action_shot_scantron
Its a bit complicated, it involves analysing an image and finding out where there are some marks. I need to automatically open t... |
11 year | 2 | 2870 |
Measuring Depth
Hi, I'm currently working with roborealm to measure some objects in a picture. I want to measure t... |
13 year | 7 | 4849 |