opentl::cvprocess::GpuStdShaders Class Reference

Abstract base class for standard shader operations on the GPU. Add actual standard shader implementations by deriving this class. See 0_Template.h as an example. More...

Inherits opentl::core::util::ParameterContainer.

Inherited by opentl::cvprocess::And, opentl::cvprocess::BayerRG2GRAY, opentl::cvprocess::BayerRG2RGB, opentl::cvprocess::BGR2GRAY, opentl::cvprocess::BGR2HSV, opentl::cvprocess::Classify, opentl::cvprocess::ColorGMM, opentl::cvprocess::ColorGMM2, opentl::cvprocess::ColorHistShader, opentl::cvprocess::ColorHistSum, opentl::cvprocess::DebugUInt2Float, opentl::cvprocess::FlipV, opentl::cvprocess::GRAY2Sobel, opentl::cvprocess::Grayscale, opentl::cvprocess::Laplacian, opentl::cvprocess::NonMaxSupression, opentl::cvprocess::Not, opentl::cvprocess::Or, opentl::cvprocess::PixelCount, opentl::cvprocess::RGB2GRAY, opentl::cvprocess::RGB2HSV, opentl::cvprocess::Subtract, and opentl::cvprocess::Xor.

List of all members.

Public Types


Public Member Functions

virtual void addROI (int x1, int y1, int x2, int y2)
 Execute shader operation only on ROIs if not called full image is used more than one ROI can be added calling this method several times Hint: choose a rectangular where to use the shader with (x1, y1), (x2, y2) are the upper left and the lower right border.
virtual void execute ()
 Execute shader operation on texture(s). Hint: Requires that prepareExecution() is called once for initialization.
opentl::cvprocess::GlFbogetGlFbo (const std::string &str, int camIdx)
 Returns a pointer to a frame buffer object class instance. Uses singleton pattern per Camera and modality.
opentl::cvprocess::GlShaderMgrgetGlShaderMgr (void)
 Returns pointer to a class for OpenGL shader management.
 GpuStdShaders (bool additionalInput=false)
 Constructor.
virtual void init ()
 Initialization function.
virtual void prepareDisplayList ()
 Prepare display lists required for 1:1 pixel to texel mapping.
virtual void prepareExecution (opentl::core::cvdata::TextureGpu &srcTex, opentl::core::cvdata::TextureGpu &srcTex2, opentl::core::cvdata::TextureGpu &dstTex)
 (Re-)initialize operations for shader execution.
virtual void prepareExecution (opentl::core::cvdata::TextureGpu &srcTex, opentl::core::cvdata::TextureGpu &dstTex)
 (Re-)initialize operations for shader execution.
virtual void resetROIs ()
 Reset all previously set ROIs.
virtual void setGlOne2OneTexelMapping ()
 Set required projection parameters for 1:1 pixel to texel mapping.
virtual ~GpuStdShaders ()
 Destructor.

Protected Member Functions

virtual void executeCleanUpStage () const
 Executes post execution processing. Is called from execute().
virtual void executeInitStage ()
 Executes pre execution processing. Is called from execute().

Protected Attributes

bool mAdditionalInput
opentl::cvprocess::GlFbomCurrentFbo
 Keep a pointer to the currently used FBO (for standard shaders).
GLuint mDispListFullSizeQuad
bool mDispListPreparedFlag
opentl::core::cvdata::TextureGpumDstTex1
int mFboFreeId
 helper variable for unique FBO instances
std::map< std::string,
opentl::cvprocess::GlFbo * > 
mGlFboMap
 Map of frame buffer object.
GLuint mProgObj
std::vector< std::vector< int > > mRois
bool mRoiSet
opentl::cvprocess::GlShaderMgrmShaderMgr
opentl::core::cvdata::TextureGpumSrcTex1
opentl::core::cvdata::TextureGpumSrcTex2
GLuint mTexUnit0
GLuint mTexUnit1
int mXresDstTex1
int mXresSrcTex1
int mXresSrcTex2
int mYresDstTex1
int mYresSrcTex1
int mYresSrcTex2


