Go to the source code of this file.
| Functions | |
| HxImageRep L_HXIMAGEREP | HxAddBinaryNoise (HxImageRep im, double percent=0.2) | 
| Add binary noise to an image. More... | |
| 
 | ||||||||||||
| Add binary 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, "percent", percent);
00034 
00035     HxImageRep noiseIm =  HxImageFactory::instance().fromNamedGenerator(
00036             HXIMAGESIG2DDOUBLE, "binaryNoise", 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
1.2.12 written by Dimitri van Heesch,
 © 1997-2001