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

vetFilterGeometric Class Reference

Inheritance diagram for vetFilterGeometric:

vetFilter vetInput vetOutput vetObject

Public Member Functions

 vetFilterGeometric (vetFilterGeometricParameters *initParams=NULL)
 Default constructor, initialize parameters and superclasses.
 ~vetFilterGeometric ()
 Default destructor, free buffer.
float getFrameRate () const
 Read current frame rate (frame per second).
VETRESULT setParameters (vetFilterGeometricParameters *initParams)
 Set parameters for this filter.
vetFilterGeometricParametersgetParameters ()
 Get parameters for this filter.
VETRESULT setFilterParameters (vetFilterParameters *initParams)
 Set parameters for this filter.
vetFilterParametersgetFilterParameters ()
 Get parameters for this filter.
VETRESULT reset ()
 Reset buffers and parameters.
VETRESULT resize (vetFrameYUV420 &img, unsigned int dimX, unsigned int dimY)
 Resize each frame to new dimension.
VETRESULT resize (vetFrameRGB24 &img, unsigned int dimX, unsigned int dimY)
VETRESULT resize (vetFrameT< unsigned char > &img, unsigned int dimX, unsigned int dimY)
VETRESULT resizeCanvas (vetFrameYUV420 &img, unsigned int newdimX, unsigned int newdimY)
 Resize frames' canvas to new dimension, if smaller video will be cropped, if greater new pixels will be in VETDEF_PIXEL_COLOR.
VETRESULT resizeCanvas (vetFrameRGB24 &img, unsigned int newdimX, unsigned int newdimY)
VETRESULT resizeCanvas (vetFrameT< unsigned char > &img, unsigned int newdimX, unsigned int newdimY)
VETRESULT resizeCanvas (vetFrameYUV420 &img, unsigned int newdimX, unsigned int newdimY, unsigned char &valY, unsigned char &valU, unsigned char &valV)
 Resize frames' canvas to new dimension, if smaller video will be cropped, if greater new pixels will be in VETDEF_PIXEL_COLOR.
VETRESULT resizeCanvas (vetFrameRGB24 &img, unsigned int newdimX, unsigned int newdimY, PixelRGB24 defaultColor)
VETRESULT resizeCanvas (vetFrameT< unsigned char > &img, unsigned int newdimX, unsigned int newdimY, unsigned char &val1, unsigned char &val2, unsigned char &val3)
VETRESULT rotate90 (vetFrameYUV420 &img)
 Rotate each frame 90 degrees (right). [MultiThread].
VETRESULT rotate90 (vetFrameRGB24 &img)
VETRESULT rotate90 (vetFrameT< unsigned char > &img)
VETRESULT rotate180 (vetFrameYUV420 &img)
 Rotate each frame 180 degrees (right). [MultiThread].
VETRESULT rotate180 (vetFrameRGB24 &img)
VETRESULT rotate180 (vetFrameT< unsigned char > &img)
VETRESULT rotate270 (vetFrameYUV420 &img)
 Rotate each frame 270 degrees (right). [MultiThread].
VETRESULT rotate270 (vetFrameRGB24 &img)
VETRESULT rotate270 (vetFrameT< unsigned char > &img)
VETRESULT rotate (vetFrameYUV420 &img, float alpha)
 Rotate each frame on the right. [MultiThread].
VETRESULT rotate (vetFrameRGB24 &img, float alpha)
VETRESULT rotate (vetFrameT< unsigned char > &img, float alpha)
VETRESULT flipHorizontal (vetFrameYUV420 &img)
 Flip Horizontal each frame. [MultiThread].
VETRESULT flipHorizontal (vetFrameRGB24 &img)
VETRESULT flipHorizontal (vetFrameT< unsigned char > &img)
VETRESULT flipVertical (vetFrameYUV420 &img)
 Flip Vertical each frame. [MultiThread].
