Error using images.internal.parseNonStringInputsEdge
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentario
Walter Roberson
el 26 de Jun. de 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?
Respuestas (2)
Jess Lovering
el 26 de Jun. de 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 comentarios
Walter Roberson
el 28 de Jun. de 2017
I just grabbed the code from the page about their paper at https://sites.google.com/site/alessiaamelio/software-tools/gencut-an-evolutionary-and--graph-based-method-for-image-segmentation
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
el 28 de Jun. de 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)
Walter Roberson
el 29 de Jun. de 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 comentario
Walter Roberson
el 29 de Jun. de 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:
- Do not attempt to execute it while "dbstop if error" is set; or
- You could probably put a replacement gaplotrange function onto your MATLAB path that did not happen to call errorbar()
Ver también
Categorías
Más información sobre Image Processing Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!