#include <cannyedge.h>
Public Member Functions | |
CannyEdge (QWindow *_qgl_window, QOpenGLContext *_qgl_contex, float _sigma, int _filterSize, int _width, int _height) | |
~CannyEdge () | |
void | setSigma (float _sigma) |
float | getSigma () |
void | setFilterSize (int _filterSize) |
int | getFilterSize () |
void | detectEdges (GLuint texture) |
GLuint | getGradientFieldTexture () |
GLuint | getCannyEdgeTexture () |
QImage | getGradientFieldImage () |
QImage | getCannyEdgeImage () |
Class to detect canny edge using OpenGL. The CannyEdge class stores data to create an image containing red edges that are created using the canny edge detector.
CannyEdge::CannyEdge | ( | QWindow * | _qgl_window, |
QOpenGLContext * | _qgl_contex, | ||
float | _sigma, | ||
int | _filterSize, | ||
int | _width, | ||
int | _height | ||
) |
Constructor. Creates a new CannyEdge object with all necessary settings.
_qgl_window | Pointer to the Window where rendering is done. |
_qgl_contex | Pointer to the used and initialized OpenGL context. |
_sigma | Sigma used for gaussian blurring of the image. |
_filterSize | Filterkernel size used for the gaussion blurring of the image. |
_width | Window width. |
_height | Window height. |
CannyEdge::~CannyEdge | ( | ) |
Destructor.
void CannyEdge::detectEdges | ( | GLuint | texture) |
Detects canny edges on an given texture.
QImage CannyEdge::getCannyEdgeImage | ( | ) |
Getter for the gradient field image.
GLuint CannyEdge::getCannyEdgeTexture | ( | ) |
Getter for the canny edge texture handler.
int CannyEdge::getFilterSize | ( | ) |
Getter for kernelfilter size value.
QImage CannyEdge::getGradientFieldImage | ( | ) |
Getter for the gradient field image.
GLuint CannyEdge::getGradientFieldTexture | ( | ) |
Getter for the gradient field texture handler.
float CannyEdge::getSigma | ( | ) |
Getter for sigma value.
void CannyEdge::setFilterSize | ( | int | _filterSize) |
Setter for the kernel filtersize value.
_filterSize | New value of the kernel filtersize used for the guassian blurring of the image. |
void CannyEdge::setSigma | ( | float | _sigma) |
Setter for the sigma value.
_sigma | New value of sigma used for the guassian blurring of the image. |