You are on page 1of 11

9/15/2011

Blobs
Session 3

Objectives

• The student will correctly identify the


• Purpose
P rpose of the FindBlobs and SortBlobs ffunctions
nctions
from an ExtractBlobs tool
• The selection of parameters for use with the
FindBlobs and SortBlobs functions
• The student will correctly implement the:
• ExtractBlobs, FindBlobs, and SortBlobs function
in an application

1
9/15/2011

Blobs
• Blob tools play an important role in machine
vision.
• Blob analysis in In-Sight classifies pixels into blob
pixels or background pixels.
• All connected blob pixels are part of an individual
blob.
• The rest are considered the background.
• This strategy helps when you need to:
• Find features that cannot be traditionally
trained and found using correlation or
geometric model search (parts that
change dramatically)
• Speed up identification, location, or
sorting features when model training and
finding take too long
• There are three Blob tools available in the In-Sight
product:
• ExtractBlobs
• SortBlobs
• FindBlobs
3

ExtractBlobs
• ExtractBlobs is the primary Blob vision tool in In-Sight.
• It has a dual role:
• It can count the number of blobs.

• It can itemize each blob by area and report details like:


• Index
• Row
• Col
• Angle
• C l
Color
• Area
• Elongation
• Holes
• Perimeter
• Spread
4

2
9/15/2011

ExtractBlobs Property Sheet


Reference to target image cell
Where tool should fixture itself
Region specifying interest zone
Number of blobs to list info *
Value separating black/white**
Enable blob hole area in result
Consider blobs touching region limit
Are blobs dark, light, or either?
Is the background dark or light?
Minimum blob size to report
Maximum blob size to report
Graphic options to display

*Setting “Number to Sort” to 0 only counts the number of blobs in the region. No other
blob results are reported.
**Setting “Threshold” to -1 performs automatic threshold. 5

Color: Blob & Background


How many black blobs on
• Color allows the extraction to 1
white background?
focus on white,, black,, or all
blobs
• Background allows opposite
or same polarity selection to
control connectivity
• When opposite polarity is
selected, blobs can be 8 way
connectivity
• When same polarity is
selected, blobs must be 4
way connectivity How many black blobs on
black background? 8
6

3
9/15/2011

SortBlobs
• SortBlobs allows the customized sorting of blobs already
extracted

Reference to existing blob structure


Number of blobs to sort
Sorting strategy
Reference fixture (optional)
Graphic options to display

X – Fixture X Coordinate Small to Large


• Sorts from top to bottom of images based on center of mass
of blobs Y

0 3 4 1 2
5

6 8 10 11 7 9

X 13 12 15
14 16 17

19 21 22 23 18 20

4
9/15/2011

Y – Fixture Y Coordinate Small to Large


• Sorts from left to right of images based on center of mass of
blobs Y

3 7 11 15 19 23

2 6 10 14 18 22

X 1 17 21
5 9 13

0 4 8 12 16 20

Angle – CCW Rotation from Fixture X Axis


• Sorts counter-clockwise based on angular distance from
default X axis Y

9 16 19 21 22 23

3 6 12 14 18 20

X 1 15 17
4 8 10

0 2 5 7 11 13

10

5
9/15/2011

Angular Distance – Abs. Value of Rotation from Fixture X Axis


• Sorts counter-clockwise based on the absolute value of the
angular
g distance from default X axis
Y

9 16 19 21 22 23

3 6 12 14 18 20

X 1 15 17
4 8 10

0 2 5 7 11 13

11

Angular Distance – Change the fixture


• Look what happens if you change the fixture point…

17 20 23 19 16
22

13 15 21 18 14 12
Y
11 8 3 9 10
2

7 4 1 0 5 6

X 12

6
9/15/2011

Distance – From the Fixture Origin


• Sorts based on distance from the origin of default fixture
Y

0 1 5 8 15 19

2 3 7 12 16 20

X 4 16 22
6 10 13

9 11 14 17 21 23

13

Grid – X then Y from Fixture Origin


• Sorts across rows first, then columns
Y

0 1 2 3 4 5

6 7 8 9 10 11

X 12 16 17
13 14 15

18 19 20 21 22 23

14

7
9/15/2011

Grid – Y then X from Fixture Origin


• Sorts down columns first, then rows
Y

0 4 8 12 16 20

1 5 9 13 17 21

X 2 18 22
6 10 14

3 7 11 15 19 23

15

SortBlobs Results
• Sort Blobs referencing an ExtractBlob structure

16

8
9/15/2011

FindBlobs Property Sheet


• FindBlobs allows the customized selection of blobs already
extracted or sorted based on blob results
Reference to target image cell
Number of blobs to analyse
Minimum score for valid blob
|
|
Nominal value, valid range & relative
weight for blob analysis
|
|
Graphic options to display

17

FindBlobs: Setting It Up
1. Select a blob structure to analyze
2 Set number to find
2.
3. Set results nominal value
a) ideal value the blob must possess
4. Set value range
a) +/- range of the nominal value
5. Set the weight
a) how important this value is
6. Review results focusing on accuracy and score
7. Set “Accept Thresh” value appropriately

18

9
9/15/2011

Setting Up Nominal Values & Range


• The easiest way to set up the nominal value and range for
each criterion is to double click and select one of the blob
results graphically

19

FindBlobs
Blobs are then found by
limiting search parameters
(Too Large)

“found” blobs are sorted byy


criteria to determine indexing
- relative to X

20

10
9/15/2011

FindBlobs: How Does It Work?


1. The closer the actual blob value is to the nominal value, the higher the
score.
2. The range is normalized to 100.
a) Example 1: with a nominal value of 161 and a range of 100, a blob with an
area of 158 will score 97.
b) Example 2: with a nominal value of 161 and a range of 50, a blob with an
area of 158 will score? 94
3. FindBlobs then weighs other criteria by normalizing their weight to 100.
a) Example 3: area scored 96 with a weight of 50, elongation scored 48 with
a weight
i ht off 10
10.
score1((weight1)/(sum of weights)) + score2 ((weight2)/(sum of weights)) =
(96((50)/(50+10))+(48((10)/50+10)) =88

4. What about for 3 weighted values?


21

Summary
• There are three blob vision tools:
• ExtractBlobs is used to pull out all blobs present and
sort them from largest to smallest area
• SortBlobs is used to sort based on position in ROI
• FindBlobs is used to pick out blobs matching specific
criteria from the remaining blob output parameters
• Nominal values, ranges, and weights are used to score blobs
b d on how
based h wellll th
they match
t h ddesired
i d criteria
it i

22

11

You might also like