Professional Documents
Culture Documents
Session 6
Objectives
• The student will correctly:
1
Blob Overview
• Blob analysis is the detection and analysis of two-dimensional
shapes within an image
• Blob finds objects by identifying groups of pixels that fall into a
user-defined grey-scale range
• Blob reports many properties: center of mass (CM) extrema
– Area
– Center of Mass
– Perimeter
principal axes (PA)
– Principal Axes extrema
CM
PA
• Sample applications:
– Inspect for number, size, and shape of dispensed epoxy dots
– Inspect for correct position and size of ink dots indicating bad wafer dies
– Inspect for fragmentation and size of pharmaceutical tablets
– Sort or classify objects according to their size, shape, or position
2
Segmentation
• The first thing Blob does when it Blob pixels
runs is image segmentation,
determining which pixels are
blob pixels and which are
background pixels
• There are several modes to
specify what separates blob
from background pixels
Background pixels
Segmentation
• Most segmentation modes
will require:
– Polarity
• Dark blobs on light
• Light blobs on dark
– Threshold
• The value(s) that
separate blob pixels
from background
pixels
3
Fixed Thresholding
• In Fixed Thresholding, the division between blob pixels and
background pixels is determined by grey values.
• Set a grey-level threshold:
grey value
p threshold
i = 140
x
e
l
s
Fixed Thresholding
• Fixed grey-level 90
thresholds do not Dark image: Pixel
value 10
Threshold = 100
accommodate linear
lighting changes
Average Pixel 160
image: value 80
Threshold = 100
Pixel 200
Light image: value 120
Threshold = 100
4
Relative Thresholding
• Relative thresholds are expressed as percentages of the total pixels between
the left and right tails
• Tails represent noise-level pixels that lie at the extremes of the histogram
Image:
Histogram:
changes
Threshold = 100
40% of
Threshold = 140
40% of
10
5
Fixed vs. Relative Thresholding
• Fixed is faster than relative because the grey levels
corresponding to the percentages do not have to be
computed
• Fixed thresholding can test for absence of a feature in a
scene, whereas relative thresholding will always find a blob in
the scene
background "object"
0 255
11
Hard Thresholding
• The examples so far have all used Hard Thresholding
– One value (grey level or percentage) divides blob pixels from
background pixels
200
Pixel
value
{ 220
80
100
120
Apply threshold value = 150
grey value
threshold
Examine a histogram to
determine the threshold
grey value blob background
12
6
Hard Thresholding
Threshold Specify single
dynamically percentage & tails
chosen; good for
images with
bimodal
distribution of
grey values Specify single
grey value
13
14
7
Pixel Weighting
• Spatial Quantization Error can be eliminated by applying pixel
weighting
• As the blob moves relative to the pixel grid, the total weight
remains the same
0 0 1 1 1 0 0 0 .4 1 1 .6 0 0 0 0 .8 1 1 .2 0
15
Soft Thresholding
• Soft Thresholding
example 1.0
– Low Threshold = 50
– HighThreshold = 65 0.75
– Softness = 3
0.50
Weighting
0.25
50 55 60 65
Threshold Grey
Values High
Threshold
16
8
Soft Thresholding
17
Segmented Image
18
9
Pixel Mapping
• Use a pixel map (lookup table) for images that cannot be
segmented with hard or soft binary thresholds
• Requires a scaling factor which gets applied to the pixel map
values
19
Pixel Mapping
• Supply an output value for each
grey value
20
10
Connectivity Analysis
• After segmenting the image, Blob
performs Connectivity Analysis
• Whole Image blob analysis returns
one result for all blob pixels in the
image
• Grey Scale analysis identifies
discrete, connected blobs Whole Blob Analysis
21
Connected-Blob Analysis
• Object pixels must be eight-connected
– Connected vertically, horizontally, or diagonally
• Background pixels are four-connected
– Connected vertically or horizontally only
11
Applying Morphological Filters
• First choose the filter(s) from the pull-
down list
• Order matters!
– To reorder or delete an operation, use
the buttons in the dialog
23
24
12
Region
• By default, the blob analysis
is done on the entire image
• To only detect blobs in a
portion of the acquired image
use a Region Shape
– May graphically position and
size on the Input Image
25
Measurements
• Allows you to specify
measurements
calculated on each blob
26
13
Measurements
• For each selected
measurement, choose:
– Grid
– Runtime
– Filter
27
Measurements
• Use Filter to exclude
blobs outside a
certain range for any
property
– Or include only in a
certain range
28
14
Measurements
• Results may be sorted in order for
any of the selected measurements
– Ascending or descending order
29
Graphics
• Choose to display Result or
Diagnostic graphics
– Remember that graphics add
time
30
15
Results
•N
– Index of the blob
• ID
– A unique blob identification number independent of sorting criteria
• Measurements
– Calculated for those selected measurements
31
Geometric Properties
• Geometric properties are blob measurements that are constant
regardless of the orientation of the blob
– Area
– Perimeter
– Center of Mass
– Second moments of
inertia about the Bounding box for
Geometric extents
principle axes Center of mass
– Geometric extents
Minor axis
– Principal bounding box
Major axis
32
16
Non-geometric Properties
• Non-geometric properties are those that change as the blob
rotates or changes position
– Blob median
– Second moment of
inertia about the
coordinate axes
– Coordinate extents
Bounding box for
– Arbitrary bounding Coordinate extents
Blob median
Median in x-axis
33
Topological Properties
• Identifies blobs, holes, and blobs within holes
34
17
Summary
• The Blob tool plays an important role in machine vision
• The Blob tool is used in key situations where:
– A model may be difficult to train
– A very specific measurement like area or acircularity is necessary
35
18