Starting from:

$30

CS6643-Homework 4 Solved

The discriminant functions for a two-class classification problem are given below:

 

            Class 1:    ๐ท๐ท1(๐‘ฅ๐‘ฅ) = ๐‘ฅ๐‘ฅ12 + ๐‘ฅ๐‘ฅ1 + ๐‘ฅ๐‘ฅ2 + 4       Class 2:    ๐ท๐ท2(๐‘ฅ๐‘ฅ) = ๐‘ฅ๐‘ฅ1 + 2๐‘ฅ๐‘ฅ2 + 3

 

(a)    Find the equation of the decision boundary between the two classes.  

(b)   Plot the equation you have found on a graph and label the regions on either side of the plot with ๐œ”๐œ”1 if samples within the region belong to class 1, and ๐œ”๐œ”2 if samples within the region belong to class 2.

 

2.  We would like to use a minimum-distance classifier formulated using linear discriminant functions ๐ท๐ท๐‘–๐‘–(๐‘‹๐‘‹) to classify input X into one of three classes. Input X and the prototype vectors for the three classes are given below:

 

X = ๏ฃฎ๏ฃฏxx12๏ฃบ๏ฃน๏ฃป ,   R1 =๏ฃฐ๏ฃฎ๏ฃฏ32..50๏ฃน๏ฃป๏ฃบ , R2 =๏ฃฏ๏ฃฐ๏ฃฎ−02.5.5๏ฃบ๏ฃน๏ฃป ,    R3 =๏ฃฎ๏ฃฐ๏ฃฏ−23.5๏ฃน๏ฃป๏ฃบ

๏ฃฐ

 

(a)    Write the mathematical formulas for the discriminant functions ๐ท๐ท๐‘–๐‘–(๐‘‹๐‘‹) for the three classes.  

(b)   Classify the input X = ๏ฃฎ๏ฃฏ๏ฃฐ−57.5.0๏ฃน๏ฃบ๏ฃป into one of the three classes using your discriminant

functions in (a).  

 

3.  In face recognition using eigenfaces, we use a set of training face images to derive the eigenface matrix ๐‘ˆ๐‘ˆ that forms the face space. (a) Given the eigenface matrix U, write the formula for computing the PCA coefficients of an input face image I.  (b) Suppose 20 training images, each of size 360 × 480  (height × width), were used to derive U, what is the dimension of U and what is the dimension of the computed PCA coefficient?

 

4.  ] We would like to use the unsigned representation of the Histogram of Oriented Gradients (HOG) descriptor to detect human in images.  

 

(a)    What is the dimension of the descriptor if we assume the following parameter settings: detection window size = 136 x 80 pixels (rows x columns), cell size = 8 x 8 pixels, block size = 2 x 2 cells, block overlap = 8 pixels, and number of histogram bins per cell = 9.  

(b)   The bin centers Center(i) for the 9 histogram bins are given in the table below. Given the gradient magnitude M and gradient angle ๐œƒ๐œƒ of an edge that lies between two bin centers

Center(i) and Center(j), with ๐‘—๐‘— = ๐‘–๐‘– + 1 for ๐‘–๐‘– = 1 ๐‘ก๐‘ก๐‘ก๐‘ก 8, ๐‘—๐‘— = 1 for ๐‘–๐‘– = 9.  derive the formulas that allow you to compute the increments to histogram bins ๐ป๐ป(๐‘–๐‘–) and ๐ป๐ป(๐‘—๐‘—).  The input gradient ๐œƒ๐œƒ can range from 0 to 360 degrees. If ๐œƒ๐œƒ is greater than or equal to 180, subtract by 180 first. Your formulas should be expressed in terms of

๐‘€๐‘€, ๐œƒ๐œƒ, ๐‘–๐‘–, ๐‘—๐‘—, ๐ถ๐ถ๐ถ๐ถ๐ถ๐ถ๐‘ก๐‘ก๐ถ๐ถ๐ถ๐ถ(๐‘–๐‘–), ๐ถ๐ถ๐ถ๐ถ๐ถ๐ถ๐‘ก๐‘ก๐ถ๐ถ๐ถ๐ถ(๐‘—๐‘—), ๐ป๐ป(๐‘–๐‘–) and ๐ป๐ป(๐‘—๐‘—), and should be able to handle angles that lie between bin centers 9 and 1. You can give more than one formulas.  

(c)    Given the gradient magnitudes and gradient angles of an 8 x 8 cell as shown in the figures below, compute the histogram of the cell (before block normalization.)  

 

 

                                                                                         1 

 
 

 

Bin # 









Center(i) (in degrees) 

20 
40 
60 
80 
100 
120 
140 
160 
 

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
100
0
0
0
0
0
0
0
0
200
0
0
0
0
0
0
0
0
0
160
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
            Gradient Magnitudes
 

200
45
23
98
130
260
255
250
125
295
85
90
130
265
249
240
123
35
85
95
125
260
250
240
100
90
45
90
120
265
240
230
95
99
105
106
355
120
100
110
90
100
110
120
120
130
125
120
85
90
100
110
110
120
120
110
80
80
100
110
100
100
100
110
                    Gradient Angles
 

 

 

More products