Error using medfilt2 Expected input number 1, A, to be two-dimensional.
Show older comments
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
Accepted Answer
More Answers (1)
Image Analyst
on 6 Jun 2021
1 vote
See my attached salt and pepper noise demos.
Categories
Find more on Image Category Classification in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




