-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathutils.h
82 lines (67 loc) · 1.49 KB
/
utils.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
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
/*!
* \file utils.h
* \author Gabriel Urbain <[email protected]> - Visiting student at MIT SSL
* \date August 2014
* \version 0.1
* \brief Software global tools headers
*
* License: The MIT License (MIT)
* Copyright (c) 2014, Massachussets Institute of Technology
*/
#ifndef UTILS_HH
#define UTILS_HH
// Project libs
#include "defines.h"
// OpenCV libs
#include "opencv2/core/core.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/highgui/highgui.hpp"
// Common libs
#include <sys/utsname.h>
#include <stdint.h>
#include <iomanip>
#include <limits>
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <string>
#include <stdlib.h>
#include <sstream>
#include <algorithm>
#include <iterator>
#include <time.h>
#include <sys/types.h>
#include <unistd.h>
#include <linux/version.h>
#include <sys/stat.h>
// Other libs
#include <sys/time.h>
using namespace std;
static timeval timeValInit;
void init();
vector<cv::Point3f> create3DChessboardCorners(cv::Size boardSize, float squareSize);
class TimeStamp {
public:
timeval timeBegin;
timeval timeEnd;
timeval timeInit;
int meanTime;
int procTime;
int startTime;
int stopTime;
int initTime;
bool isRunning;
TimeStamp();
~TimeStamp();
void start();
void stop();
int load(string line_);
int getProcTime();
int getMeanTime();
int getStartTime();
int getStopTime();
int setTime(int meanTime_, int procTime_);
bool isSynchro(TimeStamp t_);
};
#endif