51 #include <opencv2/features2d/features2d.hpp>
52 #include <opencv2/highgui/highgui.hpp>
53 #include <opencv2/imgproc/imgproc.hpp>
54 #include <opencv2/calib3d/calib3d.hpp>
55 #include <opencv2/nonfree/nonfree.hpp>
56 #include <opencv2/core/core.hpp>
57 #include <opencv2/opencv.hpp>
116 static void boundig_box(Mat & src_tresh, Mat & dst);
119 static vector<RotatedRect>
boundig_box_small( Mat & src_tresh, Mat & threshold_output,vector<vector<Point> > contours,
120 cv::Point & src_centre);
123 static void Opening(Mat & src, Mat & dest,
unsigned int erosion_size);
126 static void closing(Mat & src, Mat & dest,
unsigned int erosion_size);
129 static vector<vector<Point> >
find_contours(Mat & src, Mat & dest,
const unsigned int & line_thinckness);
134 static int find_arrow(cv::Mat frame,cv::Point & center_point);
144 static void descritor( Mat & img_object, Mat & img_scene);
155 static bool validate_contour_Area_Length(vector<Point> contours,vector<double> bbox_points,
160 static vector<double> sort_points(Point2f rect_points[]);
162 static bool validate_corners_arrow(vector<Point> contours,
165 static bool validate_convexHull(vector<Point> contours,
170 static void setLabel(cv::Mat& im,
const std::string label, std::vector<cv::Point>& contour);
172 static float innerAngle(
float px1,
float py1,
float px2,
float py2,
float cx1,
float cy1);
174 static double angle(cv::Point pt1, cv::Point pt2, cv::Point pt0);
static const float VAL_MIN_RELATION_LENGTH
const unsigned short VAL_MAX_LENGTH
For validate_lengths function.
static const unsigned int LINE_THICKNESS
static const double AREA_MIN
static const double BBCA_MAX
static const unsigned int EROSION_SIZE_MIN
static const double BBCL_MIN
const unsigned short VAL_MIN_LENGTH
static const double BBCA_MIN
const unsigned short CONVEX_HULL_CORNERS
Variable for validate_convexHull.
static const unsigned short VAL_MAX_LENGTH
const float VAL_MIN_RELATION_LENGTH
static const float VAL_MAX_RELATION_LENGTH
const double BBCA_MIN
Variables for validate_contour_Area_Length function.
void Opening(Mat &src, Mat &dest, unsigned int erosion_size)
Morphological operation OPENING.
static const unsigned int MAX_THRESH
static const unsigned short CONVEX_HULL_CORNERS
void ProcessMyImage(Mat &src, Mat &dest)
Canny.
static const unsigned short CONVEX_ARROW_CORNERS
static const unsigned short VAL_MIN_LENGTH
void ProcessEdges(Mat &src, Mat &dest)
Boundig box BW.
cv::Point find_arrow(void)
static const double BBCL_MAX
const unsigned short CONVEX_ARROW_CORNERS
Variable for validate_corners_arrow.
void multiplymatrixbool(Mat &src, Mat &matbol)
const float VAL_MAX_RELATION_LENGTH
static const double CACL_MAX
static const double CACL_MIN
static bool found_new_point
helper function to rotate an image.
static const unsigned int THRESH
void closing(Mat &src, Mat &dest, unsigned int erosion_size)
Morphological operation Closing.
static bool validate_lengths(cv::Point2f rect_points[], const unsigned short max_length=VAL_MAX_LENGTH, const unsigned short min_length=VAL_MIN_LENGTH, const float min_relation_length=VAL_MIN_RELATION_LENGTH, const float max_relation_length=VAL_MAX_RELATION_LENGTH)
cv::Point calculate_center_contour(cv::Point2f contour[], unsigned int size_contour)
static const unsigned int EROSION_SIZE
void descritor(Mat &img_object, Mat &img_scene)
Find discriptors (Match points)
vector< RotatedRect > boundig_box_small(Mat &src_tresh, Mat &threshold_output, vector< vector< cv::Point > > contours, cv::Point &src_centre, bool &havepoint)
FIND THE SMALLEST BOUNDING BOX.
void boundig_box(Mat &src_tresh, Mat &dst)
FIND THE BOUDING BOX.
vector< vector< cv::Point > > find_contours(Mat &src, Mat &dest, const unsigned int &line_thinckness, const unsigned int &erosion_size_min)
See if the contour have neighbors! (arrow dont have!)