imnoise does not work as expected
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
imnoise(a, 'gaussian', mean, var) seems simple enough in concept: add a Gaussian distribution of noise to an image. However, it does not recover the values expected.
Try: >> a = zeros(16, 16); b = imnoise(a, 'gaussian', 0, 0.1); >> mean(b(:)) ans = 0.1262 >> std(b(:))^2 ans = 0.040
The mean is not zero! The variance is not 0.1!
I can't figure out why the imnoise code produces this result. The code snippet is below.
switch code case 'gaussian' % Gaussian white noise b = a + sqrt(p4)*randn(sizeA) + p3;
If a = 0 and p3 = 0, then the result should have a mean value of zero.
Answers?
0 Commenti
Risposta accettata
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Image Processing and Computer Vision in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!