% 利用邻域的任意一点代替当前像素点
N=3;
Image=imfilter(Image,F_gaussian,‘conv‘);
Image_out=Image;
for i=1+N:height-N
for j=1+N:width-N
k1=rand()-0.5;
k2=rand()-0.5;
m=(k1*(N*2-1));
n=(k2*(N*2-1));
h=floor(mod(i+m,height));
w=floor(mod(j+n,width));
if w==0;
w=width;
end
if h==0
h=height;
end
Image_out(i,j,:)=Image(h,w,:);
end
end
imshow(Image_out/255);