使用vl_gmm -尝试执行脚本作为函数的错误。

时间:2022-07-05 23:12:30

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

你好,我想用费雪矢量来做SIFT描述。我尝试使用VL_FEAT的函数。我在MATLAB中添加了这个目录,并运行vl_startup。它运行成功,但当我尝试这个例子时。

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 个解决方案

#1


0  

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?

你只下载了源文件吗?如果是,你会先编译VLFeat吗?具体来说,在下载源代码时,首先运行vl_compile吗?

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.

像vl_gmm这样的函数需要在使用函数之前编译一个MEX包装器。如果查看工具箱/gmm目录,有两个文件:vl_gmm。m和vl_gmm.c。vl_gmm。m只是一个包含关于如何使用函数的文档的MATLAB文件。实际的函数在vl_gmm中。它是一个MEX文件。如果您没有首先编译VLFeat,那么您只会得到这个错误,因为它试图在默认情况下运行.m文件,其中只包含文档。

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

因此,确保通过运行vl_compile来编译VLFeat。在尝试运行您的示例之前,先编写m脚本。

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.

或者,您也可以通过下载二进制文件来获取VLFeat: http://www.vlfeat.org/download/vlfeat0.9.19 -bin.tar.gz。如果您很难编译这些库,那么通过我给您的链接下载实际预编译的二进制文件,然后尝试运行vl_setup。m。

#1


0  

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?

你只下载了源文件吗?如果是,你会先编译VLFeat吗?具体来说,在下载源代码时,首先运行vl_compile吗?

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.

像vl_gmm这样的函数需要在使用函数之前编译一个MEX包装器。如果查看工具箱/gmm目录,有两个文件:vl_gmm。m和vl_gmm.c。vl_gmm。m只是一个包含关于如何使用函数的文档的MATLAB文件。实际的函数在vl_gmm中。它是一个MEX文件。如果您没有首先编译VLFeat,那么您只会得到这个错误,因为它试图在默认情况下运行.m文件,其中只包含文档。

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

因此,确保通过运行vl_compile来编译VLFeat。在尝试运行您的示例之前,先编写m脚本。

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.

或者,您也可以通过下载二进制文件来获取VLFeat: http://www.vlfeat.org/download/vlfeat0.9.19 -bin.tar.gz。如果您很难编译这些库,那么通过我给您的链接下载实际预编译的二进制文件,然后尝试运行vl_setup。m。