Reputation: 43
I am doing text detection from an image which have perspective view. vl_feat
is good for this.
but i got some error:
Attempt to execute SCRIPT vl_mser as a function:
H:\maincode\vl_mser.m
Error in ==> TextDetection at 47
[r,f] = vl_mser(Gray_image,'MinDiversity',0.7,'MaxVariation',0.2,'Delta',10);
Any one can you help me to avoid this error and run the code
thanks for your help sir .I avoided multiple identically-named .m files and run the program L got the error like this and i changed it After that i run the program.I got the output but while taking the MSER error occurred and given below Automatic Text Detection: Starting DEMO... Automatic Text Detection: Ready.
Warning: Name is nonexistent or not a directory: H:\mainproject\codes\RET_2014-master\Files\vlfeat\toolbox\mex\mexw32.
In path at 110 In addpath at 87 In vl_setup at 78 In run at 57 In TextDetectionDemo>pushbutton1_Callback at 128 In gui_mainfcn at 96 In TextDetectionDemo at 42 In @(hObject,eventdata)TextDetectionDemo('pushbutton1_Callback',hObject,eventdata,guidata(hObject)) ??? Attempt to execute SCRIPT vl_mser as a function: H:\mainproject\codes\RET_2014-master\Files\vlfeat\toolbox\mser\vl_mser.m
Error in ==> TextDetectionDemo>pushbutton1_Callback at 134 [r,f] = vl_mser(Gray_image,'MinDiversity',MinDiversity,'MaxVariation',MaxVariation,'Delta',Delta) ;
Error in ==> gui_mainfcn at 96 feval(varargin{:});
Error in ==> TextDetectionDemo at 42 gui_mainfcn(gui_State, varargin{:});
Error in ==> @(hObject,eventdata)TextDetectionDemo('pushbutton1_Callback',hObject,eventdata,guidata(hObject))
??? Error while evaluating uicontrol Callback
Anyone can help me to clear this pls..
Upvotes: 1
Views: 161
Reputation: 7817
It is likely that you have either made changes to vl_mser.m
(e.g. added code above the function definition), or that you have two files named vl_mser.m
and MATLAB is picking the wrong one (sometimes called "shadowing").
The code expects a function (something you can call with inputs and get outputs), and it's finding a script (something that just runs a set of statements and takes no input). If you don't understand the difference, you should read through the Mathworks help.
First, try this:
which vl_mser.m
This should show you where MATLAB is finding vl_mser.m
, the function it's trying to run.
Then this:
which vl_mser.m -all
This will show you all the files called vl_mser.m on the path.
The simplest way to resolve this is to make sure that you do not have multiple identically-named .m files.
Upvotes: 2