Error using vl_gmm - Attempt to execute script as function

别等时光非礼了梦想. 提交于 2019-12-02 09:54:42

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.

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