Error using vl_gmm - Attempt to execute script as function

纵然是瞬间 提交于 2019-12-02 22:03:18

问题


Hello I want to use Fisher Vector for my SIFT descriptors. I tried to use the function from VL_FEAT. I added the directory in MATLAB and also run vl_startup. It runs successfully but when I try the example

It gives me this error:

Attempt to execute SCRIPT vl_gmm as a function:
C:\vlfeat-0.9.19.tar\vlfeat-0.9.19\vlfeat-0.9.19\toolbox\gmm\vl_gmm.m 

Anyone help me how can i solve this?


回答1:


I have a couple of suggestions for you to get VLFeat working. I'm not sure if you have tried them all, but I will suggest them as we go:

Suggestion #1 - Compiling VLFeat if you downloaded just the source

Did you only download the source files? If you did, did you compile VLFeat first? Specifically, did you run vl_compile first when you downloaded the source?

Functions like vl_gmm require a MEX wrapper to be compiled before you can use the function. If you look in the toolbox/gmm directory, there are two files: vl_gmm.m and vl_gmm.c. vl_gmm.m is simply a MATLAB file that contains the documentation on how to use the function. The actual function is in vl_gmm.c and it is a MEX file. You only get this error if you didn't compile VLFeat first because it's trying to run the .m file by default, which contains nothing but documentation.

As such, make sure you compile VLFeat by running the vl_compile.m script before trying to run your example.

Suggestion #2 - Download the pre-compiled binaries

Alternatively, you can get VLFeat pre-compiled by downloading the binaries: http://www.vlfeat.org/download/vlfeat-0.9.19-bin.tar.gz . If you have trouble compiling the libraries, then download the actual pre-compiled binaries through the link I gave you, then try running vl_setup.m from there.



来源:https://stackoverflow.com/questions/27792885/error-using-vl-gmm-attempt-to-execute-script-as-function

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