matlab imnoise 用法,怎样使在matlab用imnoise函数啊 对图像有什么要求才能用imnoise函数...

答:% 可以直接用,doc imnoise rgb = imread('000.jpg'); rgb2 = imnoise(rgb,'gaussian'); subplot(121); imshow(rgb); subplot(122); imshow(rgb2);

答:你可以先试一下用rgb2gray把原来的lena图变成灰度图,再添加噪声就是黑白的了 我之前也遇到这个问题了,我的lena灰度图是从网上找的,在程序运行的时候显示不是二维的,后来用rgb2gray函数转换后就成功了,也不知道为什么,看着是灰度的,但matl...

答:1、打开Matlab,点击“新建脚本”,如下图所示。 2、在代码编辑区输入代码,先利用Imread函数读取图像,然后使用Imshow函数将图像展示出来,以便与添加噪声后的图像做对比。 3、Matlab中利用imnoise函数可以添加各种噪声,而使用“gaussian”参数就...

答:Matlab中为图片加噪声的语句: 1、J = imnoise(I,type); 2、J = imnoise(I,type,parameters); 其中,I为原图象的灰度矩阵,J为加噪声后图象的灰度矩阵; 也可以使用WGN,产生高斯白噪声; 语句如下: 1、y = wgn(m,n,p) 产生一个m行n列的高斯白...

答:用imnoise可以添加高斯、泊松、椒盐、和乘性噪声 你可以看一看imnoise的帮助文档,里面说的很清楚。 比如添加泊松噪声是没有参数的,它生成的随机数是以该像素的灰度值为均值的。 其他各种类型的参数数量也是不同的。

答:Matlab中为图片加噪声的语句:1、J = imnoise(I,type);2、J = imnoise(I,type,parameters);其中,I为原图象的灰度矩阵,J为加噪声后图象的灰度矩阵;也可以使用WGN,产生高斯白噪声;语句如下:1、y = wgn(m,n,p) 产生一个m行n列的高斯白噪声的...

答:使用imnoise函数 X=imread('D:\matlab7.1\toolbox\images\imdemos\greens.jpg'); Y=imnoise(X,'gaussian');%%默认均值为0,方差为0.01 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% A double-class image must have values between zero and one,这个问题...

答:matlab里加噪声的函数是imnoise,可以参考帮助文档里的说明。 图像噪声有很多种,下面是matlab里可以加的几种噪声: 1、gaussian 2、localvar 3、poisson 4、salt & pepper 5、speckle 例如加入salt & pepper噪声,可以这么写: I = imread('eig...

答:r=imnoise2('gaussian',100000,1,0,1); imnoise2用来产生噪声模型,上式gaussian代表噪声服从高斯分布,100000,1代表产生的噪声矩阵为100000*1大小,0代表高斯分布随机数的均值,1代表高斯分布随机数的标准偏差。 书上的r是噪声矩阵,大小为1000...

答:g=imnoise(c,'gaussian',0,0.01); %加入高斯噪声 这句没法运行吗? 我机子上可以啊,这句是对的

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
function R = imnoise2(type, varargin) %IMNOISE2 Generates an array of random numbers with specified PDF. % R = IMNOISE2(TYPE, M, N, A, B) generates an array, R, of size % M-by-N, whose elements are random numbers of the specified TYPE % with parameters A and B. If only TYPE is included in the % input argument list, a single random number of the specified % TYPE and default parameters shown below is generated. If only % TYPE, M, and N are provided, the default parameters shown below % are used. If M = N = 1, IMNOISE2 generates a single random % number of the specified TYPE and parameters A and B. % % Valid values for TYPE and parameters A and B are: % % 'uniform' Uniform random numbers in the interval (A, B). % The default values are (0, 1). % 'gaussian' Gaussian random numbers with mean A and standard % deviation B. The default values are A = 0, B = 1. % 'salt & pepper' Salt and pepper numbers of amplitude 0 with % probability Pa = A, and amplitude 1 with % probability Pb = B. The default values are Pa = % Pb = A = B = 0.05. Note that the noise has % values 0 (with probability Pa = A) and 1 (with % probability Pb = B), so scaling is necessary if % values other than 0 and 1 are required. The noise % matrix R is assigned three values. If R(x, y) = % 0, the noise at (x, y) is pepper (black). If % R(x, y) = 1, the noise at (x, y) is salt % (white). If R(x, y) = 0.5, there is no noise % assigned to coordinates (x, y). % 'lognormal' Lognormal numbers with offset A and shape % parameter B. The defaults are A = 1 and B = % 0.25. % 'rayleigh' Rayleigh noise with parameters A and B. The % default values are A = 0 and B = 1. % 'exponent
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值