Go to the source code of this file.
Functions | |
| HxImageRep L_HXIMAGEREP | HxAddGaussianNoise (HxImageRep im, double mean, double stdev) |
| Add Gaussian noise to an image. More... | |
|
||||||||||||||||
|
Add Gaussian 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", mean);
00034 HxAddTag(tags, "stdev", stdev);
00035
00036 HxImageRep noiseIm = HxImageFactory::instance().fromNamedGenerator(
00037 HXIMAGESIG2DDOUBLE, "gaussianNoise", tags);
00038
00039 noiseIm = HxMulVal(noiseIm, HxPixMax(im));
00040
00041 return HxAdd(noiseIm,im);
00042
00043 // return HxMul(im, noiseIm);
00044 }
|
1.2.12 written by Dimitri van Heesch,
© 1997-2001