Error message in matlab code???

2 次查看(过去 30 天)
nedaa
nedaa 2012-9-3
??? Error using ==> iptcheckmap at 40 Function IMRESIZE expected its second input argument, MAP, to be a valid colormap. Valid colormaps cannot have values outside the range [0,1].
Error in ==> imresize>parsePreMethodArgs at 368 iptcheckmap(map, mfilename, 'MAP', 2);
Error in ==> imresize>parseInputs at 263 [params.A, params.map, params.scale, params.output_size] = ...
Error in ==> imresize at 140 params = parseInputs(varargin{:});
Error in ==> pupil_sclera at 6 x1=imresize(x,round(size(x)/2),'bicubic');
Error in ==> batch_EI_processing at 26 [a1,a2]=pupil_sclera(x);
how to fix the code????

回答(1 个)

Jan
Jan 2012-9-3
编辑:Jan 2012-9-3
Cheng line 6 in pupil_sclera from:
x1=imresize(x,round(size(x)/2),'bicubic');
to:
x1 = imresize(x, round([size(x, 1), size(x, 2)] / 2), 'bicubic');
Otherwise size(x) replies a 3D vector for RGB images and imresize expects it to be a color map. See doc imresize.

类别

Help CenterFile Exchange 中查找有关 Blue 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by