help-octave
[Top][All Lists]
Advanced

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

Re: Not getting Poisson Noise in octave


From: Carnë Draug
Subject: Re: Not getting Poisson Noise in octave
Date: Mon, 3 Dec 2012 00:14:55 +0100

On 3 December 2012 00:05, Terry Duell <address@hidden> wrote:
> 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.

Hey,

I'd be most thankful if you could submit a patch to add this to the
image package. The imnoise function already exists in the image
package, it's just missing this option. There's a switch block for the
type so should be very easy to implement it. Just send me a patch (or
better, post it on the
https://sourceforge.net/p/octave/feature-requests/ tracker) and I'll
make the commit.

Thanks,
Carnë


reply via email to

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