声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 1368|回复: 1

[编程技巧] imhist函数的错误

[复制链接]
发表于 2007-5-13 19:50 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
大家好!我在做MATLAB有关直方图时遇到一个有关路径的问题!当调用系统自带的图像时没问题;程序如下:
>> I=imread('pout.tif');
>> subplot(121);
>> imshow(I);
>> subplot(122);
>> imhist(I);

>> J=imread('E:\Matlab7.x图像处理 光盘内容\1.bmp');
>> subplot(121);
>> imshow(J);
>> subplot(122);
>> imshow(J);
>> imhist(J);
??? Error using ==> c:/matlab6p5/toolbox/images/images/private/checkinput (check_attributes)
Function imhist expected its first input argument, I or X,
to be two-dimensional.
Error in ==> C:\MATLAB6p5\toolbox\images\images\private\checkinput.m
On line 37  ==> check_attributes(A, attributes, function_name, variable_name, ...
Error in ==> C:\MATLAB6p5\toolbox\images\images\imhist.m (parse_inputs)
On line 173  ==> checkinput(a, 'double uint8 logical uint16', '2d', mfilename, 'I or X', 1);
Error in ==> C:\MATLAB6p5\toolbox\images\images\imhist.m
On line 49  ==> [a, n, isScaled, top, map] = parse_inputs(varargin{:});
谁能帮我看一下其中的错误?谢谢了!
回复
分享到:

使用道具 举报

发表于 2007-5-13 23:58 | 显示全部楼层
原帖由 纪晓宁 于 2007-5-13 19:50 发表
大家好!我在做MATLAB有关直方图时遇到一个有关路径的问题!当调用系统自带的图像时没问题;程序如下:
>> I=imread('pout.tif');
>> subplot(121);
>> imshow(I);
>> subplot(122);
>> imhist(I);

>> J=i ...



Function imhist expected its first input argument, I or X,
to be two-dimensional.

写得很清楚了
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-9-24 11:32 , Processed in 0.061117 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表