Error using medfilt2 Expected input number 1, A, to be two-dimensional.
显示 更早的评论
I have an error using medfilt2, I don't know how to fix it. Please help, here I am using Matlab version R2020a.
Error starting from line 3. Here are the details of the error that appears when running :
- Error using medfilt2. Expected input number 1, A, to be two-dimensional.
- Error in medfilt2>parse_inputs (line 107). validateattributes(a, ...
- Error in medfilt2 (line 49). [a, mn, padopt] = parse_inputs(args{:});
I=imread('peppers.png');
IN=imnoise(I,'salt & pepper',0.02);
J1=medfilt2(IN,[3 3]);
J2=medfilt2(IN,[5 5]);
figure,imshow(I);
figure,imshow(IN);
figure,imshow(J1);
figure,imshow(J2);
-Thank you in advance
采纳的回答
更多回答(1 个)
Image Analyst
2021-6-6
1 个投票
See my attached salt and pepper noise demos.
类别
在 帮助中心 和 File Exchange 中查找有关 Digital Filtering 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!





