This question shows research effort; it is useful and clear
-1
This question does not show any research effort; it is unclear or not useful
Bookmark this question.
Show activity on this post.
我制作了这段代码,任何人都可以告诉我这是正确的,我该如何验证它。
I=imread('cameraman.tif');
[M N]=size(I);
for i=2:M-1
for j=2:N-1
x=I(i-1,j);
y=I(i+1,j);
z=I(i,j-1);
zz=I(i,j+1);
A=[x y z zz];
J(i,j)=median(A);
end
end