Error message in matlab code???

4 ビュー (過去 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 Center および File ExchangeBlue についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by