Detailed Description

Abstract base class for standard shader operations on the GPU. Add actual standard shader implementations by deriving this class. See 0_Template.h as an example.

Author:
Erwin Roth <eroth@mytum.de>

Member Enumeration Documentation

Enumerator:
OFFLINE_COUNT 

Enumerator:
ONLINE_COUNT 


Constructor & Destructor Documentation

opentl::cvprocess::GpuStdShaders::GpuStdShaders ( bool  additionalInput = false  ) 

Constructor.

virtual opentl::cvprocess::GpuStdShaders::~GpuStdShaders (  )  [virtual]

Destructor.


Member Function Documentation

virtual void opentl::cvprocess::GpuStdShaders::addROI ( int  x1,
int  y1,
int  x2,
int  y2 
) [virtual]

Execute shader operation only on ROIs if not called full image is used more than one ROI can be added calling this method several times Hint: choose a rectangular where to use the shader with (x1, y1), (x2, y2) are the upper left and the lower right border.

virtual void opentl::cvprocess::GpuStdShaders::execute (  )  [virtual]

virtual void opentl::cvprocess::GpuStdShaders::executeCleanUpStage (  )  const [protected, virtual]

Executes post execution processing. Is called from execute().

virtual void opentl::cvprocess::GpuStdShaders::executeInitStage (  )  [protected, virtual]

Executes pre execution processing. Is called from execute().

opentl::cvprocess::GlFbo* opentl::cvprocess::GpuStdShaders::getGlFbo ( const std::string &  str,
int  camIdx 
)

Returns a pointer to a frame buffer object class instance. Uses singleton pattern per Camera and modality.

Parameters:
str Arbitrary string to uniquely identify this fbo instance. If str = "_ENFORCE_NEW_", the creation of a new fbo instance is enforced!
camIdx Camera index.
Returns:
Pointer to fbo class instance.

opentl::cvprocess::GlShaderMgr* opentl::cvprocess::GpuStdShaders::getGlShaderMgr ( void   ) 

Returns pointer to a class for OpenGL shader management.

Returns:
Pointer to shader management class instance.

virtual void opentl::cvprocess::GpuStdShaders::init (  )  [virtual]

Initialization function.

Implements opentl::core::util::ParameterContainer.

virtual void opentl::cvprocess::GpuStdShaders::prepareDisplayList (  )  [virtual]

Prepare display lists required for 1:1 pixel to texel mapping.

Reimplemented in opentl::cvprocess::ColorHistShader, opentl::cvprocess::ColorHistSum, opentl::cvprocess::FlipV, and opentl::cvprocess::PixelCount.

virtual void opentl::cvprocess::GpuStdShaders::prepareExecution ( opentl::core::cvdata::TextureGpu srcTex,
opentl::core::cvdata::TextureGpu srcTex2,
opentl::core::cvdata::TextureGpu dstTex 
) [virtual]

(Re-)initialize operations for shader execution.

virtual void opentl::cvprocess::GpuStdShaders::prepareExecution ( opentl::core::cvdata::TextureGpu srcTex,
opentl::core::cvdata::TextureGpu dstTex 
) [virtual]

(Re-)initialize operations for shader execution.

Reimplemented in opentl::cvprocess::DebugUInt2Float.

virtual void opentl::cvprocess::GpuStdShaders::resetROIs (  )  [virtual]

Reset all previously set ROIs.

virtual void opentl::cvprocess::GpuStdShaders::setGlOne2OneTexelMapping (  )  [virtual]

Set required projection parameters for 1:1 pixel to texel mapping.


Member Data Documentation

Keep a pointer to the currently used FBO (for standard shaders).

helper variable for unique FBO instances

Map of frame buffer object.

std::vector<std::vector<int> > opentl::cvprocess::GpuStdShaders::mRois [protected]


Generated on Thu Jun 10 21:08:09 2010 for OpenTL by  doxygen 1.5.8