Go to the source code of this file.
Functions | |
| HxImageRep L_HXIMAGEREP | HxAddPoissonNoise (HxImageRep im, double conversionFactor) |
| Add Poisson noise to an image. More... | |
|
||||||||||||
|
Add Poisson noise to an image. Numerical Recipes in C, 2nd edition, Cambridge University Press, Cambridge, 1992.
00028 {
00029 HxSizes sz = im.sizes();
00030 HxTagList tags;
00031 HxAddTag(tags, "size", sz);
00032 HxAddTag(tags, "seed", -3);
00033 HxAddTag(tags, "mean", conversionFactor);
00034
00035 HxImageRep noiseIm = HxImageFactory::instance().fromNamedGenerator(
00036 HXIMAGESIG2DDOUBLE, "poissonNoise", tags);
00037
00038 noiseIm = HxMulVal(noiseIm, HxPixMax(im));
00039
00040 return HxAdd(noiseIm,im);
00041
00042 // return HxMul(im, noiseIm);
00043 }
|
1.2.12 written by Dimitri van Heesch,
© 1997-2001