23 #ifndef __MEANFILTER__ 24 #define __MEANFILTER__ 64 glViewport(0, 0, viewport[0], viewport[1]);
A simple mean filter for image processing.
Definition: meanfilter.hpp:40
void createQuad(void)
Sets the mesh as Unit Quad.
Definition: mesh.hpp:841
Tucano::Shader shader
The mean filter shader.
Definition: meanfilter.hpp:98
MeanFilter(void)
Default Constructor.
Definition: meanfilter.hpp:48
Definition: bufferobject.hpp:34
void bind(int texture_unit)
Binds the texture to a given unit. Note that if there is another texture already binded to this unit...
Definition: texture.hpp:285
Tucano::Mesh quad
A quad to be rendered forcing one call of the fragment shader per image pixel.
Definition: meanfilter.hpp:104
void setKernel(int kernel)
Set kernel size.
Definition: meanfilter.hpp:81
A Shader object represents one GLSL program.
Definition: shader.hpp:45
void renderTexture(Tucano::Texture &tex, Eigen::Vector2i viewport)
Applies the mean filter to an image.
Definition: meanfilter.hpp:62
int getKernelSize(void)
Returns the current size of the kernel.
Definition: meanfilter.hpp:90
void unbind(void)
Disables the shader program.
Definition: shader.hpp:1184
virtual void initialize()
Initializes the effect, creating and loading the shader.
Definition: meanfilter.hpp:53
virtual Shader * loadShader(string shader_name)
Loads a shader by filename, initializes it, and inserts in shaders list.
Definition: effect.hpp:73
virtual void render(void)
Render the mesh triangles. The method binds the buffers, calls the method to render triangles...
Definition: mesh.hpp:756
An OpenGL texture. It can be a simple texture or an FBO texture.
Definition: texture.hpp:41
void bind(void)
Enables the shader program for usage.
Definition: shader.hpp:1176
A common Mesh, usually containing triagles or points.
Definition: mesh.hpp:194
The Effect class is a holder for Shaders. It is completely optional, but is contains a few methods fo...
Definition: effect.hpp:43
void unbind(void)
Unbinds this texture and frees the texture unit.
Definition: texture.hpp:367
int kernelsize
The size of the mean filter kernel (window size to apply convolution)
Definition: meanfilter.hpp:101
void setUniform(GLint location, GLint a, GLint b, GLint c, GLint d)
Sets an uniform integer 4D vector (ivec4) given a location and the vector values. ...
Definition: shader.hpp:1258