ConvolutionKernel Class Reference

ConvolutionKernel Class Reference

#include <ConvolutionKernel.h>

Class Description

Definition at line 85 of file ConvolutionKernel.h.

Public Member Functions

 ConvolutionKernel (const ConvolutionKernel &k)
 copy constructor More...
 
 ConvolutionKernel (float *kernel, int size)
 user specified arbitrary size x size kernel. More...
 
 ConvolutionKernel (float sharpness=0.5f, float radius=1.5f, float sigma=(1.0f/3.0f))
 construct a procedurally generated kernel (as described above) More...
 
 ~ConvolutionKernel ()
 destructor. Releases memory More...
 
void setSharpness (float val)
 
void setRadius (float val)
 
void setSigma (float val)
 
void setKernel (float *f, int Size)
 Copies the supplied kernel into this class. More...
 
float getSharpness () const
 
float getRadius () const
 
float getSigma () const
 
bool isGenerated (void) const
 
int getSize (void) const
 
void getKernel (float *targetBuffer) const
 copies the kernel to the target buffer which must be appropriately sized More...
 
const float * getKernel (void) const
 
const short * getFixedKernel (void) const
 
void logPrintKernel (void) const
 Prints the convolution kernel to the log. (for debugging purposes) More...
 

Constructor & Destructor Documentation

copy constructor

ConvolutionKernel ( float *  kernel,
int  size 
)

user specified arbitrary size x size kernel.

The ctor copies the kernel into this class.

ConvolutionKernel ( float  sharpness = 0.5f,
float  radius = 1.5f,
float  sigma = (1.0f/3.0f) 
)

construct a procedurally generated kernel (as described above)

destructor. Releases memory

Member Function Documentation

void setSharpness ( float  val)
void setRadius ( float  val)
void setSigma ( float  val)
void setKernel ( float *  f,
int  Size 
)

Copies the supplied kernel into this class.

float getSharpness ( ) const
inline

Definition at line 123 of file ConvolutionKernel.h.

123 { return m_Sharpness; }
float getRadius ( ) const
inline

Definition at line 124 of file ConvolutionKernel.h.

124 { return m_Radius; }
float getSigma ( ) const
inline

Definition at line 125 of file ConvolutionKernel.h.

125 { return m_Sigma; }
bool isGenerated ( void  ) const
inline
Returns
true if procedurally generated, false otherwise

Definition at line 128 of file ConvolutionKernel.h.

128 { return m_Generated; }
int getSize ( void  ) const
inline
Returns
the size of the kernel (width and height are the same)

Definition at line 131 of file ConvolutionKernel.h.

131 { return m_Size; }
void getKernel ( float *  targetBuffer) const

copies the kernel to the target buffer which must be appropriately sized

const float* getKernel ( void  ) const
inline
Returns
a pointer to the kernel (in 32 bit float format)

Definition at line 137 of file ConvolutionKernel.h.

137 { return m_Kernel; }
const short* getFixedKernel ( void  ) const
inline
Returns
a pointer to the 16 bit fixed point kernel in S4.11 format
Note
The Fixed kernel is made up of fixed point signed numbers in the form S4.11. This was chosen because the procedurally generated kernel will always be expressable in this form as long as the sharpness is in the range -1 to 10.

Definition at line 145 of file ConvolutionKernel.h.

145 { return m_fixedKernel; }
void logPrintKernel ( void  ) const

Prints the convolution kernel to the log. (for debugging purposes)


The documentation for this class was generated from the following file: