[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Not getting Poisson Noise in octave

From: Terry Duell
Subject: Re: Not getting Poisson Noise in octave
Date: Mon, 03 Dec 2012 10:05:48 +1100
User-agent: Opera Mail/12.11 (Linux)

On Sun, 02 Dec 2012 18:53:41 +1100, c. <address@hidden> wrote:

On 2 Dec 2012, at 06:13, Sivahari Nandakumar wrote:

Hi all,

I am not getting imnoise(j,'poisson') in octave. My friends have it in Matlab. Is there any alternative for it in Octave?

according to what I see in matlabs imnoise docs you could try something like:

aa = imread ("someimage.jpg");
bb = uint8 (arrayfun (@poissrnd, aa));
subplot (1, 2, 1)
imshow (aa)
subplot (1, 2, 2)
imshow (bb)

beware, it may take some time ...

You could also try something like this...

bb = aa + 3/256*randn(h,w);
where h,w are the height, width of aa.

The first approach takes 13.74 sec here, for my little test image. The second takes about 0.01 sec. The results appear quite similar, but I guess it depends on your particular need.

Terry Duell

reply via email to

[Prev in Thread] Current Thread [Next in Thread]