Screenshots     Download     Purchase     Documentation     Tutorials     Resources     Contact     Forum     Search  

 

Blob Filter

The blob filter module (also known as Particle Filter or Analysis) provides a way to identify a particular blob based on features that describe aspects of the blob itself and in relation to other blobs. The purpose of the blob filter is to provide enough feature descriptions of the desired blob to ensure that the identification of a particular blob is reliable and dependable despite a noisy background.

The blob filter must be used after a blob segmentation module like the RGB Filter, Segment Colors, Flood Fill, Threshold, etc. modules that will group pixels in some meaningful way into blobs of a single color with black pixels being the background. The module you will use to perform this segmentation will depend on your particular project task. Once the image has been grouped into blobs this Blob Filter module is then used to remove or filter those blobs remaining in the image that are not wanted. For example, if you have an image that was detected for the red color using the RGB Filter module and the image included a red or orange cone the blob filter can be used to remove all blobs that are too small and not triangular shaped in the image. Thus any red dirt or tree bark while present after the red color detection would be removed by using the blob filter as they would fail a triangular shape test (assuming this is one of the attributes filtered on).

Once you have your image segmented into various blobs you then add in each blob attribute seen below and specify a weight threshold or count threshold to remove those unwanted blobs. Keep in mind that you can add multiple attributes one after the other that will remove blobs along the way in order to finish with the final desired blob. Look for attributes that create a wide distinction between your desired blob and other unwanted blobs (see the Show Weights checkbox to see all weights given the current attribute). Using the checkbox "Create Blob Array" will create the final BLOBS array variable that will contain the COG (center of gravity) of the blobs left after the filtering process. This variable can then be used to react to the presence of a particular object.

Interface

Instructions

1. Name - Name this blob filter for easy identification

2. Select the appropriate feature(s) and insert into the feature list

3. Select Top - Specify how many blobs should result after the filter (i.e. threshold blob count)

4. Select Above Weight - Specify the minimum weight of resulting blobs (i.e. threshold blob weight)

5. Create array variable - If you would like to get an array that shows how relevant the blob is to the current filter selection select this checkbox. A variable array will be created for each blob that indicates what weight that blob has towards the current filter criteria.

6. Invert Selection- If you want to invert the selection (i.e. reverse the current selections) click on the invert selections. Thus if you had 1 big blob selected the invert will change that list to be all the blobs minus the one big blob.

7. Blob Display - Adjust how the resulting blobs should be colored/identified.

8. Show Weights - Click Show Weights to indicate each blob's final weight

9. If you would like to create an array that contains the resulting center coordinates of all detected blobs (for use in VBScript module) select the "Create BLOBS variable array".

Blob Features

Note that for many comparisons the objects COG defines the point at which comparisons are made.

