Error using images.int​ernal.pars​eNonString​InputsEdge

2 views (last 30 days)
Error using images.internal.parseNonStringInputsEdge (line 31) Too many input arguments.
Error in edge>parse_inputs (line 520) [Thresh,Sigma,H,kx,ky] = images.internal.parseNonStringInputsEdge(varargin,Method,Direction,nonstr);
Error in edge (line 208) [a,method,thresh,sigma,thinning,H,kx,ky] = parse_inputs(varargin{:});
Can someone help me please?
  1 Comment
Walter Roberson
Walter Roberson on 26 Jun 2017
You need to show the code that calls edge
Are you doing image processing or are you doing Classifier work? Which MATLAB version are you using?

Sign in to comment.

Answers (2)

Jess Lovering
Jess Lovering on 26 Jun 2017
I would need more information to really help here, but I often get "Too many input arguments" errors when I am passing the wrong information to a function, such as giving a number without the attribute name or giving a number when it needs a string, etc. Make sure to check your syntax and that you are passing the right variable types in the expected order.
  3 Comments
Walter Roberson
Walter Roberson on 28 Jun 2017
It turns out that they have coded in a 2008 version of MATLAB's eigs that will not work with R2013a or later (and might fail before that too, I did not check.) I describe that particular problem at https://www.mathworks.com/matlabcentral/answers/320726-error-in-using-eigs-error-using-arpackc-expect-2-output-arguments#answer_272276
Walter Roberson
Walter Roberson on 28 Jun 2017
The command line you pasted has several invalid characters in it. A valid line is
Seg=procedureGeNCut('images/1.jpg','results/1.jpg',35,40,0.001,2,1,0.5,0.9,200,100)

Sign in to comment.


Walter Roberson
Walter Roberson on 29 Jun 2017
Somewhere in the code computeContours.p which we cannot look at, it is calling
edge(SomeMatrix, 'canny', 0.001, 2, 'nothinning')
this is an error (at least in recent releases) because the 'nothinnning' option is defined for 'sobel' and 'prewitt' and 'roberts' but not for 'log' or 'zerocross' or 'canny' or 'approxcanny' . This is documented even back in R2008b but you have to be reading carefully to notice that the option is not listed.
As you cannot change the call that the .p file makes, the alternative is to either edit Mathworks' edge.m; or else introduce your own edge.m earlier on the path that just detects the combination of options and calls into the Mathwork's version. The change to be made would be to check if 'canny' was being used and length(varargin) is 5, in which case you delete varargin(5) before passing through the argument parsing stage.
  1 Comment
Walter Roberson
Walter Roberson on 29 Jun 2017
I have just submitted a case report to Mathworks about a problem I encountered while attempting to debug the above code. When "dbstop if error" is in effect, I was told
Error using *
Inner matrix dimensions must agree.
Error in matlab.graphics.chart.primitive.ErrorBar/getXYZDataExtents
Error in title (line 54)
h = get(ax,'Title');
Error in gaplotrange (line 33)
title('Best, Worst, and Mean Scores','interp','none')
Error in gadsplot>callOnePlotFcn (line 222)
optimvalues = plotfcn(varargin{1:end});
Error in gadsplot (line 162)
[state,optimvalues] = callOnePlotFcn(fname,plotNames{i},state,options.OutputPlotFcnOptions,optimvalues,'init',args{i}{:});
Error in gaunc (line 53)
state = gadsplot(options,state,currentState,'Genetic Algorithm');
Error in ga (line 371)
[x,fval,exitFlag,output,population,scores] = gaunc(FitnessFcn,nvars, ...
Error in clusterImage
Error in procedureGeNCut
This appears to be an internal MATLAB problem in constructing errorbars.
In the context of the indicated software package, the only two work-arounds I can think of are:
  1. Do not attempt to execute it while "dbstop if error" is set; or
  2. You could probably put a replacement gaplotrange function onto your MATLAB path that did not happen to call errorbar()

Sign in to comment.

Categories

Find more on Image Processing Toolbox in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!