1

I try to make use of VLFeat library. So, I've downloaded the package and run vl_setup script. But when I create a new script and type this code:

I = imread('imhog.jpg');
image(I) ;

I = single(rgb2gray(I)) ;

[f,d] = vl_sift(I) ;

perm = randperm(size(f,2)) ;
sel = perm(1:50) ;
h1 = vl_plotframe(f(:,sel)) ;
h2 = vl_plotframe(f(:,sel)) ;
set(h1,'color','k','linewidth',3) ;
set(h2,'color','y','linewidth',2) ;

h3 = vl_plotsiftdescriptor(d(:,sel),f(:,sel)) ;
set(h3,'color','g') ;

it gives such error:

vl_sift('imhog.jpg')

Undefined function or variable 'vl_sift'.

toolic
  • 57,801
  • 17
  • 75
  • 117
sapio_l
  • 21
  • 7
  • 1
    Did you compile the VLFeat library from source or did you download the pre-compiled binaries? Also, when you ran `vl_setup`, what exactly is the output? The error can mean many things. Please give us more. – rayryeng Oct 07 '15 at 15:15
  • Either the VLFeat library is not added to MATLAB `path` or the files have not been mex-ed properly i.e. the `vl_setup` script didn't finish successfully. – Autonomous Oct 07 '15 at 17:51
  • When I press button run in vl_setup script, it works,at least it does not give any error message in this case. When I choose as a folder ..../vl_feat/toolbox and type in command shell run('..../vlfeat-master/toolbox/vl_setup') it does not give any message too. But here in this link - http://www.vlfeat.org/install-matlab.html, it writes that it has to be an output such as VLFeat 0.9.17 ready. – sapio_l Oct 08 '15 at 06:32
  • Then I've created a new script and typed above code, but whatever I choose as a path in a search folder, I cann't run vl_sift. @rayryeng – sapio_l Oct 08 '15 at 06:45
  • By the way, I use Matlab trial version...@ParagS.Chandakkar – sapio_l Oct 08 '15 at 06:48
  • @sapio_l - Did you ensure that your MEX compiler is set up? Did you do `mex -setup`? – rayryeng Oct 08 '15 at 06:58
  • The problem is I did not get how to do it even in this link: http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html?refresh=true I typed mex -setup and got: MEX configured to use 'Visual C++ 2015 Professional (C)' for C language compilation. Warning: The MATLAB C and Fortran API has changed to support MATLAB variables with more than 2^32-1 elements.You will be required to update your code to utilize the new API. To choose a different language, select one from the following: mex -setup C++ mex -setup FORTRAN @rayryeng – sapio_l Oct 08 '15 at 07:11

0 Answers0