|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
书上的例子中值滤波图像处理却报错了,请问是哪里不对吗?请教大神,非常感谢!+ R2 U/ R+ V% W4 t# g0 W: W8 L
# s/ g6 P6 M8 R: n/ O; {
' P6 N" C; H4 W5 m8 T4 C( c
I=imread('C:\Users\Xu\Desktop\timg','jpg');+ B8 d, k4 M5 t6 ^+ A
I=imnoise(I,'salt & pepper',0.1);0 r, T& X! D: _# _9 i
subplot(121);imshow(I)
/ x2 q' z6 n" Q* D/ Ke=medfilt2(I);
' Y& R, }5 e# X$ F6 C0 Y& Ksubplot(122);: _. p4 k" o$ _* }: V4 D- a4 F
imshow(e)2 a# d5 J% X" U+ h" B
+ S3 H# B* y! m) ]5 d) V% |
报错:Error using medfilt2
$ ?9 [& X+ S( c& TExpected input number 1, A, to be two-dimensional., n$ v( v U' n$ r
Error in medfilt2>parse_inputs (line 107)
: c$ ]3 {3 z7 h, pvalidateattributes(a, ...
% \4 S% Q8 I! {/ `9 j3 YError in medfilt2 (line 48)
1 z8 E2 [& g' Z0 Q) d6 \[a, mn, padopt] = parse_inputs(varargin{:});. j' ~8 I7 Q% a: Q
Error in Untitled (line 7)
& ^3 } l* c# I( {3 }; B9 W0 ce=medfilt2(I); |
|