I found out the HOG feature vector of the following image in MATLAB.
Input Image
I used the following code.
I = imread('input.jpg');
I = rgb2gray(I);
[features, visualization] = extractHOGFeatures(I,'CellSize',[16 16]);
features
comes out to be a 1x1944
vector and I need to reduce the dimensionality of this vector (say to 1x100
), what method should I employ for the same?
I thought of Principal Component Analysis and ran the following in MATLAB.
prinvec = pca(features);
prinvec
comes out to be an empty matrix (1944x0
). Am I doing it wrong? If not PCA, what other methods can I use to reduce the dimension?