how to implement a MATLAB function to add Gaussian noise ?
Show older comments
I need to implement a function in Matlab to add Gaussian noise to an image let's say cameraman.tif but without using imnoise
Thanks in advance
Answers (3)
Rick Rosson
on 7 Apr 2012
>> doc randn
Rick Rosson
on 7 Apr 2012
function y = addWhiteNoise(x,snr)
%
% snr is the signal-to-noise ratio expressed in decibels
%
stdev = ...
z = stdev*randn(size(x));
y = x + z;
end
Rick Rosson
on 7 Apr 2012
0 votes
Hi Mina,
What have you done so far? Please post your code.
Thanks!
Rick
Categories
Find more on Descriptive Statistics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!