VETRESULT flipVertical (vetFrameRGB24 &img)
VETRESULT flipVertical (vetFrameT< unsigned char > &img)
VETRESULT importFrom (vetFrameYUV420 &img)
 Process the frame with current settings and store in buffer.
VETRESULT importFrom (vetFrameRGB24 &img)
 Process the frame with current settings and store in buffer.
VETRESULT importFrom (vetFrameT< unsigned char > &img)
 Process the frame with current settings and store in buffer.

Static Public Member Functions

template<class T>
static VETRESULT rotate90 (vetFrameT< T > *src, vetFrameT< T > *dst, bool clockDir)
template<class T>
static VETRESULT rotate180 (vetFrameT< T > *src, vetFrameT< T > *dst)
template<class T>
static VETRESULT mirror (vetFrameT< T > *src, vetFrameT< T > *dst)
template<class T>
static VETRESULT flip (vetFrameT< T > *src, vetFrameT< T > *dst)

Protected Attributes

vetFilterGeometricParametersmyParams
 Current parameters.

Detailed Description

Definition at line 86 of file vetFilterGeometric.h.


Constructor & Destructor Documentation

vetFilterGeometric::vetFilterGeometric vetFilterGeometricParameters initParams = NULL  ) 
 

Default constructor, initialize parameters and superclasses.

Parameters:
[in] initParams parameters for this module or NULL for defaults.

Definition at line 25 of file vetFilterGeometric.cpp.

References INFO, myParams, vetObject::setDescription(), vetObject::setName(), setParameters(), and vetObject::setVersion().


Member Function Documentation

VETRESULT vetFilterGeometric::flipHorizontal vetFrameYUV420 img  ) 
 

Flip Horizontal each frame. [MultiThread].

Returns:
VETRET_OK if success, VETRET_ILLEGAL_USE if video is empty.

Definition at line 673 of file vetFilterGeometric.cpp.

References vetFrame::height, INFO, vetFilter::useBufferYUV(), VETRET_NOT_IMPLEMENTED, and vetFrame::width.

Referenced by importFrom().

VETRESULT vetFilterGeometric::flipVertical vetFrameYUV420 img  ) 
 

Flip Vertical each frame. [MultiThread].

Returns:
VETRET_OK if success, VETRET_ILLEGAL_USE if video is empty.

Definition at line 706 of file vetFilterGeometric.cpp.

References vetFrame::height, INFO, vetFilter::useBufferYUV(), VETRET_NOT_IMPLEMENTED, and vetFrame::width.

Referenced by importFrom().

vetFilterParameters* vetFilterGeometric::getFilterParameters  )  [inline, virtual]
 

Get parameters for this filter.

Returns:
pointer to vetFilterSampleParameters instance.

Implements vetFilter.

Definition at line 160 of file vetFilterGeometric.h.

References myParams.

float vetFilterGeometric::getFrameRate  )  const [inline]
 

Read current frame rate (frame per second).

Returns:
Frame per second as a floating point value. (delay=1/fps)
See also:
v_sleeptime

Reimplemented from vetInput.

Definition at line 111 of file vetFilterGeometric.h.

vetFilterGeometricParameters& vetFilterGeometric::getParameters  )  [inline]
 

Get parameters for this filter.

Returns:
pointer to vetFilterGeometricParameters instance.

Definition at line 132 of file vetFilterGeometric.h.

References myParams.

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

Process the frame with current settings and store in buffer.

Parameters:
[in] img VETLib Grayscale Frame to be processed.
Returns:
VETRET_OK if everything is fine, VETRET_INTERNAL_ERR else.
Note:
Input operator (<<) call directly this function.
See also:
operator << (vetFrameT&)

Implements vetFilter.

Definition at line 236 of file vetFilterGeometric.cpp.

