I'm getting error with imresize. Same code was completely run at 2010a but while I'm trying with 2014b returns with error.

13 views (last 30 days)
>> untitled
{}
Error using imresize
Expected input number 1, A, to be nonempty.
Error in imresize>parsePreMethodArgs (line 333)
validateattributes(A, {'numeric', 'logical'}, {'nonsparse', 'nonempty'}, mfilename, 'A', 1);
Error in imresize>parseInputs (line 248)
[params.A, params.map, params.scale, params.output_size] = ...
Error in imresize (line 141)
params = parseInputs(varargin{:});
Error in canny (line 42)
im = imresize(im, scaling);
Error in findline (line 23)
[I2 or] = canny(image, 2, 1, 0.00, 1.00);
Error in segmentiris (line 106)
lines = findline(topeyelid);
Error in untitled>pushbutton2_Callback (line 101)
[circleiris, circlepupil, imagewithnoise] = segmentiris(handles.output);
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in untitled (line 42)
gui_mainfcn(gui_State, varargin{:});
Error in @(hObject,eventdata)untitled('pushbutton2_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback

Answers (1)

Walter Roberson
Walter Roberson on 28 Apr 2016
You are passing an empty array topeyelid to segmentiris
It appears that you are relying upon handles.output to be non-empty while you are still inside your GUI. handles.output is not normally set to non-empty until the GUI is shutting down. That is not a hard rule, but it is unusual enough to be worth investigating.

Community Treasure Hunt

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

Start Hunting!