如何用matlab实现区分高斯噪声和椒盐噪?
如何用matlab实现区分高斯噪声和椒盐噪声
下边是一个反色的源程序,麻烦改几个函数,加入高斯噪声和椒盐噪声 #include #include #include #define Width 256 #define Height 256 main() { FILE *FileOpen(),*in,*out; unsigned char *image0,*image1; unsigned char head[1078]; int i,j,nLen; image0=(unsigned char *)malloc(Width*Height); image1=(unsigned char *)malloc(Width*Height); in=FileOpen("pgirl。
bmp","rb"); out=FileOpen("pgirlr。
bmp","wb"); fread(head,1078,1,in); fwrite(head,1078,1,out); fread(image0,Width*Height,1,in); for(i=0;i
答:T=1:0.001:10; k=1+0.2*randn(1,length(T));% 生成“高斯噪声”. plot(T,k);详情>>