Visualization 2 - Lab Course
 All Classes Functions Enumerations Enumerator
Tools.h
1 #ifndef TOOLS_H
2 #define TOOLS_H
3 
4 #include <QVector2D>
5 #include <QVector3D>
6 #include <QtCore/qmath.h>
7 #include <QImage>
8 #include <QColor>
9 
10 extern "C" {
11 #include "emd.h"
12 }
13 
14 using namespace std;
15 
25 vector<QVector3D> createSubImage(
26  const int &x, const int &y,
27  const int &width, const int &height,
28  const QImage &orig);
29 
36 QImage createSubImage(
37  const QImage &image, const QRect & rect);
38 
51 void createSubImage(
52  const int &x, const int &y,
53  const int &width, const int &height,
54  const QVector2D &gradient, const QImage &orig,
55  vector<QVector3D> &subImage1, vector<QVector3D> &subImage2);
56 
64 void drawSubImage(int x, int y, const QImage &subImage, QImage &image);
73 void drawSubImage(int x, int y, int sideSize, const QColor &color, QImage &image);
82 void drawCross(int x, int y, int sideSize, const QColor &color, QImage &image);
91 void drawCircle(int x, int y, int sideSize, const QColor &color, QImage &image);
92 
98 float colorDist(feature_t *F1, feature_t *F2);
99 
105 float luminance(const QColor &color);
106 
112 QImage flipImageHorizontally(const QImage &image);
113 
117 float erf(float x);
118 
119 #endif