Undefined function 'extractHOGFeatures' for input arguments of type 'uint8'

試著忘記壹切 提交于 2019-12-11 13:58:54

问题


I am trying to extract HOG features from an image in MATLAB R2013a.

This is the code I copied from MATLAB documentation website:

input='1.png';
Z=imread(input);
%Z=rgb2gray(Z);
[featureVector, hogVisualization] = extractHOGFeatures(Z);

The error I get is:

Undefined function 'extractHOGFeatures' for input arguments of type 'uint8'.

Error in hogfeatureextractor (line 6) [featureVector, hogVisualization] = extractHOGFeatures(Z);

I think this is due to the computer vision toolbox not installed properly or it might be some other reason that I am not aware of. I have installed MATLAB under Ubuntu 14.04.

I have also used ver to determine if I have the computer vision toolbox installed and I do:

MATLAB Version: 8.1.0.604 (R2013a)
MATLAB License Number: 724504
Operating System: Linux 3.13.0-44-generic #73-Ubuntu SMP Tue Dec 16 00:22:43 UTC 2014 x86_64
Java Version: Java 1.6.0_17-b04 with Sun Microsystems Inc. Java HotSpot(TM) 64-Bit Server VM mixed mode
-------------------------------------------------------------------------------------------------------
MATLAB                                                Version 8.1        (R2013a)
Simulink                                              Version 8.1        (R2013a)
Aerospace Blockset                                    Version 3.11       (R2013a)
Aerospace Toolbox                                     Version 2.11       (R2013a)
Bioinformatics Toolbox                                Version 4.3        (R2013a)
Communications System Toolbox                         Version 5.4        (R2013a)
Computer Vision System Toolbox                        Version 5.2        (R2013a)

As such, I'm not sure why I'm experiencing this error. Can someone help me out?


回答1:


extractHOGFeatures was introduced in MATLAB R2013b. As you are running R2013a, you unfortunately do not have access to this function. See the release notes for the Computer Vision Toolbox here: http://www.mathworks.com/help/vision/release-notes.html and look under R2013b.

You have two options. One is to upgrade your version of MATLAB so that it's at least R2013b, or you can use a third party toolbox. Parag in his comment to you recommended Piotr Dollar's toolbox: https://github.com/pdollar/toolbox

If I can recommend something, try using VLFeat: http://www.vlfeat.org. VLFeat is an open source computer vision library that is implemented in C, and also MATLAB with MEX wrappers.

Check out the HOG tutorial of VLFeat for more details: http://www.vlfeat.org/overview/hog.html.



来源:https://stackoverflow.com/questions/29240596/undefined-function-extracthogfeatures-for-input-arguments-of-type-uint8

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