Chapter 2 - 6_Feature Extraction and Analysis 1

advertisement
FEATURE EXTRACTION AND ANALYSIS
Feature Vectors and Feature Spaces
Feature vector is one method o represent an image, or part of an image (an object), by
finding measurements on a set of features.
The feature vector is an n-dimensional vector that contains these measurements. The
measurements may be one of 3 types: 1) ordinal (discrete/ranked), 2) nominal
(categorical), or 3) continuous.
This vector can be used to classify an object, or provide us with condensed higher-level
image information.
All the possible combinations of the feature vectors form the feature space.
Example 1
We are working on a computer vision problem for robotic control. We need to control a
robotic gripper that picks parts from an assembly line and puts them into boxes. In order
to do this, we need to determine: 1) where the object is in the two-dimensional plane in
which the objects lie, and 2) what type of object it is – one type goes into Box A; another
type goes into Box B. First, we define the feature vector that will solve this problem. We
determine that knowing the area and center of area of the object, defined by an (r, c) pair,
will locate it in space. We determine that if we also know the perimeter we can identify
the object. So our feature vector contains four feature measures, and the feature space is
four-dimensional. We can define the feature vector as (area, r, c, perimeter).
Example 2
Consider that we need to automate the process of identity verification base on a person
face. During the experiment, we determine that the following features have high
discrimination power over faces of different persons: a) distance between eye b)
roundness of face c) length of nose d) skin color (angle A, angle B). So our feature vector
contains 5 feature measures and the feature space is 5 dimensional. We can define the
feature vector as (eye distance, roundness, nose’s length, angle A, angle B);
In the process of classification or verification, we need to compare 2 feature vectors. The
primary methods are to either measure the difference or to measure the similarity
between the two vectors.
The difference can be measured by a distance measure. The greater the distance, the
bigger the difference. Euclidean distance is the most common metric for measuring the
distance between two vectors. Given two vectors A and B where
A  a1
a 2 ... an 
B  b1 b2 ... bn 
then the Euclidean distance is given by
n
 a
 bi  
a1  b1 2  a2  b2 2  ...  an  bn 2
2
i
i 1
However, this measure may be biased as a result of the varying range on different
components of the vector. For example, one component may only range from 1 to 5 and
another may range from 1 to 5000, so a difference of 5 for the first component will be
maximum, but a difference of 5 for second feature may be insignificant. We can alleviate
this problem by using range-normalized Euclidean distance defined as
n

ai  bi 2
2
Ri
where Ri= the range of the ith component, which is the maximum value for that
components minus the minimum value for that component.
i 1
Another distance measure, called the city block or absolute value metric is defined as
n
a
i 1
i
 bi
This metric is computationally faster than the Euclidean distance but gives similar results.
The city block distance can also be range-normalized to give a range-normalized city
block distance metric:
n
ai  bi

Ri
i 1
The final distance metric considered here is the maximum value metric defined by
max{ a1  b1 , a2  b2 ,..., an  bn }
We can see that this will measure the vector component with the maximum distance, and
it can be range-normalized as well:
max{
a  bn
a1  b1 a2  b2
,
,..., n
}
R1
R2
Rn
The second type of metric used for comparing two feature vectors is the similarity
measure. The most common form of the similarity measure is one that we have already
seen, the vector inner product.
n
 a b  a b
i 1
i i
1 1
 a 2 b2  ...  a n bn 
This similarity can also be range normalized
n
ai bi
R
i 1
2
i
a b a b
ab
  1 21  2 22  ...  n 2n
R2
Rn
 R1




Alternatively, we can normalize this measure by dividing each vector component by the
magnitude of the vector
n
ai bi
a b  a 2 b2  ..  a n bn
 1 1

i 1
n
aj
j 1
2
n
 bj
j 1
2
n
aj
j 1
2
n
b
j 1
2
j
When selecting features, an important factor is the robustness of a feature. A feature is
robust if it will provide consistent result across the entire application domain.
For example, if we are developing a system to work under any lighting conditions, we do
not want to use features that are lighting dependent (such color measure using RGB) –
they will not provide consistent results in the application domain.
Another type of robustness, especially applicable to object features, is called RST
invariance, where RST means rotation, size, and translation; meaning that if the image is
rotated, shrunk or enlarged, or translated (shifted left/right or up/down), the value for the
feature will not change.
Binary Object Features
In order to extract object features, we need an image that has undergone image
segmentation and any necessary morphological filtering. This will provide us with
visually clear defined objects. Next, we need to label each object according to the
connectivity desired. The following labeling algorithm assumes that we chose sixconnectivity with NW and SE diagonal neighbors. Notice that the scanning of image
proceeds in top down left right manner.
Download