comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: How to add standard gaussian noise to a image pixel
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: How to add standard gaussian noise to a image pixel [message #42182] Thu, 06 January 2005 08:01
coold is currently offline  coold
Messages: 8
Registered: December 2004
Junior Member
Can you please suggest how I can add standard gaussian noise with
zero mean and standard deviation of different values like .5, 1,1.5 in
IDL to a pixel using randomn()
The following code
nx=60
ny=60
nz=100
noisy[*,*,*] = original[*,*,*] + randomn(seed,nx,ny,nz) does seem to
work.
Thanks.
coold
Re: How to add standard gaussian noise to a image pixel [message #42188 is a reply to message #42182] Wed, 05 January 2005 12:54 Go to previous message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <1104952168.802765.153500@c13g2000cwb.googlegroups.com>,
"coold" <rodricks_is@yahoo.com> wrote:

> Could you please suggest how I can add standard gaussian noise with
> zero mean and standard deviation of different values like .5, 1,1.5 in
> IDL
>
> I have tried the following as mentioned in IDL help guide
> nx=60
> ny=60
> nz=100
> noisy[*,*,*] = original[*,*,*] + randomn(seed,nx,ny,nz)
>
> But the spectrum(output) I get for each pixel is not like expected.
> Thanks for any help.
> coold
>

It looks like uncorrelated Gaussian noise to me:

IDL> nx=60
IDL> ny=60
IDL> nz=100
IDL> r = randomn(seed,nx,ny,nz)
IDL> help, r
R FLOAT = Array[60, 60, 100]
IDL> print, mean(r)
% Compiled module: MEAN.
% Compiled module: MOMENT.
-0.00114778
IDL> print, stdev(r)
% Compiled module: STDEV.
0.999860
IDL> plot, histogram(r,nbins=100)
IDL> plot, r, shift(r,1), psym=3, /isotropic

Ken Bowman
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: double tick marks
Next Topic: Re: CW_FILESEL size

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 11:22:23 PDT 2025

Total time taken to generate the page: 0.24008 seconds