how to solve the imresize syntax error when the syntax is right as i have checked it ?

2 次查看(过去 30 天)
the error is given below
??? Error using ==> imresize>parsePreMethodArgs at 333 Invalid input syntax; input image missing from argument list.
Error in ==> imresize>parseInputs at 257 [params.A, params.map, params.scale, params.output_size] = ...
Error in ==> imresize at 141 params = parseInputs(varargin{:});
Error in ==> test1>pushbutton1_Callback at 102 k1=imresize(k,[300,300]);
Error in ==> gui_mainfcn at 96 feval(varargin{:});
Error in ==> test1 at 41 gui_mainfcn(gui_State, varargin{:});
Error in ==> @(hObject,eventdata)test1('pushbutton1_Callback',hObject,eventdata,guidata(hObject))
??? Error while evaluating uicontrol Callback
  2 个评论
Image Analyst
Image Analyst 2015-12-31
Put this on line 102, right before you call imresize()
whos k
What does it show in the command window. Is the badly-named k a 2-D gray scale array, or a 3-D true color RGB image?

请先登录,再进行评论。

采纳的回答

Walter Roberson
Walter Roberson 2015-12-31
You have passed in the name of an image instead of passing in the image itself.
In your code you have
k=handles.pic;
p=handles.pic1;
Make that
k = imread(handles.pic);
p = imread(handles.pic1);
  1 个评论
Adnan Saify
Adnan Saify 2015-12-31
thanx a lot it helped a lot but i am not getting rid of following errors(attached updated file)
??? Reference to non-existent field 'result'.
Error in ==> test1>pushbutton1_Callback at 151 set(handles.result,'String',total_matched_percentage);
Error in ==> gui_mainfcn at 96 feval(varargin{:});
Error in ==> test1 at 41 gui_mainfcn(gui_State, varargin{:});
Error in ==> @(hObject,eventdata)test1('pushbutton1_Callback',hObject,eventdata,guidata(hObject))
??? Error while evaluating uicontrol Callback

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by