-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprocessingmodule.cpp
107 lines (67 loc) · 2.29 KB
/
processingmodule.cpp
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
#include "processingmodule.hpp"
#include <cv.h>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/core/core.hpp>
#include <QFormLayout>
#include <QLabel>
#include <QCheckBox>
using namespace std;
using namespace cv;
ProcessingModule::ProcessingModule(){
}
ProcessingModule::~ProcessingModule(){
}
void ProcessingModule::init(Settings * sets, QDialog * mainDialog){
settings = sets;
initProcessingObjects();
initWindow(mainDialog);
}
void ProcessingModule::initProcessingObjects(){
}
void ProcessingModule::initWindow(QDialog * mainDialog){
dialog = new DontCloseDialog(mainDialog, "Przetwarzanie obrazow", Point(250, 520));
dialog->setMinimumWidth(300);
QFormLayout * layout = new QFormLayout(dialog);
QLabel * label1 = new QLabel("Przed stereo dopasowaniem", dialog);
layout->addRow(label1, new QLabel("", dialog));
for(int i = 0; i < preMatchingProcess.size(); ++i){
addGuiRowForProcessing(preMatchingProcess[i], layout);
}
QLabel * label2 = new QLabel("Po stereo dopasowaniu", dialog);
layout->addRow(label2, new QLabel("", dialog));
for(int i = 0; i < postMatchingProcess.size(); ++i){
addGuiRowForProcessing(postMatchingProcess[i], layout);
}
// do zatwierdzenia
applyButton = new QPushButton("Zastosuj", dialog);
applyButton->setEnabled(false);
connect(applyButton, SIGNAL(clicked()),
this, SLOT(applyChanges()));
layout->addRow(new QLabel("", dialog), applyButton);
dialog->setLayout(layout);
dialog->adjustSize();
}
void ProcessingModule::addGuiRowForProcessing(Processing * process, QFormLayout * layout){
}
void ProcessingModule::applyChanges(){
}
void ProcessingModule::enableButton(int){
}
IplImage * ProcessingModule::preMatchingProcessing(IplImage * toProcess){
if(preMatchingProcess.empty())
return NULL;
IplImage * toRet = toProcess;
for(int i = 0; i < preMatchingProcess.size(); ++i){
toRet = preMatchingProcess[i]->processImage(toRet);
}
return toRet;
}
IplImage * ProcessingModule::postMatchingProcessing(IplImage * toProcess){
if(postMatchingProcess.empty())
return NULL;
IplImage * toRet = toProcess;
for(int i = 0; i < preMatchingProcess.size(); ++i){
toRet = preMatchingProcess[i]->processImage(toRet);
}
return toRet;
}