Professional Documents
Culture Documents
Blob Analysis
Blob Analysis
Thomas Moeslund Computer Vision and Media Technology lab. Aalborg University tbm@cvmt.dk
Segmentation
Actor sitting
Preprocessing
Knowledge base
Problem domain Image acquisition
Result
Agenda
BLOBs
Finding the pixels for each object
Extracting features
Calculate features
For example size and shape
. . .
4
Isolating a BLOB
What we want:
For each object in the image, a list with its pixels
Define: connectivity
Who are my neighbors? 4-connected 8-connected
7
10
11
Extracting features
12
13
Features
15
Features
One BLOB
Number of holes in the object Holes area Total area = area + holes area Perimeter = length of contour Bounding box
Upper left corner Height and width of bounding box
16
Features
Center of mass (xm,ym)
xm
Compactness
iobject
ym
iobject
Width Height
17
Features
Degree of elongation
Shapes
Bounding box ratio: Height / Width
Says something about the elongation
Many other features: see the notes for today and be creative!
18
Feature Matching
19
Feature Matching
But what if more BLOB have the same number of TRUEs? Solution: Measure the DISTANCE from each BLOB to the model and pick the BLOB with the shortest distance, i.e. the BLOB most similar to the model
A much better method as it is based on statistics!
Feature Matching
Solution: Measure the DISTANCE from the BLOB to each of the models and pick the model with the shortest distance, i.e. the model most similar to the BLOB How do we define a distance?
21
Feature Matching
Distance in feature-space Feature 1: Area Feature 2 Feature 2: Circularity 2 dimensional feature space BLOB: Model types:
MATCH!
Feature 1
22
( M fj Bi , fj ) 2
Feature 2
Euclidean distance
Feature 1
23
Feature Matching
Problem:
Area is measured in 1000s and circularity [0,1] That means that the area will dominate the distance measure completely! Solutions:
Use ratios: So W/H is a better feature than W or H Normalize all feature to the same interval, e.g., [0,1] Let some of the features be TRUE/FALSE and others Euclidean distances
24
Feature Matching
What if we trust some features more than others?
For example, with small objects the perimeter might be uncertain
Solution: Weigthing
D(i) ( M f 1 Bi , f 1 ) ( M f 2 Bi , f 2 )
2 2 # features j 1
( M fj Bi , fj ) 2
# features j 1
D(i) W1 ( M f 1 Bi , f 1 ) W2 ( M f 2 Bi , f 2 )
2 2
W j ( M fj Bi , fj ) 2
25
What to remember
BLOB = Binary Large OBject
Find a list of pixels for each object
Feature matching
TRUE/FALSE Euclidean distance Normalize Learn the features of the model
26
Exercises
Questions to the lecture? What was good about the lecture and what could have been better? Discuss the PE-questions In what order will the pixels be marked if a
4-connected kernel is used? 8-connected kernel is used?
Play around in ImageJ with the BLOB analysis (Analyze) perhaps you can combine it with morphology Find the approximate centers of all dots in the image: dots-lines 27
Exercises
If youre using images in you project:
Which features could you imagine using?
Imagine you are using the Area of a BLOB as a feature in your project. Find a way to normalize the feature matching, so the result always is in the interval: [0,1] (where 0 means a very poor match and 1 means a perfect match) What features can be used to classify the different letters in the image: alphabeth? Draw the signature for a box
What is the problem with this signature compared with the signature for the circle? How can this problem be handled?
28