References vetFilter::bufferTuC, DEBUGMSG, flipHorizontal(), flipVertical(), vetFrameT< T >::height, vetFilter::isBufferTuC(), myParams, vetFilterGeometricParameters::par_ResizeHeight, vetFilterGeometricParameters::par_ResizeWidth, vetFilterGeometricParameters::par_Rotation, vetFrameT< T >::profile, resize(), resizeCanvas(), rotate(), rotate180(), rotate270(), rotate90(), vetFilterGeometricParameters::runMode, vetFilter::useBufferTuC(), VETRET_OK, VETRET_OK_DEPRECATED, VETRET_PARAM_ERR, and vetFrameT< T >::width.

VETRESULT vetFilterGeometric::importFrom vetFrameRGB24 img  )  [virtual]
 

Process the frame with current settings and store in buffer.

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

Implements vetFilter.

Definition at line 176 of file vetFilterGeometric.cpp.

References vetFilter::bufferRGB, DEBUGMSG, flipHorizontal(), flipVertical(), vetFrame::height, vetFilter::isBufferRGB(), myParams, vetFilterGeometricParameters::par_ResizeHeight, vetFilterGeometricParameters::par_ResizeWidth, vetFilterGeometricParameters::par_Rotation, resize(), resizeCanvas(), rotate(), rotate180(), rotate270(), rotate90(), vetFilterGeometricParameters::runMode, vetFilter::useBufferRGB(), VETRET_OK, VETRET_OK_DEPRECATED, VETRET_PARAM_ERR, and vetFrame::width.

VETRESULT vetFilterGeometric::importFrom vetFrameYUV420 img  )  [virtual]
 

Process the frame with current settings and store in buffer.

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

Implements vetFilter.

Definition at line 118 of file vetFilterGeometric.cpp.

References vetFilter::bufferYUV, DEBUGMSG, flipHorizontal(), flipVertical(), vetFrame::height, vetFilter::isBufferYUV(), myParams, vetFilterGeometricParameters::par_ResizeHeight, vetFilterGeometricParameters::par_ResizeWidth, vetFilterGeometricParameters::par_Rotation, resize(), resizeCanvas(), rotate(), rotate180(), rotate270(), rotate90(), vetFilterGeometricParameters::runMode, vetFilter::useBufferYUV(), VETRET_OK, VETRET_OK_DEPRECATED, VETRET_PARAM_ERR, and vetFrame::width.

VETRESULT vetFilterGeometric::reset  )  [virtual]
 

Reset buffers and parameters.

Returns:
VETRET_OK

Implements vetFilter.

Definition at line 56 of file vetFilterGeometric.cpp.

References vetFilter::allocateBuffer(), vetFilterParameters::currentBuffer, INFO, myParams, vetFilter::releaseBuffers(), vetFilterGeometricParameters::reset(), setParameters(), and VETRET_OK.

Referenced by setParameters().

VETRESULT vetFilterGeometric::resize vetFrameYUV420 img,
unsigned int  dimX,
unsigned int  dimY
 

Resize each frame to new dimension.

