7 #include <QOpenGLFunctions_3_2_Core>
8 #include "junctiondetector.h"
10 #define PI acos(-1.0f)
32 CannyEdge(QWindow *_qgl_window, QOpenGLContext *_qgl_contex,
float _sigma,
int _filterSize,
int _width,
int _height);
89 float *filterCoefficients;
91 float *verticesFullscreenQuad;
98 QOpenGLContext *qgl_context;
99 QOpenGLFunctions_3_2_Core *qgl_funcs;
101 QOpenGLShaderProgram qgl_cannyBlurShader;
102 QOpenGLShaderProgram qgl_cannyMagnitudeShader;
103 QOpenGLShaderProgram qgl_cannyEdgeShader;
104 QOpenGLFramebufferObject *qgl_cannyFBO1;
105 QOpenGLFramebufferObject *qgl_cannyFBO2;
107 QOpenGLVertexArrayObject qgl_quad;
109 void prepareShaders();
110 void prepareVertexArrayObject();
112 void updateFilterCoefficients();
114 void imageBlur(QOpenGLFramebufferObject *fbo, GLuint texture);
115 void imageMagnitude(QOpenGLFramebufferObject *fbo, GLuint texture);
116 void imageNonMaximaSuppression(QOpenGLFramebufferObject *fbo, GLuint texture);