DescriptionSource ImageFiltered Image
RGB Closest to #FF0000 - Blob with color closest to specified color gets highest weight
Brightest - Blob with highest intensity gets highest weight
Darkest - Blob with lowest intensity gets highest weight
Brighter Than (150) - Blobs with lower intensity than that specified are removed
Darker Than (150) - Blobs with higher intensity than that specified are removed
Nearest - Blobs nearest to each other get high weights. You can also enter in (x,y) coordinates and variables using [] notation.
Nearer Than - Blobs nearer to other blobs by a specified amount are kept, others are removed.
Furthest - Blobs furthest from each other i.e. most isolated will get higher weights. You can also enter in (x,y) coordinates and variables using [] notation.
Further Than - Blobs further than a specified amount from other blobs are kept, blobs too close are removed.
COG Nearer Than - Blobs with COG's nearer to other blob COG's by a specified amount are kept, others are removed.
COG Further Than - Blobs with COG's further than a specified amount from another blob's COG are kept, blobs with close COGs are removed.
Most Neighbors - Blobs with many close neighboring blobs will get higher weights
Least Neighbors - Blobs with no close neighbors will get higher weights
Center - Blobs closest to the center of screen get higher weights
Horizontal Center - Blobs closest to the horizontal center only of screen get higher weights
Vertical Center - Blobs closest to the vertical center only of screen get higher weights
Outward - Blobs furthest from center (closest to screen border) get higher weights
Top - Blobs closest to the top of screen get higher weights
Bottom - Blobs closest to the bottom of the screen get higher weights
Left - Blobs closest to the left of the screen get higher weights
Right - Blobs closest to the right of the screen get higher weights
Above - Blobs above their closest neighbor get higher weights
Below - Blobs below their closest neighbor get higher weights
LeftOf - Blobs to the left of their closest neighbor get higher weights
RightOf - Blobs to the right of their closest neighbor get higher weights
AboveY (50) - Blobs above the specified Y coordinate are kept, those below are removed
BelowY (50) - Blobs below the specified Y coordinate are kept, those above are removed
LeftOfX (80) - Blobs left of the specified X coordinate are kept, those right of X are removed
RightOfX (80) - Blobs right of the specified X coordinate are kept, those to the left are removed
Between - Blobs between close neighboring blobs get higher weights
Within (top 3) - Blobs located within other blobs get higher weights
Around (top 3) - Blobs surrounding other blob get higher weights
Inner - Only blobs located within other blobs are kept
Outer - Only blobs surrounding other blobs are kept
Touches Border - Only blobs that touch the image border are kept
Avoids Border - Only blobs that do not touch (but avoid) the image border are kept. I.e. objects completely contained within the current image.
Simiar To - Blobs closest to specified size have higher weights
Smallest (above 0.98) - Smaller blobs get higher weights
Largest (top 1) - Larger blobs get higher weights
BiggerThan (200) - Blobs bigger than the specified size are kept, those below are removed
SmallerThan (10) - Blobs smaller than the specified size are kept, those above are removed
AtLeast 100 (top 10) - Blobs above the specified amount get decreasing weights according to their size
AtMost 100 (top 10) - Blobs smaller than the specified amount get decreasing weights according to their size
Widest (0.10) - Wider/thicker blobs (horizontal size) get higher weights
Narrow (top 10) - Narrow/thinner blobs (horizontal size) get higher weights
Tallest (top 10) - Taller blobs (vertical size)
Shortest (top 5) - Shorter blobs (vertical size) get higher weights
Thickest (top 3) - Thicker blobs (minimum distance from object perimeter to medial axis) get higher weights
Thinnest (top 3) - Thinner blobs (minimum distance from object perimeter to medial axis) get higher weights
Gradient (270 degrees) - Blobs with specified surface gradient (shading) get higher weights
Hole Size - Blobs with specified hole size get higher weights
Most Holes (top 4) - Blobs with many holes (regardless of hole size) get higher weights
Least Holes (top 4) - Blobs with fewest holes (regardless of hole size) get higher weights
Densest - Blobs that are more solid (least or smallest holes) get higher weights
Least Densest - Blobs that are least solid (many or few large holes) get higher weights.
Density Ratio - Blobs that are the specified density ratio (area of blob versus hole) get higher weights.
Rough - Blobs that have more texture (based on the specified image) get higher weights
Smooth - Blobs that have less texture (based on the specified image) get higher weights
Squareish - Blobs appearing like a square (perimeter is 4*side) get higher weights
Aspect (1.0) - Blobs with the specified aspect ratio (width/height) get higher weights
Area / Perimeter - Calculates area / perimeter ratio for each blob
Boxed - Blobs that best fit their square bounding box get higher weights
Circular - Circular blobs get higher weights
Circular perimeter - Blobs with circular perimeters (ignoring holes) get higher weights
Edge Strength - Calculates how strong the blobs edges are using the specified source image. This is a measure of how stable the shape of the blob is
Perimeter / Area - Calculates perimeter / area ratio for each blob
Quadrilateral Sides - Estimates a perfect rectangle from blob outline and then determines squareness of a blob by comparing how well two sides of the ideal extracted rectangle compare in length. The more rectangular the blob the more the opposing sides will match in length
Quadrilateral perimeter - Estimates a perfect rectangle from blob outline and then compares how the blob's perimeter matches the perimeter determined by the ideal four sides
Quadrilateral Area - Estimates a perfect rectangle from blob outline and then compares how well does the blob's area matches the area determined by the ideal four sides
Quadrilateral Deviation - Estimates a perfect rectangle from blob outline and then compares how well does the blob's outline deviates from the ideal extracted rectangle
Triangular - Triangular shaped blobs get higher weights based on how well their area and perimeter agree based on a triangle
Triangle Sides - Estimates a perfect triangle from blob outline and then determines triangularness of a blob by comparing how well sides of the ideal extracted triangle compare in length
Triangle perimeter - Estimates a perfect triangle from blob outline and then determines how well does the blob's perimeter matches the perimeter determined by the ideal three sides
Triangle Area - Estimates a perfect triangle from blob outline and then determines how well does the blob's area matches the area determined by the ideal three sides
Triangle Deviation - Estimates a perfect triangle from blob outline and then determines how well does the blob's outline deviates from the ideal extracted triangle
Smoothness - Blobs with smooth perimeters get higher weights
Straightest (top 5) - Blob shape is mainly in a single direction
Bitmap using - Blobs most similar to shape bitmap get higher weights
Diagonal - Diagonal oriented blobs get higher weights
Diagonal Left - Left slanted blobs get higher weights
Diagonal Right - Right slanted blobs get higher weights
Horizontal - Horizontal oriented blobs get higher weights
Overlaps - Used to ensure that an objects detected in one tab filter are also detected in another. Can be used to join blobs across tab filters.
Triangle Orientation - Estimates a perfect triangle from blob outline and then ranks then based on the triangle's orientation (45 degrees)
Max Radius Degree - Determines furthest point in blob from COG of blob and then ranks blobs based on the angle of the line from the COG to that furthest point (45 degrees)
Vertical - Vertical oriented blobs get higher weights

