Horus Doc || C++ Reference || Class Overview   Pixels   Images   Detector   Geometry   Registry || Doxygen's quick Index  

HxAddUniformNoise.h File Reference

More...

Go to the source code of this file.

Functions

HxImageRep L_HXIMAGEREP HxAddUniformNoise (HxImageRep im)
 Add uniform noise to an image. More...


Detailed Description


Function Documentation

HxImageRep L_HXIMAGEREP HxAddUniformNoise (  HxImageRep    im ) 
 

Add uniform noise to an image.

Press, W.H., Teukolsky, S.A., Vetterling, W.T., and Flannery, B.P. Numerical Recipes in C, 2nd edition, Cambridge University Press, Cambridge, 1992.

00016 {
00017     HxSizes sz = im.sizes();
00018     HxTagList   tags;
00019     HxAddTag(tags, "size", sz);
00020     HxAddTag(tags, "seed", -3);
00021 
00022     HxImageRep noiseIm =  HxImageFactory::instance().fromNamedGenerator(
00023             HXIMAGESIG2DDOUBLE, "uniformNoise", tags);
00024     //the noise image has values in the range (0,1)
00025 //  double maxVal = HxPixMax(im);
00026     noiseIm = HxMulVal(noiseIm, HxPixMax(im));
00027 
00028     return HxAdd(noiseIm,im);
00029 
00030 //  return HxMul(im, noiseIm);
00031 
00032 }


Generated on Tue Feb 3 14:18:45 2004 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001