Dimensionality reduction in HOG feature vector

蓝咒 提交于 2019-12-10 10:54:25

问题


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?


回答1:


You can't do PCA on this, since you have more features than your single observation. Get more observations, some 10,000 presumably, and you can do PCA.

See PCA in matlab selecting top n components for the more detailed and mathematical explanation as to why this is the case.



来源:https://stackoverflow.com/questions/35083533/dimensionality-reduction-in-hog-feature-vector

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!