Info

This question is closed. Reopen it to edit or answer.

I cannot run 2010 code on 2013a version (cannot open image for analysis)…Are there changes I need to be aware of when it comes to imtool?

1 view (last 30 days)
I have been diligently searching to see what changes were made in updated versions of Matlab since 2010. The program is a skelton2points program and it is functioning fine until I try to open an image to analyze and then I get nothing but errors. I have adjusted some code and eliminated a couple of the errors but I still have these…
Error using imageDisplayParseInputs (line 137) Too many input arguments.
Error in imTool/addImageToImtool (line 314) [common_args, srcObjArgs] = imageDisplayParseInputs ...
Error in imTool (line 277) [commonImgArgs, srcObjArgs] = addImageToImtool(varargin{:});
Error in Skeleton2Points>loadImage (line 289) [imToolFigureHandles, imageArgsDetails] = ...
Error in Skeleton2Points>OpenImageMenuItem_Callback (line 268) loadImage(hObject, handles, imgFileName);
Error in gui_mainfcn (line 96) feval(varargin{:});
Error in Skeleton2Points (line 42) gui_mainfcn(gui_State, varargin{:});
Error in @(hObject,eventdata)Skeleton2Points('OpenImageMenuItem_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating uimenu Callback
Does anyone have any helpful suggestions for me to continue using this analyzation program?
  2 Comments
AJ von Alt
AJ von Alt on 22 Jan 2014
This is the relevant error: "Error using imageDisplayParseInputs (line 137) Too many input arguments". You get this error when you call a function with too many inputs. This can happen when you change a function definition, but forget to update the function calls.
I would double check the function call and make sure the number of arguments matches the function definition. If it looks like the arguments match type dbstop if error in the MATLAB command window, check the value of the arguments in the workspace, and try to call the function from the command line yourself.
Anita
Anita on 22 Jan 2014
I received this message after changing the code from
iptchecknargin(0,2,num_args,mfilename);
to
narginchk(0,2);
while trying to update the code. I am not familiar with all of the precautions that need to be made when making this adjustment and you may be able to help (kinda new to this programming language). It was not showing this message until then. I was previously getting only a warning message (use narginchk instead of iptchecknargin) about this line but all of my errors and warnings were closely correlated so I ran through as much of the warning changes as I could.

Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!