Image Processing Reference
In-Depth Information
where N is the number of pixels in the BLOB and x i and y i are the x and y
coordinates of the N pixels, respectively. In situations where the BLOB contains
“appended parts” the median can replace Eq. 7.2 . An example could be if you
want to find the center of a person's torso. The configurations of the arms will
effect the result of Eq. 7.2 , but the median is less effected. The median is more
computational demanding than the center of mass. An alternative to the median is
to erode the BLOB with a large structuring element and then calculate the center
of mass.
Center of the bounding box is a fast approximation of the center of mass. In math-
ematical terms the center of the bounding box, (x bb ,y bb ) is calculated as
x max
x min
x max
2
x min
2
x min +
x max
x bb =
x min +
=
x min +
=
(7.3)
2
2
y max
y min
y max
2
y min
2
y min +
y max
y bb =
y min +
=
y min +
=
(7.4)
2
2
Perimeter of a BLOB is the length of the contour of the BLOB. This can be found
by scanning along the rim (contour) of an object and summing the number of pixels
encountered. A simple approximation of the perimeter is to first find the outer
boundary using the method from Sect. 6.3.4 (or another edge detection algorithm).
Following this we simply count the number of white pixels in the image.
Circularity of a BLOB defines how circular a BLOB is. Different definitions exist
based on the perimeter and area of the BLOB. Heywood's circularity factor is, for
example, defined as the ratio of the BLOB's perimeter to the perimeter of the circle
with the same area:
Pe rimeter of BLOB
2 π
Circularity
=
(7.5)
·
Area of BLOB
A different way of calculating the circularity is to find the different radii as de-
scribed for the bounding circle. The variance (see Appendix C) of the radii gives
an estimate of the circularity. The smaller the variance the more circular the BLOB
is.
In Fig. 7.6 two of the feature values are illustrated for the BLOBs in Fig. 7.4 (left).
So after extraction of features a binary image has been converted into a number of
feature values for each BLOB. The feature values can be collected in a so-called
feature vector . For the BLOBs in Fig. 7.6 , the feature vector for BLOB number one
is
0 . 31
6561
f 1 =
(7.6)
Since we have seven BLOBs, we will also have seven feature vectors: f 1 ,...,f 7 .
Search WWH ::

Custom Search