Signapse
Functions
main.cpp File Reference
#include <opencv2/core.hpp>
#include <opencv2/videoio.hpp>
#include <opencv2/imgproc.hpp>
#include <iostream>
#include <stdio.h>
#include <queue>
#include "Camera.h"
#include "CNNProcessor.h"
#include "stdlib.h"
#include "Gui.h"
#include "PreProcessor.h"
#include "SignapseUtils.h"
#include "LinkSplitter.h"
Include dependency graph for main.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 20 of file main.cpp.

20 {
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}
Definition: Camera.h:15
Definition: Gui.h:22
void RegisterSecondaryCallback(SceneCallback *scb)