From: ImageAnalyst <>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Generate noise model[Please help]
Date: Sat, 21 Aug 2010 14:38:55 -0700 (PDT)
Lines: 29
Message-ID: <>
References: <>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: 1282426735 31105 (21 Aug 2010 21:38:55 GMT)
NNTP-Posting-Date: Sat, 21 Aug 2010 21:38:55 +0000 (UTC)
Injection-Info:; posting-host=; posting-account=0rLUzAkAAABojYSRC64DkTbtiSCX77HH
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:
 Gecko/20100722 Firefox/3.6.8,gzip(gfe)
Xref: comp.soft-sys.matlab:663995

On Aug 21, 8:44 am, Daniel <> wrote:
> I am sorry I think you get me wrong.The problem is about image processing not mathematic.I need to read in an image and generate the Rayleigh noise model from the image given that the noise is model by the pdf as written in the link below help..thx

I don't think I got you wrong.  I gave you the general method for
getting random numbers taken from whatever distribution you want.
Basically you integrate the pdf to get the cdf, invert it, and plug in
a uniform distribution.  And I gave code to do that.  That's the basic
recipe that will work for any pdf.  Of course it's easier if you know
the analytical form for the noise, like we do for the Rayleigh (I took
it from the website Walter mentioned.)  But you could do it
numerically if you had only an empirical pdf function.

What you have not given is how that noise relates to the pixel value.
Is it additive noise, where all the Rayleigh noise comes from the same
distribution with some mean that is independent of the pixel value?
Or is it value-dependent noise, for example the mean of the Rayleigh
distribution should be the pixel value, and so you need to adjust your
noise-generating function for a new mean each time you encounter a new
pixel value?  Can you answer that?  Because there is no "right" answer
that I know of.  I suspect it may be the latter but you could define
it to work however you want - not that that necessarily corresponds
with reality, but you could do it.