Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages | Examples

vetNoiseGenerator Class Reference

Inheritance diagram for vetNoiseGenerator:

vetInput

Public Types

enum  RUNMODE
 Available run modes.

Public Member Functions

 vetNoiseGenerator (float fps=0)
 Default constructor, frame rate is managed by vetInput class.
 vetNoiseGenerator (RUNMODE runm, float fps)
 Default constructor initialize background, frame rate is managed by vetInput class.
VETRESULT reset ()
 Reset variables and noise source.
void resetNoiseSource ()
 Reset current random generator source.
unsigned int getWidth () const
 Pixel are generated directly into output image!
unsigned int getHeight () const
 Pixel are generated directly into output image!
bool EoF ()
 Get the state of current data source.
VETRESULT extractTo (vetFrameYUV420 &img)
 Create a new noise frame with current settings.
VETRESULT extractTo (vetFrameRGB24 &img)
 Create a new noise frame with current settings.
VETRESULT extractTo (vetFrameT< unsigned char > &img)
 Create a new noise frame with current settings.

Static Public Member Functions

static PixelRGB96 getRandomPixelRGB96 ()
 Create a random RGB pixel.
static PixelRGB24 getRandomPixelRGB24 ()
 Create a random RGB24 pixel.
static PixelHSV getRandomPixelHSV ()
 Create a random HSV pixel.
static PixelGrey getRandomPixelGrey ()
 Create a random greyscale pixel.

Protected Attributes

int v_runmode
 Current run mode.
bool normalized
 do noise-value normalization
float spread
 number of pixel involved in operation [0,1]
int normalize_value
 normalization value [rand() % normalize_value]

Detailed Description

Definition at line 43 of file vetNoiseGenerator.h.


Constructor & Destructor Documentation

vetNoiseGenerator::vetNoiseGenerator float  fps = 0  ) 
 

Default constructor, frame rate is managed by vetInput class.

Parameters:
[in] fps frame rate, default is 0: max possible

Definition at line 31 of file vetNoiseGenerator.cpp.

References INFO, and reset().

vetNoiseGenerator::vetNoiseGenerator RUNMODE  runm,
float  fps
 

Default constructor initialize background, frame rate is managed by vetInput class.

Parameters:
[in] runm current runmode.
[in] fps frame rate, default is 0: max possible

Definition at line 45 of file vetNoiseGenerator.cpp.

References DEBUGMSG, reset(), and v_runmode.


Member Function Documentation

bool vetNoiseGenerator::EoF  )  [inline, virtual]
 

Get the state of current data source.

Returns:
false, always.

Implements vetInput.

Definition at line 154 of file vetNoiseGenerator.h.

VETRESULT vetNoiseGenerator::extractTo vetFrameT< unsigned char > &  img  )  [virtual]
 

Create a new noise frame with current settings.

Parameters:
[out] img Greyscale VETLib Frame to store data.
Returns:
VETRET_OK if everything is fine, VETRET_PARAM_ERR if frame is not valid.
Note:
Ouput operator (>>) call directly this function.
See also:
operator >> (vetFrameT&)

Implements vetInput.

Definition at line 228 of file vetNoiseGenerator.cpp.

References INFO, and VETRET_NOT_IMPLEMENTED.

VETRESULT vetNoiseGenerator::extractTo vetFrameRGB24 img  )  [virtual]
 

Create a new noise frame with current settings.

Parameters:
[out] img VETLib Cache24 Frame to store data.
Returns:
VETRET_OK if everything is fine, VETRET_PARAM_ERR if frame is not valid.
Note:
Ouput operator (>>) call directly this function.
See also:
operator >> (vetFrameRGB24&)

Implements vetInput.

Definition at line 180 of file vetNoiseGenerator.cpp.

References vetFrameRGB24::data, vetFrame::height, INFO, normalize_value, normalized, spread, VETRET_OK, and vetFrame::width.

VETRESULT vetNoiseGenerator::extractTo vetFrameYUV420 img  )  [virtual]
 

Create a new noise frame with current settings.

Parameters:
[out] img VETLib Cache Frame to store data.
Returns:
VETRET_OK if everything is fine, VETRET_PARAM_ERR if frame is not valid.
Note:
Ouput operator (>>) call directly this function.
See also:
operator >> (vetFrameYUV420&)

Implements vetInput.

Definition at line 161 of file vetNoiseGenerator.cpp.

References INFO, and VETRET_NOT_IMPLEMENTED.

unsigned int vetNoiseGenerator::getHeight  )  const [inline, virtual]
 

Pixel are generated directly into output image!

Returns:
0

Implements vetInput.

Definition at line 147 of file vetNoiseGenerator.h.

PixelGrey vetNoiseGenerator::getRandomPixelGrey  )  [static]
 

Create a random greyscale pixel.

Returns:
VETLib greyscale pixel [int rand].

Definition at line 141 of file vetNoiseGenerator.cpp.

PixelHSV vetNoiseGenerator::getRandomPixelHSV  )  [static]
 

Create a random HSV pixel.

Returns:
VETLib HSV pixel [int rand, int rand, int rand].

Definition at line 127 of file vetNoiseGenerator.cpp.

References PixelHSV::hue, PixelHSV::sat, and PixelHSV::val.

PixelRGB24 vetNoiseGenerator::getRandomPixelRGB24  )  [static]
 

Create a random RGB24 pixel.

Returns:
VETLib RGB24 pixel [unsigned char rand, unsigned char rand, unsigned char rand].

Definition at line 112 of file vetNoiseGenerator.cpp.

PixelRGB96 vetNoiseGenerator::getRandomPixelRGB96  )  [static]
 

Create a random RGB pixel.

Returns:
VETLib RGB pixel [int rand, int rand, int rand].

Definition at line 96 of file vetNoiseGenerator.cpp.

unsigned int vetNoiseGenerator::getWidth  )  const [inline, virtual]
 

Pixel are generated directly into output image!

Returns:
0

Implements vetInput.

Definition at line 141 of file vetNoiseGenerator.h.

VETRESULT vetNoiseGenerator::reset  )  [virtual]
 

Reset variables and noise source.

Returns:
VETRET_OK

Implements vetInput.

Definition at line 59 of file vetNoiseGenerator.cpp.

References normalize_value, normalized, resetNoiseSource(), spread, v_runmode, and VETRET_OK.

Referenced by vetNoiseGenerator().


The documentation for this class was generated from the following files:
Generated on Tue Jan 24 11:59:41 2006 for VETLib by  doxygen 1.4.4