-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsegmentation.h
More file actions
27 lines (21 loc) · 965 Bytes
/
Copy pathsegmentation.h
File metadata and controls
27 lines (21 loc) · 965 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef SEGMENTATION_H
#define SEGMENTATION_H
#include <QPixmap>
#include <QImage>
#include <QVector>
#include <Eigen/Dense>
class SegmentImg{
public:
//Primary Functions
QPixmap segmentImage(QPixmap *pixels);
//covert to grayscale
QPixmap convertToGrayscale(const QPixmap &original);
//resize img, construct and return adjacency matrix
QVector<QVector<double>> createAdjMatrix(QImage image, unsigned int &rows, unsigned int &cols, unsigned int &w, unsigned int &h);
QVector<QVector<double>> computeEpsilonNearestNeighbors(const QImage& image, double epsilon, int w, int h);
//create diagonal matrix
QVector<QVector<double>> createDegreeMatrix(QVector<QVector<double>> &adjMatrix);
//compute degree matrix and return the laplacian matrix
QVector<QVector<double>> createLaplacianMatrix(QVector<QVector<double>> &adjMatrix, QVector<QVector<double>> °Matrix);
};
#endif // SEGMENTATION_H