-
Notifications
You must be signed in to change notification settings - Fork 0
/
marginalnotesdetection.h
47 lines (40 loc) · 1.12 KB
/
marginalnotesdetection.h
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef MARGINALNOTESDETECTION_H
#define MARGINALNOTESDETECTION_H
#include <QtWidgets/QMainWindow>
#include <qdebug.h>
#include <qmath.h>
#include "DrawableGraphicsScene.h"
#include "qtoolbar.h"
#include "qfiledialog.h"
#include "qgraphicsitem.h"
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include "ui_marginalnotesdetection.h"
class MarginalNotesDetection : public QMainWindow
{
Q_OBJECT
public:
MarginalNotesDetection(QWidget *parent = 0);
~MarginalNotesDetection();
private:
Ui::MarginalNotesDetectionClass ui;
cv::Mat fImage;
DrawableGraphicsScene *fScene;
QAction *fSelectAction;
QAction *fLineAction;
QAction *fLineInAction;
QActionGroup *fActionGroup;
QVector<cv::Mat> fGaborFilterBank;
cv::Mat fGaborMixMat;
cv::Mat fMask;
int fIdx;
void printMat(cv::Mat);
void createGaborBank();
void showMatOnGraphicsView(cv::Mat imageToShow, DrawableGraphicsScene** gaphicsScene, QGraphicsView* graphicsView);
public slots:
void grabCutImageSlot();
void actionGroupClicked(QAction *action);
void chooseImageSlot();
};
#endif // MARGINALNOTESDETECTION_H