Variables

BLOBS - contains the COGX and COGY of all detected blobs. You can use this array within a VBScript program to further process the blobs. For example, the below script will calculate the distance to the first two detected blobs. Note that the blob filter should allow at least two blobs to exist for this script to work correctly.

blobs = GetArrayVariable("blobs")

if isArray(blobs) then
  if ubound(blobs) >=2 then

    xdiff = blobs(0)-blobs(2)
    ydiff = blobs(1)-blobs(3)

    dist = sqrt((xdiff*xdiff) + (ydiff*ydiff))

    SetVariable "distance", dist

  end if
end if


Blob_Filter Related Forum PostsLast postPostsViews
blob identification
Halo! I have a problem. I can not understand why are blobs numbered/ordered in order of the Y- posit...
7 months 7 621
Small Bug with Blob Filter
The updated Blob Filter module in v2.14.7 has a dialog that pops up whenever I start RoboRealm that says "Font format error on...
7 months 2 157
Set new destination during runtime
Hello, Please find the robo file, for which i have two questions: 1) w...
4 months 6 536
Easy Vision Program
Is there an easy vision program to use that won't take up a lot of processor space? I need it to be able to run on a single cor...
4 months 18 844
Multiple object tracking
Is it possibile to use RoboRealm to track two objects (blobs) simultaneously? I see that you can label a blob but cant q...
4 months 26 4698
Blob filter weights
I just want to say you guys are doing a great job with Roborealm. I have experience with several different industrial machine vi...
4 months 2 478
Tracking colors
I have a filter I made a couple years ago to track a Tshirt. It should only track the color green when it is bordered by Red and...
5 months 2 552
Purpose of Vb script
Hello, Im new in this field and need some help. I am working with LEGO NXT, a robot which has to pi...
5 months 12 1314


© 2005 - 2010 RoboRealm. All Rights Reserved. | Contact | Glossary | Privacy | Disclaimer | Link to Us | Resources | Site Map