00001 00027 #ifndef __VETLIB_VETNOISEGENERATOR_H__ 00028 #define __VETLIB_VETNOISEGENERATOR_H__ 00029 00030 #include "../vetDefs.h" 00031 #include "../vetInput.h" 00032 00033 #include "../PixelRGB96.h" 00034 #include "../PixelRGB24.h" 00035 #include "../PixelHSV.h" 00036 #include "../vetFrameGrey.h" 00037 00038 #include "../vetFrameYUV420.h" 00039 #include "../vetFrameRGB24.h" 00040 #include "../vetFrameT.h" 00041 00042 00043 class vetNoiseGenerator : public vetInput 00044 { 00045 00046 protected: 00047 00051 int v_runmode; 00052 00056 bool normalized; 00057 00061 float spread; 00062 00066 int normalize_value; 00067 00068 00069 public: 00070 00074 enum RUNMODE { TIMEBASED, 00075 BOOH }; 00076 00077 00084 vetNoiseGenerator(float fps = 0); 00085 00093 vetNoiseGenerator(RUNMODE runm, float fps); 00094 00100 VETRESULT reset(); 00101 00105 void resetNoiseSource(); 00106 00112 static PixelRGB96 getRandomPixelRGB96(); 00113 00120 static PixelRGB24 getRandomPixelRGB24(); 00121 00127 static PixelHSV getRandomPixelHSV(); 00128 00134 static PixelGrey getRandomPixelGrey(); 00135 00136 00141 unsigned int getWidth() const { return 0; }; 00142 00147 unsigned int getHeight() const { return 0; }; 00148 00154 bool EoF() { return false; }; 00155 00167 VETRESULT extractTo(vetFrameYUV420& img); 00168 00180 VETRESULT extractTo(vetFrameRGB24& img); 00181 00193 VETRESULT extractTo(vetFrameT<unsigned char>& img); 00194 00195 }; 00196 00197 00198 #endif //__VETLIB_VETNOISEGENERATOR_H__
1.4.4