-
Notifications
You must be signed in to change notification settings - Fork 52
/
HeaderCB.h
75 lines (65 loc) · 1.67 KB
/
HeaderCB.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
/* Copyright 2017 onlyliu([email protected]). */
/* */
/* part of source code come from https://github.com/qibao77/cornerDetect */
/* Automatic Camera and Range Sensor Calibration using a single Shot */
/* this project realize the papar: Automatic Camera and Range Sensor */
/* Calibration using a single Shot */
#pragma once
#include "opencv2/opencv.hpp"
#include <vector>
#include "stdio.h"
#define logd std::printf;
struct Corners
{
std::vector<cv::Point2f> p;
std::vector<cv::Vec2f> v1;
std::vector<cv::Vec2f> v2;
std::vector<float> score;
} ;
struct ConerInfo
{
cv::Point2f p;
int chessidx;
int row, col;
int idx;
float x, y;
bool vaild;
int neardiskidx;
float nearestdiskdistance;
ConerInfo operator=(const ConerInfo& value)
{
p = value.p;
chessidx = value.chessidx;
row = value.row;
col = value.col;
idx = value.idx;
x = value.x;
y = value.y;
vaild = value.vaild;
neardiskidx = value.neardiskidx;
nearestdiskdistance = value.nearestdiskdistance;
return *this;
}
ConerInfo()
{
vaild = true;
neardiskidx = -1;
nearestdiskdistance = -1.0;
}
};
struct ImageChessesStruct
{
std::vector<std::vector<cv::Point2f> > flagpostion;
std::vector<std::vector<std::vector<int> > > idxconersflags;
std::vector<int>choosecorneri;
cv::Rect rt;
int cbnum;
std::vector<std::vector<ConerInfo> > chesscorners;
bool flagbeginfromzero;
ImageChessesStruct& operator=( ImageChessesStruct& value)
{
cbnum = value.cbnum;
chesscorners = value.chesscorners;
return *this;
}
};