-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathutilities.hpp
29 lines (22 loc) · 831 Bytes
/
utilities.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
#ifndef UTILITIES_HPP
#define UTILITIES_HPP
#include <opencv2/opencv.hpp>
#include <vector>
#include <cmath>
#include <limits>
using namespace std;
using namespace cv;
// Function declarations
Mat CannyThreshold(Mat img);
Mat masking(Mat image, int i); //for the first set of lines
Mat masking2l(Mat image,int i); //for the second set of lines left
Mat masking2r(Mat image,int i); //for the second set of lines right
Mat findlines(Mat img, int i);
Mat applyMSER(Mat img, int i);
void sobelApplied(Mat img);
void gammaCorrection(const Mat& src, Mat& dst, float gamma);
Mat constructRectangles(Mat image, vector<Vec4i> lines, int distanceParallelThreshold);
double lineLength(Vec4i line);
double lineDistance(Vec4i line1, Vec4i line2);
void filterLines(vector<Vec4i>& lines, double distanceThreshold);
#endif // UTILITIES_HPP