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

vetDoctor Class Reference

Inheritance diagram for vetDoctor:

vetOutput

Public Types

enum  RUNMODE

Public Member Functions

 vetDoctor (RUNMODE mode=vetDoctor::FPS_STAT)
 Default constructor initializes variables.
VETRESULT run ()
 Currently not used.
VETRESULT setHeight (unsigned int value)
 Set current canvas' height.
VETRESULT setWidth (unsigned int value)
 Set current canvas' width.
VETRESULT reset (bool startTimers=false)
 Reset class variables for new statistics, by default it doesn't start frame rate counter.
VETRESULT setInputFrameRate (float fps=0)
 Set display frame rate (elaboration time is not subtracted).
long getInputFrameRateDelay ()
 Read current input frame delay.
float getInputFrameRateCurrent () const
 Read last frame rate.
float getInputFrameRateAverage () const
 Read average frame rate. ( SUM(frames) / framecount ).
long getExecutionTimeCurrent () const
 Read last processing time in milliseconds, it's execution time of importFrom() method, if current RUNMODE is FPS_STAT return zero because frames are not processed.
long getExecutionTimeAverage () const
 Read average processing time in milliseconds, it's execution time of importFrom() method, if current RUNMODE is FPS_STAT return zero because frames are not processed.
long getElapsedTime () const
VETRESULT importFrom (vetFrameYUV420 &img)
 Analyze frame and store statistics, elaboration time is saved.
VETRESULT importFrom (vetFrameRGB24 &img)
 Analyze frame and store statistics, elaboration time is saved.
VETRESULT importFrom (vetFrameT< unsigned char > &img)
 Analyze frame and store statistics, elaboration time is saved.
void operator<< (vetFrameYUV420 &img)
 Input operator, import standard VETLib frame formats, current implementation calls directly importFrom() method or gather only frame statistics if RUNMODE is FPS_STAT.
void operator<< (vetFrameRGB24 &img)
 Input operator, import standard VETLib frame formats, current implementation calls directly importFrom() method or gather only frame statistics if RUNMODE is FPS_STAT.
void operator<< (vetFrameT< unsigned char > &img)
 Input operator, import standard VETLib frame formats, current implementation calls directly importFrom() method. or gather only frame statistics if RUNMODE is FPS_STAT.

Protected Member Functions

void updateFps ()
 Updates last frame rate time and average.
void updateExtime ()
 Updates last processing (analyzing) time and average.

Protected Attributes

int runmode
long v_sleeptime
long frameCount
clock_t lastFrameTime
float lastFps
float mediumFps
long lastExTime
long mediumExTime

Detailed Description

Definition at line 42 of file vetDoctor.h.


Constructor & Destructor Documentation

vetDoctor::vetDoctor RUNMODE  mode = vetDoctor::FPS_STAT  ) 
 

Default constructor initializes variables.

Parameters:
mode set current processing mode, default is frame rate stats only.

Definition at line 27 of file vetDoctor.cpp.

References DEBUGMSG, reset(), runmode, and v_sleeptime.


Member Function Documentation

long vetDoctor::getExecutionTimeAverage  )  const [inline]
 

Read average processing time in milliseconds, it's execution time of importFrom() method, if current RUNMODE is FPS_STAT return zero because frames are not processed.

Returns:
last processing time in milliseconds ( SUM(exTimes) / framecount )
See also:
mediumExTime

Definition at line 206 of file vetDoctor.h.

References mediumExTime.

long vetDoctor::getExecutionTimeCurrent  )  const [inline]
 

Read last processing time in milliseconds, it's execution time of importFrom() method, if current RUNMODE is FPS_STAT return zero because frames are not processed.

Returns:
last processing time in milliseconds
See also:
lastExTime

Definition at line 196 of file vetDoctor.h.

References lastExTime.

float vetDoctor::getInputFrameRateAverage  )  const [inline]
 

Read average frame rate. ( SUM(frames) / framecount ).

Returns:
frame rate as floating point value.
See also:
mediumFps

Definition at line 186 of file vetDoctor.h.

References mediumFps.

float vetDoctor::getInputFrameRateCurrent  )  const [inline]
 

Read last frame rate.

Returns:
frame rate as floating point value.
See also:
lastFps

Definition at line 178 of file vetDoctor.h.

References lastFps.

long vetDoctor::getInputFrameRateDelay  )  [inline]
 

Read current input frame delay.

Returns:
delay time in milliseconds.
See also:
sleeptime

Definition at line 170 of file vetDoctor.h.

References v_sleeptime.

VETRESULT vetDoctor::importFrom vetFrameT< unsigned char > &  img  )  [virtual]
 

Analyze frame and store statistics, elaboration time is saved.

Parameters:
[in] img Greyscale VETLib Frame to be processed (analyzed)
Returns:
VETRET_OK if everything is fine, VETRET_PARAM_ERR if frame is not valid, VETRET_INTERNAL_ERR or VETRET_ILLEGAL_USE else.
Note:
Input operator (<<) call directly this function.
See also:
operator << (vetFrameT&)

Implements vetOutput.

Definition at line 190 of file vetDoctor.cpp.

References INFO, and VETRET_NOT_IMPLEMENTED.

VETRESULT vetDoctor::importFrom vetFrameRGB24 img  )  [virtual]
 

