用MATLAB做高斯滤波imnoise用法怎么不对h=imread('C:\Users\CRD\Desktop\robot\Images\lena.tif'); c=mat2gray(h); figure,imshow(c),title('原始图象'); %显示原始图象g=imnoise(c,'gaussian',0,0.01); %加入高斯噪声figure,imshow(g),tit
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/24 01:46:36
用MATLAB做高斯滤波imnoise用法怎么不对h=imread('C:\Users\CRD\Desktop\robot\Images\lena.tif'); c=mat2gray(h); figure,imshow(c),title('原始图象'); %显示原始图象g=imnoise(c,'gaussian',0,0.01); %加入高斯噪声figure,imshow(g),tit
用MATLAB做高斯滤波imnoise用法怎么不对
h=imread('C:\Users\CRD\Desktop\robot\Images\lena.tif');
c=mat2gray(h);
figure,imshow(c),title('原始图象'); %显示原始图象
g=imnoise(c,'gaussian',0,0.01); %加入高斯噪声
figure,imshow(g),title('加入高斯噪声之后的图象'); %显示加入高斯噪声之后的图象n3=input('请输入高斯滤波器的均值\n');
k=input('请输入高斯滤波器的方差\n');
A2=fspecial('gaussian',k,n3); %生成高斯序列
Y5=filter2(A2,g)/255; %用生成的高斯序列进行滤波
figure,imshow(Y5),title('用Matlab函数进行高斯滤波之后的结果'); %显示滤波后的图象
结果显示
g=imnoise(c,'gaussian',0,0.01);?%加入高斯噪声
|
Error:Expression or statement is incomplete or incorrect.
但我觉得imnoise用法没错啊,
用MATLAB做高斯滤波imnoise用法怎么不对h=imread('C:\Users\CRD\Desktop\robot\Images\lena.tif'); c=mat2gray(h); figure,imshow(c),title('原始图象'); %显示原始图象g=imnoise(c,'gaussian',0,0.01); %加入高斯噪声figure,imshow(g),tit
g=imnoise(c,'gaussian',0,0.01); %加入高斯噪声 这句没法运行吗?
我机子上可以啊,这句是对的