HOG特征向量的降维

HOG特征向量的降维

本文介绍了HOG特征向量的降维的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在MATLAB中找到了下图的HOG特征向量.

I found out the HOG feature vector of the following image in MATLAB.

输入图像

我使用了以下代码.

I = imread('input.jpg');
I = rgb2gray(I);
[features, visualization] = extractHOGFeatures(I,'CellSize',[16 16]);

features出来是1x1944向量,我需要减小该向量的维数(例如1x100),我应该采用哪种方法?

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?

我想到了主成分分析,并在MATLAB中运行了以下内容.

I thought of Principal Component Analysis and ran the following in MATLAB.

prinvec = pca(features);

prinvec出来是一个空矩阵(1944x0).我做错了吗?如果不是PCA,我还可以使用什么其他方法来减小尺寸?

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?

推荐答案

您不能对此进行PCA,因为您的功能多于单个观察结果.获得更多观察结果(大概有10,000个),您可以进行PCA.

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.

请参见在MATLAB中选择前n个组件的PCA 有关为什么会出现这种情况的更详细的数学解释.

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

这篇关于HOG特征向量的降维的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-27 17:29