1、附 录Part1:对cameraman原始图像处理的仿真程序:V=0.009;X=imnoise(A,gaussian,0,V);function jingdianI=imread(lenna.bmp);I1=imnoise(I,salt & pepper);%添加椒盐噪声,默认值为0.02figure,imshow(I1);%添加均值为0、方差0.002的高斯噪声title(添加椒盐噪声后原图)B1=edge(I1,roberts);B2=edge(I1,sobel);B3=edge(I1,prewitt);B4=edge(I1,canny);B5=edge(I1,log);subplot(
2、2,3,1);imshow(B1);title(roberts算子检测);subplot(2,3,2);imshow(B2);title(sobel算子检测);subplot(2,3,3);imshow(B3);title(prewitt算子检测);subplot(2,3,4);imshow(B4);title(canny算子检测);subplot(2,3,5)imshow(B5);title(log算子检测);B1=edge(I1,roberts);%调用roberts算子检测图像B2=edge(I1,sobel);%调用soble算子进行边缘检测B3=edge(I1,prewitt);%调
3、用prewitt算子进行边缘检测B4=edge(I1,canny);%调用canny算子对图像进行边缘检测B5=edge(I1,log);%调用log算子对图像进行边缘检测subplot(2,3,1);%设置图像布局imshow(B1);title(roberts算子检测);%现实图像并命名为roberts算子检测subplot(2,3,2);imshow(B2);title(sobel算子检测);subplot(2,3,3);imshow(B3);title(prewitt算子检测);subplot(2,3,4);imshow(B4);title(canny算子检测);subplot(2,3,5)imshow(B5);title(log算子检测);subplot(2,3,6);