Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components...

36
Lecture 19 Representation and description II 1. Regional descriptors 2. Principle components 3. Representation with Matlab 4. Feature selection

Transcript of Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components...

Page 1: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.

Lecture 19 Representation and description II

1. Regional descriptors

2. Principle components

3. Representation with Matlab

4. Feature selection

Page 2: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.

2

Regional Descriptors

1. area

2. perimeter

3. compactness

4. topological descriptors

5. texture

Page 3: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.

Simple descriptors

Area = the number of pixels in the region

Perimeter = length of its boundary

Compactness = (perimeter)2/area

Page 4: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.

Topological descriptors

Features that does not change when deformation

E = C – H

E = Euler number

C = number of connected region

H = number of holes

Page 5: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.

Example

Straight-line segments (polygon networks)

V – Q + F = C – H = E

V = number of vertices

Q = number of edges

F = number of faces

7-11+2 = 1-3 = -2

Page 6: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.

Example

Page 7: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.

Texture description

• Texture features measures– Smoothness, coarseness, and regularity– Three approaches: statistical, structural, and spectral

• Statistical approach yields characterization of smoothness, coarse, grainy

• Structural approach deals with arrangement of image primitives such as regularly spaced parallel lines

• Spectral approach is based on properties of Fourier spectrum to detect global periodicity in an image by identifying high-energy, narrow peaks in the spectrum.

Page 8: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.

Statistical approaches

1

0

1

0

22

2

3

The nth moment of z about the mean

( ) ( ) ( )

where ( )

The second moment is the variance ( ) ( )

1Relative smoothness: ( ) 1 .

1 ( )

The third moment ( ) measures

Ln

n i ii

L

i ii

z z m p z

m z p z

z z

R zz

z

4

12

0

1

20

the skewness

The fourth moment ( ) measures the flatness

Uniformity: ( ) ( )

Entropy: ( ) ( ) log ( ), measuring the variability.

L

ii

L

i ii

z

U z p z

e z p z p z

Page 9: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.

Example

Page 10: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.

Co-occurrence matrix and descriptors

,

Let be an image with intensity levels . Let G be a matrix,

whose element is the number of times that pixel pairs with

intensities z and z occuring in f in the position specified by

an operato

i j

i j

f L

g

r . Let be the total number of pixel pairs,

/

Then the statistical measures can be applied to to obtain

the co-occurrence descriptors.

ij ij

ij

Q n

p g n

p

Page 11: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.
Page 12: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.
Page 13: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.

Occurrence with large distance

• Example: correlation descriptor as a function of offset

Page 14: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.

Spectral approaches

• Consider the FT F(u, v) of the region. • Or represent F(u, v) in polar coordinates S(r, θ)

• Ray descriptor

• Ring descriptor

0

( ) ( , )S r S r

0

( ) ( , )R

r

S S r

Page 15: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.

Principle components

• Suppose we are given n components of an image (e.g. n = 3 for RGB image), written as

• The mean vector is

• The covariance matrix

– Real and symmetric

1

21 2( , ,..., )T

n

n

x

xX x x x

x

1

2{ } , { }X i i

n

m

mm E X m E x

m

{( )( ) }TX X XC E X m X m

Page 16: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.

Eigenvalue, eigenvector, and Hoteling transformation

1

1 2

1 2 1 2

1

2

Let a and , 1, 2, ..., be the eigenvectors and

corresponding eigenvalues of . i.e.,

Assume,

, ,

, , , ,

i i

X X i i i

i i

TT T Tn

TT T T Ty X n x n

T

T

Tn

i n

C C a a

A a a a

C AC A a a a C a a a

a

a

a

1

21 2 1 1 2 2

11 1 1 2 1 2 1

21 2 1 2 2 2 2

1 1 2 2

, , , , , ,

0 0 0

0 0 0

0 0 0

( )

T

T

x x x n n n

Tn

T T Tn n

T T Tn n

T T Tnn n n n n

X

T

a

aC a C a C a a a a

a

a a a a a a

a a a a a a

a a a a a a

Y A X m

X A

1

2,

T

T

X k X

Tk

a

aY m X Y m

a

Page 17: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.
Page 18: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.
Page 19: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.
Page 20: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.
Page 21: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.
Page 22: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.
Page 23: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.

Example 2

• Let X =(x1, x2) be the coordinates of pixel of a region or a boundary

• The eigenvalues are descriptors insensitive to size and routation

1 2 1 2Compute , , and eigenvectors , , and , , and

Hoteling transformationX xm C e e

Page 24: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.

Example 2

Page 25: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.
Page 26: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.

Lecture 19 Part IIFeature selection

• This is to select of a subset of features from a larger pool of available features

• The goal is to select those that are rich in discriminatory information with respect to the classification problem at hand.

Page 27: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.

28

Some housekeeping techniques

1. Outlier removalAn outlier is a point that lies far away from the mean value of the corresponding random variable;

e.g. for normally distributed data, a threshold of 1, 2, or 3 times the standard deviation is used to define outliers.

2. Data normalization : restrict the values of all features within predetermined ranges. E.g. transform to standard normal distribution

or transform the range to [-1, 1]or by softmax scalingr is user defined para.

Page 28: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.

29

Informative or not by hypothesis testing

• A feature is informative or not. • Statistical tests are commonly used. The idea is to test

whether the mean values of feature has in two classes differ significantly

– H1: The mean values of the feature in the two classes are different. (alternative hypothesis)

– H0: The mean values of the feature in the two classes are equal. (null hypothesis)

Page 29: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.

Receiver operating characteristic

• Measure the overlap between the pdfs describing the data distribution. This overlap is quantified in terms of an area between two curves, also known as AUC (area under the receiver operating curve).

Page 30: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.

Fisher’s discriminant Ratio

• Fisher’s discriminant ratio (FDR) is commonly employed to quantify the discriminatory power of individual features between two equiprobable classes.

Page 31: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.

Combination of features

• Divergence

Si is the covariance matrix

Page 32: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.

Bhattacharyya Distance and Chernoff Bound

Page 33: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.

Measures Based on Scatter Matrices

• Large values of J1, J2, and J3 indicate that data points in the respective feature space have small within-class variance and large between-class distance.

Page 34: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.

Feature Subset Selection

1. Reduce the number of features by discarding the less informative ones, using scalar feature selection.

2. Consider the features that survive from the previous step in different combinations in order to keep the “best” combination.

Page 35: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.

1. features are ranked in descending order according to some

criterion C.

2. Let i1 be the index of the best one. Next, the cross-correlations among the first (top-ranked) feature with each of the remaining features are computed.

3. The index, i2, of the second most important feature, x_i2 , is computed as

4. General k

Feature ranking

Page 36: Lecture 19 Representation and description II 1.Regional descriptors 2.Principle components 3.Representation with Matlab 4. Feature selection.

Feature Vector Selection

• Find the “best” combination of features.

• To examine all possible combinations of the m features

• Suboptimal Searching Techniques, e.g. sequential forward selection (SFS),