-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdetectSimpleShapes.h
33 lines (26 loc) · 938 Bytes
/
detectSimpleShapes.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
/* **************************************************************************************** */
/* detectSimpleShapes.h -- Projet [Kro]bot 2015/2016 */
/* -- By Valentin Leboeuf & Olivier Leveque */
/* **************************************************************************************** */
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <cmath>
#include <iostream>
using namespace cv;
using namespace std;
struct Cerc {
Point2f center;
float radius;
};
struct SimpleShapes {
Mat img_src;
Mat img_dst;
Mat img_bw;
vector<RotatedRect> rectangles;
vector<vector<Point>> triangles;
vector<Cerc> cercles;
};
SimpleShapes detectShapes(int , int );
double angleCos(Point , Point , Point );
void setLabel(Mat& , const string , vector<Point>& );