Analyze frame and store statistics, elaboration time is saved.

Parameters:
[in] img VETLib Cache24 Frame to be processed (analyzed)
Returns:
VETRET_OK if everything is fine, VETRET_PARAM_ERR if frame is not valid, VETRET_INTERNAL_ERR or VETRET_ILLEGAL_USE else.
Note:
Input operator (<<) call directly this function.
See also:
operator << (vetFrameRGB24&)

Implements vetOutput.

Definition at line 172 of file vetDoctor.cpp.

References INFO, and VETRET_NOT_IMPLEMENTED.

VETRESULT vetDoctor::importFrom vetFrameYUV420 img  )  [virtual]
 

Analyze frame and store statistics, elaboration time is saved.

Parameters:
[in] img VETLib Cache Frame to be processed (analyzed)
Returns:
VETRET_OK if everything is fine, VETRET_PARAM_ERR if frame is not valid, VETRET_INTERNAL_ERR or VETRET_ILLEGAL_USE else.
Note:
Input operator (<<) call directly this function.
See also:
operator << (vetFrameYUV420&)

Implements vetOutput.

Definition at line 154 of file vetDoctor.cpp.

References INFO, and VETRET_NOT_IMPLEMENTED.

Referenced by operator<<().

void vetDoctor::operator<< vetFrameT< unsigned char > &  img  ) 
 

Input operator, import standard VETLib frame formats, current implementation calls directly importFrom() method. or gather only frame statistics if RUNMODE is FPS_STAT.

Parameters:
[in] img Greyscale VETLib Frame to be processed (analyzed)
See also:
importFrom(vetFrameGrey&)

Reimplemented from vetOutput.

Definition at line 256 of file vetDoctor.cpp.

References INFO.

void vetDoctor::operator<< vetFrameRGB24 img  ) 
 

Input operator, import standard VETLib frame formats, current implementation calls directly importFrom() method or gather only frame statistics if RUNMODE is FPS_STAT.

Parameters:
[in] img VETLib Cache24 Frame to be processed (analyzed)
See also:
importFrom(vetFrameCache24&)

Reimplemented from vetOutput.

Definition at line 231 of file vetDoctor.cpp.

References importFrom(), INFO, runmode, updateExtime(), updateFps(), and v_sleeptime.

void vetDoctor::operator<< vetFrameYUV420 img  ) 
 

Input operator, import standard VETLib frame formats, current implementation calls directly importFrom() method or gather only frame statistics if RUNMODE is FPS_STAT.

Parameters:
[in] img VETLib Cache Frame to be processed (analyzed)
See also:
importFrom(vetFrameCache&)

Reimplemented from vetOutput.

Definition at line 207 of file vetDoctor.cpp.

References importFrom(), INFO, runmode, updateExtime(), updateFps(), and v_sleeptime.

VETRESULT vetDoctor::reset bool  startTimers = false  ) 
 

Reset class variables for new statistics, by default it doesn't start frame rate counter.

Parameters:
[in] startTimers if true start the frame rate counter, useful for single frame processing performace test.
See also:
lastFrameTime, lastExTime, lastFps, mediumFps, mediumExTime

Definition at line 46 of file vetDoctor.cpp.

References frameCount, lastExTime, lastFps, lastFrameTime, mediumExTime, mediumFps, v_sleeptime, and VETRET_OK.

Referenced by vetDoctor().

VETRESULT vetDoctor::run  )  [inline]
 

Currently not used.

Returns:
VETRET_NOT_IMPLEMENTED

Definition at line 126 of file vetDoctor.h.

References VETRET_NOT_IMPLEMENTED.

VETRESULT vetDoctor::setHeight unsigned int  value  )  [inline, virtual]
 

Set current canvas' height.

Returns:
height in pixel.

Implements vetOutput.

Definition at line 133 of file vetDoctor.h.

References VETRET_NOT_IMPLEMENTED.

VETRESULT vetDoctor::setInputFrameRate float  fps = 0  ) 
 

Set display frame rate (elaboration time is not subtracted).

Parameters:
[in] frames per second (default is 0, no sleep)
Returns:
VETRET_PARAM_ERR if fps is lower than 0, VETRET_OK else.
See also:
v_sleeptime

Definition at line 77 of file vetDoctor.cpp.

References v_sleeptime, VETRET_OK, and VETRET_PARAM_ERR.

VETRESULT vetDoctor::setWidth unsigned int  value  )  [inline, virtual]
 

Set current canvas' width.

Returns:
width in pixel.

Implements vetOutput.

Definition at line 140 of file vetDoctor.h.

References VETRET_NOT_IMPLEMENTED.

void vetDoctor::updateExtime  )  [protected]
 

Updates last processing (analyzing) time and average.

See also:
clock()

lastExTime

mediumExTime

lastFrameTime

Definition at line 120 of file vetDoctor.cpp.

References frameCount, lastExTime, lastFrameTime, and mediumExTime.

Referenced by operator<<().

void vetDoctor::updateFps  )  [protected]
 

Updates last frame rate time and average.

See also:
clock()

lastFps

mediumFps

lastFrameTime

Definition at line 97 of file vetDoctor.cpp.

References frameCount, lastFps, lastFrameTime, and mediumFps.

Referenced by operator<<().


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