-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.cpp
More file actions
45 lines (36 loc) · 871 Bytes
/
Main.cpp
File metadata and controls
45 lines (36 loc) · 871 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// OpenCV includes
#include "opencv2/opencv.hpp"
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
// System includes
#include <iostream>
#include <chrono>
// Project includes
#include "main.h"
#include "Runtime.h"
typedef std::chrono::high_resolution_clock Clock;
using namespace std;
using namespace cv;
int main(int argc, char** argv)
{
VideoCapture cap(CAMERA_COM);
if (!cap.isOpened())
{
cout << "Cannot open camera!";
return -1;
}
#if TIMED_DEBUG
//TESTING BLOCK
auto t1 = Clock::now();
#endif
Runtime mainExecution(cap);
mainExecution.MainLoop();
#if TIMED_DEBUG
auto t2 = Clock::now();
std::cout << "Delta t2-t1: "
<< std::chrono::duration_cast<std::chrono::nanoseconds>(t2 - t1).count()
<< " nanoseconds" << std::endl;
// END OF TESTING BLOCK
#endif
return 0;
}