-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgrid.h
More file actions
47 lines (41 loc) · 1.33 KB
/
Copy pathgrid.h
File metadata and controls
47 lines (41 loc) · 1.33 KB
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
//
// Created by Dariya Petrova on 11.05.2020.
//
#pragma once
#include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
#include "contourUtils.h"
#include "drawing.h"
#include "rotation.h"
struct comparePoints {
bool operator () (cv::Point const& a, cv::Point const& b) const
{
return (a.x < b.x) || (a.x == b.x && a.y < b.y);
}
};
vector<Point> processingGribovAlgorithm(
vector<Point> contour,
int dpEps,
int gridStartX,
int gridStartY,
int gridIntervalX,
int gridIntervalY,
int prevPointsCount
);
vector<Point> processingGribovAlgorithm2(
Mat img,
vector<Point> contour,
int dpEps,
int gridStartX,
int gridStartY,
int gridIntervalX,
int gridIntervalY,
int prevPointsCount
);
Point getNearestGridPoint(Point point, int startX, int startY, int intervalX, int intervalY);
vector<Point> getAuxilaryGridPoints(Point centerPoint, int intervalX, int intervalY);
int getNearestCoord(int pointCoord, int gridInterval, int gridStart);
double getAngleBetweenSegments(Point point1, Point point2, Point point3);
Point getPrevPoint(int pointNum, int auxNum, vector<Point> contour,
vector<vector<pair<int, int>>> bpp, map<Point, vector<Point>, comparePoints> auxilaryPoints);