MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: how to write an ImageEffect filter?


Hi,

do it yourself:

AddPoissonNoise[img_Image?(ImageChannels[#] === 1 &), \[Lambda]_] := 
 Image[Map[ Min[255, #] &,
   ImageData[img, "Byte"] + 
    RandomInteger[PoissonDistribution[\[Lambda]], 
     ImageDimensions[img]], {2}], "Byte"]

img = Image[
  Graphics[{Gray, Disk[]}, Background -> Black, ImageSize -> 128], 
  "Byte", ColorSpace -> "Grayscale"]
noiseimg = AddPoissonNoise[img, 10]
ImageAdjust@ImageSubtract[noiseimg, img]

Cheers
Patrick

On Wed, 2010-01-13 at 05:58 -0500, sibir wrote:
> The function ImageEffect allows to add noise to an image, however the
> options are very limited: only uniform, Gaussian and salt&pepper. I
> need to add Poisson noise. it should be straitforward to to create
> that filter by modifying the Gaussian, but I am not bale to find any
> documentation.
> 
> Anybody out there with a clue?
> 



  • Prev by Date: Re: disable canceling
  • Next by Date: Re: Rotated text labels
  • Previous by thread: how to write an ImageEffect filter?
  • Next by thread: Re: how to write an ImageEffect filter?