Signapse
src
main.cpp
Go to the documentation of this file.
1
#include <opencv2/core.hpp>
2
#include <opencv2/videoio.hpp>
3
#include <opencv2/imgproc.hpp>
4
5
#include <iostream>
6
#include <stdio.h>
7
#include <queue>
8
9
#include "
Camera.h
"
10
#include "
CNNProcessor.h
"
11
#include "stdlib.h"
12
#include "
Gui.h
"
13
#include "
PreProcessor.h
"
14
#include "
SignapseUtils.h
"
15
#include "
LinkSplitter.h
"
16
17
using namespace
cv;
18
using namespace
std;
19
20
int
main
(
int
argc,
char
* argv[]){
21
SignapseUtils::welcomeMessage();
22
23
//init Qt and Ui
24
QApplication app(argc, argv);
25
QMainWindow window;
26
Ui_MainWindow ui;
27
28
//make pipeline components
29
CameraSettings
cameraSettings;
30
Camera
camera(cameraSettings);
31
PreProcessorSettings
preProcessorSettings;
32
PreProcessor
preProcessor(preProcessorSettings);
33
LinkSplitter
linkSplitter;
34
CNNProcessorSettings
cnnSettings;
35
CNNProcessor
cnn(cnnSettings);
36
Gui
gui(&window, &ui);
37
38
//register callbacks (link pipeline)
39
camera.
RegisterCallback
(&preProcessor);
40
preProcessor.
RegisterCallback
(&linkSplitter);
41
linkSplitter.
RegisterCallback
(&cnn);
42
linkSplitter.
RegisterSecondaryCallback
(&gui);
43
cnn.
RegisterCallback
(&gui);
44
45
//start camera and cnn
46
cnn.
Start
();
47
camera.
Start
();
48
49
//start gui
50
gui.
SetVisible
(
true
);
51
app.exec();
//loops main thread
52
53
//stop camera and cnn
54
camera.
Stop
();
55
cnn.
Stop
();
56
57
//exit
58
return
0;
59
}
60
CNNProcessor.h
Camera.h
Gui.h
LinkSplitter.h
PreProcessor.h
SignapseUtils.h
CNNProcessor
Definition:
CNNProcessor.h:20
Camera
Definition:
Camera.h:15
Camera::Start
void Start()
Definition:
Camera.cpp:53
Camera::Stop
void Stop()
Definition:
Camera.cpp:61
Gui
Definition:
Gui.h:22
Gui::SetVisible
void SetVisible(bool visible)
Definition:
Gui.cpp:47
LinkSplitter
Definition:
LinkSplitter.h:10
LinkSplitter::RegisterSecondaryCallback
void RegisterSecondaryCallback(SceneCallback *scb)
Definition:
LinkSplitter.cpp:15
PipelineLink::RegisterCallback
void RegisterCallback(SceneCallback *scb)
Definition:
PipelineLink.cpp:7
PreProcessor
Definition:
PreProcessor.h:8
SchedulableLink::Stop
void Stop()
Definition:
SchedulableLink.cpp:40
SchedulableLink::Start
void Start()
Definition:
SchedulableLink.cpp:34
main
int main(int argc, char *argv[])
Definition:
main.cpp:20
CNNProcessorSettings
Definition:
CNNProcessorSettings.h:11
CameraSettings
Definition:
CameraSettings.h:6
PreProcessorSettings
Definition:
PreProcessorSettings.h:9
Generated by
1.9.3