简体   繁体   English

HOG特征向量的降维

[英]Dimensionality reduction in HOG feature vector

I found out the HOG feature vector of the following image in MATLAB. 我在MATLAB中找到了下图的HOG特征向量。

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? features出来的是1x1944矢量,我需要减小此矢量的维数(例如1x100 ),我应该采用哪种方法?

I thought of Principal Component Analysis and ran the following in MATLAB. 我想到了主成分分析,并在MATLAB中运行了以下内容。

prinvec = pca(features);  

prinvec comes out to be an empty matrix ( 1944x0 ). prinvec出来是一个空矩阵( 1944x0 )。 Am I doing it wrong? 我做错了吗? If not PCA, what other methods can I use to reduce the dimension? 如果不是PCA,我还可以使用哪些其他方法来减小尺寸?

You can't do PCA on this, since you have more features than your single observation. 您不能对此进行PCA,因为您拥有的功能不止一个观测值。 Get more observations, some 10,000 presumably, and you can do PCA. 获得更多观察结果(大概有10,000个),您可以进行PCA。

See PCA in matlab selecting top n components for the more detailed and mathematical explanation as to why this is the case. 有关为什么会出现这种情况,请参见matlab中的PCA,选择前n个组件 ,以获取更详细的数学解释。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM