class tgImageProcessor More...
#include <tgImageProcessor.h>
Public Member Functions | |
| void | avgActivate () |
| void | avgDeactivate () |
| void | avgGet (float *avg, int lvl=0) |
| int | avgGetResolution () |
| void | copy (const tgTexture &source, tgTexture &result) |
| void | flipUpsideDown (const tgTexture &source, tgTexture &result) |
| void | gauss (const tgTexture &source, tgTexture &result) |
| int | getHeight () |
| int | getWidth () |
| void | initShader (float width, float height) |
| void | render (const tgTexture &tex) |
| void | setCamOrtho () |
| void | sobel (const tgTexture &source, tgTexture &result, float threshold=0.01, bool normalise=false, bool binary=false) |
| void | sobel (const tgTexture &source, tgTexture &result, tgTexture &mask, float threshold=0.01, bool normalize=false, bool binary=false) |
| void | spreading (const tgTexture &source, tgTexture &result) |
| tgImageProcessor (const char *gauss_frag_file, const char *sobel_frag_file, const char *thinning_frag_file, const char *spreading_frag_file, unsigned img_width, unsigned img_height, int avg_resolution) | |
| void | thinning (const tgTexture &source, tgTexture &result) |
| void | thinning (const tgTexture &source, tgTexture &result, tgTexture &mask) |
| ~tgImageProcessor () | |
Private Member Functions | |
| void | drawQuad (float w, float h) |
| void | drawQuadUpsideDown (float w, float h) |
| void | init (unsigned width, unsigned height) |
| void | initFBO (int res) |
| bool | transform (float i, float j, float *ix, float *iy) |
Private Attributes | |
| GLuint | fbo |
| int | fbo_res |
| int | fbo_stage |
| GLuint | fbo_tex |
| GLuint | fbo_tex_depth |
| bool | m_avg_init |
| TomGine::tgCamera | m_cam_ortho |
| TomGine::tgCamera | m_cam_ortho_fbo |
| unsigned | m_height |
| tgShader * | m_shadeGauss |
| tgShader * | m_shadeSobel |
| tgShader * | m_shadeSpreading |
| tgShader * | m_shadeThinning |
| unsigned | m_width |
class tgImageProcessor
Definition at line 14 of file tgImageProcessor.h.
| tgImageProcessor::tgImageProcessor | ( | const char * | gauss_frag_file, |
| const char * | sobel_frag_file, | ||
| const char * | thinning_frag_file, | ||
| const char * | spreading_frag_file, | ||
| unsigned | img_width, | ||
| unsigned | img_height, | ||
| int | avg_resolution | ||
| ) |
Definition at line 8 of file tgImageProcessor.cpp.
Definition at line 26 of file tgImageProcessor.cpp.
| void tgImageProcessor::avgActivate | ( | ) |
Definition at line 325 of file tgImageProcessor.cpp.
| void tgImageProcessor::avgDeactivate | ( | ) |
Definition at line 357 of file tgImageProcessor.cpp.
| void tgImageProcessor::avgGet | ( | float * | avg, |
| int | lvl = 0 |
||
| ) |
Definition at line 335 of file tgImageProcessor.cpp.
| int TomGine::tgImageProcessor::avgGetResolution | ( | ) | [inline] |
Definition at line 72 of file tgImageProcessor.h.
| void tgImageProcessor::copy | ( | const tgTexture & | source, |
| tgTexture & | result | ||
| ) |
Definition at line 216 of file tgImageProcessor.cpp.
| void tgImageProcessor::drawQuad | ( | float | w, |
| float | h | ||
| ) | [private] |
Definition at line 180 of file tgImageProcessor.cpp.
| void tgImageProcessor::drawQuadUpsideDown | ( | float | w, |
| float | h | ||
| ) | [private] |
Definition at line 190 of file tgImageProcessor.cpp.
| void tgImageProcessor::flipUpsideDown | ( | const tgTexture & | source, |
| tgTexture & | result | ||
| ) |
Definition at line 205 of file tgImageProcessor.cpp.
| void tgImageProcessor::gauss | ( | const tgTexture & | source, |
| tgTexture & | result | ||
| ) |
Definition at line 227 of file tgImageProcessor.cpp.
| int TomGine::tgImageProcessor::getHeight | ( | ) | [inline] |
Definition at line 55 of file tgImageProcessor.h.
| int TomGine::tgImageProcessor::getWidth | ( | ) | [inline] |
Definition at line 54 of file tgImageProcessor.h.
| void tgImageProcessor::init | ( | unsigned | width, |
| unsigned | height | ||
| ) | [private] |
Definition at line 38 of file tgImageProcessor.cpp.
| void tgImageProcessor::initFBO | ( | int | res | ) | [private] |
Definition at line 121 of file tgImageProcessor.cpp.
| void tgImageProcessor::initShader | ( | float | width, |
| float | height | ||
| ) |
Definition at line 53 of file tgImageProcessor.cpp.
| void tgImageProcessor::render | ( | const tgTexture & | tex | ) |
Definition at line 317 of file tgImageProcessor.cpp.
| void tgImageProcessor::setCamOrtho | ( | ) |
Definition at line 200 of file tgImageProcessor.cpp.
| void tgImageProcessor::sobel | ( | const tgTexture & | source, |
| tgTexture & | result, | ||
| float | threshold = 0.01, |
||
| bool | normalise = false, |
||
| bool | binary = false |
||
| ) |
Definition at line 240 of file tgImageProcessor.cpp.
| void tgImageProcessor::sobel | ( | const tgTexture & | source, |
| tgTexture & | result, | ||
| tgTexture & | mask, | ||
| float | threshold = 0.01, |
||
| bool | normalize = false, |
||
| bool | binary = false |
||
| ) |
Definition at line 256 of file tgImageProcessor.cpp.
| void tgImageProcessor::spreading | ( | const tgTexture & | source, |
| tgTexture & | result | ||
| ) |
Definition at line 304 of file tgImageProcessor.cpp.
| void tgImageProcessor::thinning | ( | const tgTexture & | source, |
| tgTexture & | result | ||
| ) |
Definition at line 275 of file tgImageProcessor.cpp.
| void tgImageProcessor::thinning | ( | const tgTexture & | source, |
| tgTexture & | result, | ||
| tgTexture & | mask | ||
| ) |
Definition at line 288 of file tgImageProcessor.cpp.
| bool TomGine::tgImageProcessor::transform | ( | float | i, |
| float | j, | ||
| float * | ix, | ||
| float * | iy | ||
| ) | [private] |
GLuint TomGine::tgImageProcessor::fbo [private] |
Definition at line 26 of file tgImageProcessor.h.
int TomGine::tgImageProcessor::fbo_res [private] |
Definition at line 29 of file tgImageProcessor.h.
int TomGine::tgImageProcessor::fbo_stage [private] |
Definition at line 30 of file tgImageProcessor.h.
GLuint TomGine::tgImageProcessor::fbo_tex [private] |
Definition at line 27 of file tgImageProcessor.h.
GLuint TomGine::tgImageProcessor::fbo_tex_depth [private] |
Definition at line 28 of file tgImageProcessor.h.
bool TomGine::tgImageProcessor::m_avg_init [private] |
Definition at line 31 of file tgImageProcessor.h.
Definition at line 24 of file tgImageProcessor.h.
Definition at line 24 of file tgImageProcessor.h.
unsigned TomGine::tgImageProcessor::m_height [private] |
Definition at line 17 of file tgImageProcessor.h.
tgShader* TomGine::tgImageProcessor::m_shadeGauss [private] |
Definition at line 19 of file tgImageProcessor.h.
tgShader* TomGine::tgImageProcessor::m_shadeSobel [private] |
Definition at line 20 of file tgImageProcessor.h.
Definition at line 22 of file tgImageProcessor.h.
Definition at line 21 of file tgImageProcessor.h.
unsigned TomGine::tgImageProcessor::m_width [private] |
Definition at line 16 of file tgImageProcessor.h.