Parameters:
newdimX New video width.
newdimY New video height.
Returns:
VETRET_OK if success, VETRET_ILLEGAL_USE if video is empty, VETRET_PARAM_ERR if parameters are out of range ]0, INT[, VETRET_INTERNAL_ERR else.

Definition at line 296 of file vetFilterGeometric.cpp.

References vetFilter::useBufferYUV(), and VETRET_NOT_IMPLEMENTED.

Referenced by importFrom().

VETRESULT vetFilterGeometric::resizeCanvas vetFrameYUV420 img,
unsigned int  newdimX,
unsigned int  newdimY,
unsigned char &  valY,
unsigned char &  valU,
unsigned char &  valV
 

Resize frames' canvas to new dimension, if smaller video will be cropped, if greater new pixels will be in VETDEF_PIXEL_COLOR.

Parameters:
newdimX New canvas width.
newdimY New canvas height.
defaultColor Color for new pixels (if canvas is greater than original).
Returns:
VETRET_OK if success, VETRET_ILLEGAL_USE if video is empty, VETRET_PARAM_ERR if parameters are out of range ]0, INT[, VETRET_INTERNAL_ERR else.

Definition at line 351 of file vetFilterGeometric.cpp.

References vetFilter::useBufferYUV(), and VETRET_NOT_IMPLEMENTED.

VETRESULT vetFilterGeometric::resizeCanvas vetFrameYUV420 img,
unsigned int  newdimX,
unsigned int  newdimY
 

Resize frames' canvas to new dimension, if smaller video will be cropped, if greater new pixels will be in VETDEF_PIXEL_COLOR.

Parameters:
newdimX New canvas width.
newdimY New canvas height.
Returns:
VETRET_OK if success, VETRET_ILLEGAL_USE if video is empty, VETRET_PARAM_ERR if parameters are out of range ]0, INT[, VETRET_INTERNAL_ERR else.

Definition at line 325 of file vetFilterGeometric.cpp.

References vetFilter::useBufferYUV(), and VETRET_NOT_IMPLEMENTED.

Referenced by importFrom().

VETRESULT vetFilterGeometric::rotate vetFrameYUV420 img,
float  alpha
 

Rotate each frame on the right. [MultiThread].

Parameters:
alpha degrees on the right
Returns:
VETRET_OK if success, VETRET_ILLEGAL_USE if video is empty.

Definition at line 511 of file vetFilterGeometric.cpp.

References vetFrame::height, vetFilter::useBufferYUV(), VETRET_NOT_IMPLEMENTED, and vetFrame::width.

Referenced by importFrom().

VETRESULT vetFilterGeometric::rotate180 vetFrameYUV420 img  ) 
 

Rotate each frame 180 degrees (right). [MultiThread].

Returns:
VETRET_OK if success, VETRET_ILLEGAL_USE if video is empty.

Definition at line 448 of file vetFilterGeometric.cpp.

References vetFrame::height, INFO, vetFilter::useBufferYUV(), VETRET_NOT_IMPLEMENTED, and vetFrame::width.

Referenced by importFrom().

VETRESULT vetFilterGeometric::rotate270 vetFrameYUV420 img  ) 
 

Rotate each frame 270 degrees (right). [MultiThread].

Returns:
VETRET_OK if success, VETRET_ILLEGAL_USE if video is empty.

Definition at line 479 of file vetFilterGeometric.cpp.

References vetFrame::height, INFO, vetFilter::useBufferYUV(), VETRET_NOT_IMPLEMENTED, and vetFrame::width.

Referenced by importFrom().

VETRESULT vetFilterGeometric::rotate90 vetFrameYUV420 img  ) 
 

Rotate each frame 90 degrees (right). [MultiThread].

Returns:
VETRET_OK if success, VETRET_ILLEGAL_USE if video is empty.

Definition at line 384 of file vetFilterGeometric.cpp.

References vetFrame::height, INFO, vetFilter::useBufferYUV(), VETRET_NOT_IMPLEMENTED, and vetFrame::width.

Referenced by importFrom().

VETRESULT vetFilterGeometric::setFilterParameters vetFilterParameters initParams  )  [inline, virtual]
 

Set parameters for this filter.

Parameters:
[in] initParams Instance of vetFilterSampleParameters or NULL, NULL argument make function to create a new instance with default parameters.
Returns:
VETRET_OK

Implements vetFilter.

Definition at line 145 of file vetFilterGeometric.h.

References setParameters().

VETRESULT vetFilterGeometric::setParameters vetFilterGeometricParameters initParams  ) 
 

Set parameters for this filter.

Parameters:
[in] initParams Instance of vetFilterGeometricParameters or NULL, NULL argument make function to create a new instance with default parameters.
Returns:
VETRET_OK

Definition at line 82 of file vetFilterGeometric.cpp.

References vetFilter::allocateBuffer(), vetFilterParameters::currentBuffer, myParams, reset(), VETRET_OK, and VETRET_PARAM_ERR.

Referenced by reset(), setFilterParameters(), and vetFilterGeometric().


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