Convolution filter.
More...
#include <ProceduralTextureModifiers.h>
Convolution filter.
The filter calculates each pixel of the result image as weighted sum of the correspond pixel and its neighbors.
Example:
Ogre::Matrix3(10.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, -10.0f)
- Note
- All kernels must be square matrices and larger than 2x2 (min. 3x3)!
◆ Convolution()
Default constructor.
- Parameters
-
pBuffer | Image buffer where to modify the image. |
◆ ~Convolution()
Procedural::Convolution::~Convolution |
( |
| ) |
|
Default destructor to release memory.
◆ calculateDivisor()
Convolution& Procedural::Convolution::calculateDivisor |
( |
| ) |
|
Calculate a new devisor from given kernel.
◆ getName()
Get name of the filter as string.
◆ logMsg()
void Procedural::TextureProcessing::logMsg |
( |
Ogre::String |
msg | ) |
|
|
protectedinherited |
◆ process()
◆ setCalculateEdgeDivisor()
Convolution& Procedural::Convolution::setCalculateEdgeDivisor |
( |
bool |
calculateedgedivisor | ) |
|
Switch dynamic divisor for edges on or off.
- Parameters
-
calculateedgedivisor | Set true to use dynamic divisor for edges (default true) |
◆ setDivisor()
Set a devisor.
- Parameters
-
divisor | Set specific devisor (default 1.0) |
◆ setIncludeAlphaChannel()
Convolution& Procedural::Convolution::setIncludeAlphaChannel |
( |
bool |
usealpha | ) |
|
Switch on/off the use of the alpha channel.
- Parameters
-
usealpha | Set true to also modify the alpha channel (default false) |
◆ setKernel() [1/3]
Set a new kernel.
- Parameters
-
data | Matrix with data for new kernel |
◆ setKernel() [2/3]
Set a new kernel.
- Parameters
-
size | Number of lines/rows of the quadratic kernel |
data | Array with data for new kernel by rows |
◆ setKernel() [3/3]
Set a new kernel.
- Parameters
-
size | Number of lines/rows of the quadratic kernel (default 3) |
data | Array with data for new kernel by rows |
◆ setLog()
void Procedural::TextureProcessing::setLog |
( |
bool |
enable = true | ) |
|
|
inherited |
Enable/Disable logging.
- Parameters
-
enable | true enables logging of filter actions |
◆ setThreshold()
Set threshold value.
- Parameters
-
threshold | New threshold value [0, 255] (default 128) |
◆ mBuffer
◆ mLog
bool Procedural::TextureProcessing::mLog |
|
protectedinherited |
◆ mName
The documentation for this class was generated from the following file:
- ProceduralTextureModifiers.h
class to store image data while processing
Definition: ProceduralTextureBuffer.h:50