Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

run vl_feat library in matlab executable file

819 views
Skip to first unread message

Avinash Mahat

unread,
Mar 31, 2013, 9:41:10 AM3/31/13
to
Hello,
I have created a matlab exe file. In the script, I have used vl_sift of vl_feat library.
To include vl_feat while running in script mode(pressing f5 in matlab) . I simply added the path to vl_feat library as:
RUN('C:\Program Files\MATLAB\R2012b\bin\VLFEATROOT\vlfeat-0.9.16\toolbox\vl_setup').

After i created the exe file and ran the exe file, I encountered an error:
RUN cannot execute the file 'C:\Program Files\MATLAB\R2012b\bin\VLFEATROOT\vlfeat-0.9.16\toolbox\vl_setup'. RUN requires a valid matlab script.

How to solve the problem?

Steven_Lord

unread,
Apr 1, 2013, 10:42:25 AM4/1/13
to


"Avinash Mahat" <avnas...@gmail.com> wrote in message
news:kj9edm$hm7$1...@newscl01ah.mathworks.com...
> Hello,
> I have created a matlab exe file. In the script, I have used vl_sift of
> vl_feat library. To include vl_feat while running in script mode(pressing
> f5 in matlab) . I simply added the path to vl_feat library as:
> RUN('C:\Program
> Files\MATLAB\R2012b\bin\VLFEATROOT\vlfeat-0.9.16\toolbox\vl_setup').

1) You probably should NOT be adding files in the bin directory of your
MATLAB installation unless Technical Support provides them to you or you
download them from a bug report as a bug fix and the support staff or bug
report instructions specifically indicate to put them in the bin directory.

2) Specifying the path to the script in your installation won't work in your
executable. Add the appropriate directory to the MATLAB path and then
generate your executable, and execute the script using its name NOT the RUN
function.

--
Steve Lord
sl...@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Avinash Mahat

unread,
Apr 1, 2013, 12:16:14 PM4/1/13
to
I added the path of vl_feat library from MATLAB Set Path. Then I created an executable of a simple scipt as below:
im1=imread("path to gray image");
im1=im2single(im1);
[f,d]=vl_sift(im1);

after i ran the exe file, I encountered another problem as below:
Invalid Mex file ,'.....\toolbox\mex\mex64\vl_sift.mexw64': THe specified module could not be found.

MATLAB: invalidMexFile.

Can you please support on this?


"Steven_Lord" <sl...@mathworks.com> wrote in message <kjc6ci$gqt$1...@newscl01ah.mathworks.com>...

Steven_Lord

unread,
Apr 1, 2013, 2:13:28 PM4/1/13
to


"Avinash Mahat" <avnas...@gmail.com> wrote in message
news:kjcbse$7hm$1...@newscl01ah.mathworks.com...
> I added the path of vl_feat library from MATLAB Set Path. Then I created
> an executable of a simple scipt as below:
> im1=imread("path to gray image");
> im1=im2single(im1);
> [f,d]=vl_sift(im1);
>
> after i ran the exe file, I encountered another problem as below:
> Invalid Mex file ,'.....\toolbox\mex\mex64\vl_sift.mexw64': THe specified
> module could not be found.
>
> MATLAB: invalidMexFile.
>
> Can you please support on this?

That sounds like the MEX-file isn't being included in your application. Try
explicitly adding it to the command that creates your executable. If that
doesn't work, contact Technical Support.

Yixin Du

unread,
Sep 19, 2016, 12:46:27 PM9/19/16
to
> Invalid Mex file ,'.....\toolbox\mex\mex64\vl_sift.mexw64': THe specified module could not be found.


OK. Stuck with this error for three days on a windows 64 bit machine with VS2013 as compiler. I'm providing a solution now. The correct steps are as follows:

1. Run ...toolbox/vl_compile.m
2. Run ...toolbox/vl_setup.m
3. This is the tricky part. Run ...toolbox/mex/mexw64/vl_version.mexw64 (you need to right click this mex file then hit run in Matlab)
4. You are good to go. Feel free to try any demo in the package.

Another thing is that this toolbox cannot be compiled in dropbox folder (maybe it only happens to me), so I'd suggest you put this folder on desktop or any local position on your computer.

I hope this instruction can help save your time.

nudrat Nida

unread,
Apr 30, 2017, 12:40:08 AM4/30/17
to
"Yixin Du" wrote in message <nrp4ob$q8t$1...@newscl01ah.mathworks.com>...
hi

I am having same error my system is 64 bit win 10 and VS 2013. followed ur instructions but stilll getting the error.

compilation was successful but cant able to execute any function of vlfeat.

kind regards

nudrat Nida

unread,
Apr 30, 2017, 12:59:07 AM4/30/17
to
"Yixin Du" wrote in message <nrp4ob$q8t$1...@newscl01ah.mathworks.com>...
Matlab log

>> vl_compile
vl_compile: assuming that Visual C++ is the active compiler
vl_compile: compiling for PCWIN64 (64 bit)
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\aib\vl_aib.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\aib\vl_aibhist.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\fisher\vl_fisher.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\geometry\vl_irodr.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\geometry\vl_rodr.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\gmm\vl_gmm.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\imop\vl_imdisttf.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\imop\vl_imintegral.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\imop\vl_imsmooth.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\imop\vl_imwbackwardmx.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\imop\vl_tpsumx.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\kmeans\vl_hikmeans.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\kmeans\vl_hikmeanspush.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\kmeans\vl_ikmeans.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\kmeans\vl_ikmeanspush.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\kmeans\vl_kmeans.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\misc\vl_alldist.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\misc\vl_alldist2.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\misc\vl_binsearch.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\misc\vl_binsum.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\misc\vl_cummax.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\misc\vl_getpid.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\misc\vl_hog.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\misc\vl_homkermap.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\misc\vl_ihashfind.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\misc\vl_ihashsum.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\misc\vl_inthist.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\misc\vl_kdtreebuild.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\misc\vl_kdtreequery.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\misc\vl_lbp.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\misc\vl_localmax.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\misc\vl_sampleinthist.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\misc\vl_simdctrl.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\misc\vl_svmtrain.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\misc\vl_threads.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\misc\vl_twister.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\misc\vl_version.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\mser\vl_erfill.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\mser\vl_mser.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\quickshift\vl_quickshift.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\sift\vl_covdet.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\sift\vl_dsift.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\sift\vl_liop.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\sift\vl_sift.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\sift\vl_siftdescriptor.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\sift\vl_ubcmatch.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\slic\vl_slic.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
MEX F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\vlad\vl_vlad.c
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
>> vl_setup
Warning: Function cummax has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
> In path (line 109)
In addpath (line 88)
In vl_setup (line 55)
Warning: Function det has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
> In path (line 109)
In addpath (line 88)
In vl_setup (line 55)
Warning: Function cummax has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
> In path (line 109)
In addpath (line 88)
In vl_setup (line 56)
Warning: Function det has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
> In path (line 109)
In addpath (line 88)
In vl_setup (line 56)
Warning: Function cummax has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
> In path (line 109)
In addpath (line 88)
In vl_setup (line 57)
Warning: Function det has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
> In path (line 109)
In addpath (line 88)
In vl_setup (line 57)
Warning: Function cummax has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
> In path (line 109)
In addpath (line 88)
In vl_setup (line 58)
Warning: Function det has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
> In path (line 109)
In addpath (line 88)
In vl_setup (line 58)
Warning: Function cummax has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
> In path (line 109)
In addpath (line 88)
In vl_setup (line 59)
Warning: Function det has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
> In path (line 109)
In addpath (line 88)
In vl_setup (line 59)
Warning: Function cummax has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
> In path (line 109)
In addpath (line 88)
In vl_setup (line 60)
Warning: Function det has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
> In path (line 109)
In addpath (line 88)
In vl_setup (line 60)
Warning: Function cummax has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
> In path (line 109)
In addpath (line 88)
In vl_setup (line 61)
Warning: Function det has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
> In path (line 109)
In addpath (line 88)
In vl_setup (line 61)
Warning: Function cummax has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
> In path (line 109)
In addpath (line 88)
In vl_setup (line 62)
Warning: Function det has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
> In path (line 109)
In addpath (line 88)
In vl_setup (line 62)
Warning: Function cummax has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
> In path (line 109)
In addpath (line 88)
In vl_setup (line 63)
Warning: Function det has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
> In path (line 109)
In addpath (line 88)
In vl_setup (line 63)
Warning: Function cummax has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
> In path (line 109)
In addpath (line 88)
In vl_setup (line 64)
Warning: Function det has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
> In path (line 109)
In addpath (line 88)
In vl_setup (line 64)
Warning: Function cummax has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
> In path (line 109)
In addpath (line 88)
In vl_setup (line 65)
Warning: Function det has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
> In path (line 109)
In addpath (line 88)
In vl_setup (line 65)
Warning: Function cummax has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
> In path (line 109)
In addpath (line 88)
In vl_setup (line 66)
Warning: Function det has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
> In path (line 109)
In addpath (line 88)
In vl_setup (line 66)
Warning: Function cummax has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
> In path (line 109)
In addpath (line 88)
In vl_setup (line 67)
Warning: Function det has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
> In path (line 109)
In addpath (line 88)
In vl_setup (line 67)
Warning: Function cummax has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
> In path (line 109)
In addpath (line 88)
In vl_setup (line 68)
Warning: Function det has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
> In path (line 109)
In addpath (line 88)
In vl_setup (line 68)
Warning: Function cummax has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
> In path (line 109)
In addpath (line 88)
In vl_setup (line 69)
Warning: Function det has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
> In path (line 109)
In addpath (line 88)
In vl_setup (line 69)
Warning: Function cummax has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
> In path (line 109)
In addpath (line 88)
In vl_setup (line 78)
Warning: Function det has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
> In path (line 109)
In addpath (line 88)
In vl_setup (line 78)
>> vl_vlad
Invalid MEX-file 'F:\PhD\Firstyear\ProjectML\Code\vlfeat\toolbox\mex\mexw64\vl_vlad.mexw64': The specified module could not be found..

MatlabUserN

unread,
Oct 13, 2017, 9:59:20 AM10/13/17
to
Issue resolve by installing VS2015 complete .
:D cheers



"MatlabUserN" wrote in message <oe3qun$lk4$1...@newscl01ah.mathworks.com>...

aryam...@gmail.com

unread,
Nov 20, 2017, 2:45:14 PM11/20/17
to
Thank you so much! Literally searched everywhere for this

rizwanc...@gmail.com

unread,
Feb 28, 2018, 11:49:20 PM2/28/18
to
My problem solved..... RET2014 is up and running.....

THankyou Yixin Du

peace...@gmail.com

unread,
Apr 8, 2019, 7:45:51 PM4/8/19
to
Hello,
I have MATLAB 2013b on a windows 10 64 bit system. Will your steps work there also? I get the same error while trying to run a MEX file:"Invalid MEX-file: The specified module could not be found"

Also tell me if this is the right path to toolboxes:
C:\Program Files\MATLAB\R2013b\toolbox
If so...i canot find the files vl_compile.m and vl_setup.m there????
Thanks a lot
0 new messages