-
Notifications
You must be signed in to change notification settings - Fork 0
/
Main.hpp
45 lines (38 loc) · 973 Bytes
/
Main.hpp
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
#ifndef MAIN_HPP
#define MAIN_HPP
#include <string>
#include <fstream>
#include <iostream>
#include <opencv2/opencv.hpp>
#include "Video.hpp"
#include "Sound.hpp"
#define NUMBER_OF_TAGS 15
using namespace std;
using namespace cv;
const int MIN_NUMBER_OF_MATCHES = 1;
const int WIDTH = 640; // width of capture
const int HEIGHT = 480; // height of capture
const int AREA_SCALE_MIN = 300;
const int AREA_SCALE_MAX = 30000;
const int Z_SCALE_MIN = 1;
const int Z_SCALE_MAX = 1000;
const int SCALE_FACTOR = (Z_SCALE_MAX - Z_SCALE_MIN) / (AREA_SCALE_MAX - AREA_SCALE_MIN);
struct FileRecord {
int tagID;
string item;
static int numberOfRecords;
};
struct Tag {
int tagID;
int numberOfVertices[3];
vector<Point> contours[3];
float area[3];
};
int loadfile(FileRecord *);
int identifyTag(int, int);
int appendToFile(int, string);
Point2f getTagCenter(Tag &);
Point2f normalizeXY(Point2f);
float findDepth(float);
int getTagID(string, int, FileRecord *);
#endif