#include <findArrow.h>
Static Public Member Functions | |
static void | boundig_box (Mat &src_tresh, Mat &dst) |
FIND THE BOUDING BOX. More... | |
static vector< RotatedRect > | boundig_box_small (Mat &src_tresh, Mat &threshold_output, vector< vector< Point > > contours, cv::Point &src_centre) |
FIND THE SMALLEST BOUNDING BOX. More... | |
static Point | calculate_center_contour (Point2f contour[], unsigned int size_contour) |
static void | closing (Mat &src, Mat &dest, unsigned int erosion_size) |
Morphological operation Closing. More... | |
static void | descritor (Mat &img_object, Mat &img_scene) |
Find discriptors (Match points) More... | |
static int | find_arrow (cv::Mat frame, cv::Point ¢er_point) |
static vector< vector< Point > > | find_contours (Mat &src, Mat &dest, const unsigned int &line_thinckness) |
Find Counturs. More... | |
static void | multiplymatrixbool (Mat &src, Mat &matbol) |
static void | Opening (Mat &src, Mat &dest, unsigned int erosion_size) |
Morphological operation OPENING. More... | |
static void | ProcessEdges (Mat &src, Mat &dest) |
Boundig box BW. More... | |
static void | ProcessMyImage (Mat &src, Mat &dest) |
static vector< double > | sort_points (Point2f rect_points[]) |
SORTE POINTS helper validate_lengths. More... | |
static bool | validate_contour_Area_Length (vector< Point > contours, vector< double > bbox_points, const double bbca_min=BBCA_MIN, const double bbca_max=BBCA_MAX, const double bbcl_min=BBCL_MIN, const double bbcl_max=BBCL_MAX, const double cacl_min=CACL_MIN, const double cacl_max=CACL_MAX) |
static bool | validate_convexHull (vector< Point > contours, const unsigned short convex_hull_corners=CONVEX_HULL_CORNERS) |
static bool | validate_corners_arrow (vector< Point > contours, const unsigned short convex_arrow_corners=CONVEX_ARROW_CORNERS) |
static bool | validate_lengths (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) |
Static Public Attributes | |
static const double | AREA_MIN = 500 |
static const double | BBCA_MAX = 1.9 |
static const double | BBCA_MIN = 1.3 |
static const double | BBCL_MAX = 35 |
static const double | BBCL_MIN = 7 |
static const double | CACL_MAX = 22 |
static const double | CACL_MIN = 4 |
static const unsigned short | CONVEX_ARROW_CORNERS = 7 |
static const unsigned short | CONVEX_HULL_CORNERS = 5 |
static const unsigned int | EROSION_SIZE =1 |
static const unsigned int | EROSION_SIZE_MIN =1 |
static bool | found_new_point =false |
static const unsigned int | LINE_THICKNESS = 2 |
static const unsigned int | MAX_THRESH = 255 |
static const unsigned int | THRESH = 100 |
static const unsigned short | VAL_MAX_LENGTH = 500 |
static const float | VAL_MAX_RELATION_LENGTH = 3.1 |
static const unsigned short | VAL_MIN_LENGTH = 100 |
static const float | VAL_MIN_RELATION_LENGTH = 1.3 |
Static Protected Member Functions | |
static double | angle (cv::Point pt1, cv::Point pt2, cv::Point pt0) |
static float | innerAngle (float px1, float py1, float px2, float py2, float cx1, float cy1) |
static void | setLabel (cv::Mat &im, const std::string label, std::vector< cv::Point > &contour) |
Definition at line 75 of file findArrow.h.
|
staticprotected |
Helper function to find a cosine of angle between vectors from pt0->pt1 and pt0->pt2
Definition at line 438 of file findArrow.cpp.
|
static |
FIND THE BOUDING BOX.
FIND THE BOUDING BOX
Mat | Src Matix BW |
Mat | Oupt Matrix BW |
Find contours
Approximate contours to polygons + get bounding rects and circles
Draw polygonal contour + bonding rects + circles
Show in a window
Definition at line 151 of file findArrow.cpp.
|
static |
FIND THE SMALLEST BOUNDING BOX.
FIND THE SMALLEST BOUNDING BOX
Mat | Src Matix BW |
Mat | Oupt Matrix BW |
Find contours
Approximate contours to polygons + get bounding rects and circles
Find the rotated rectangles and ellipses for each contour
THIS FUNCTION MUST END HERE
Draw contours + rotated rects + ellipses
Start state machine
validate_contour_Area_Length
verify lengths
validate_number of arrow corners
Find the convex hull object for each contour convexHull
Definition at line 613 of file findArrow.cpp.
|
static |
Calculates the center of an contour
Point2f | contour |
contour | size |
Definition at line 86 of file findArrow.cpp.
|
static |
Morphological operation Closing.
Morphological operation closing Imput: 1-Src Matix 2-Oupt Matrix 3-number of erosions Output: -Matrix "closing"
Definition at line 132 of file findArrow.cpp.
|
static |
Find discriptors (Match points)
Definition at line 202 of file findArrow.cpp.
|
static |
Main function to processec image and return the position of object Find arrow
Find a arrow on a image and return his position
Mat | & img_scene to compute |
bool | & use_descritor?? (not implemented yet) |
int | cam_number (optional) |
Create a obj "cap" that will get the video from the camera
Loop cycle:
PARA VERIFICAR OS CANTOS, É NECESSARIO PRIMEIRO, SABER A QUE CADA PONTO PERTENCE O VERTICE,
ASSIM, DEVE-SE ORDENAR
****EXIT*** wait for 'esc' key press for 10ms. If 'esc' key is pressed, break loop
Destroy all Windows
Definition at line 473 of file findArrow.cpp.
|
static |
Find Counturs.
Find Counturs Imput: 1-Src Matix 2-Oupt Matrix 3-line_thinckness 4-Erosion size Output: -Mariz with the coutours!
Find Counturs
Mat | & src |
Mat | & dest2 |
const | unsigned int & line_thinckness |
const | unsigned int & erosion_size_min |
Definition at line 566 of file findArrow.cpp.
|
staticprotected |
http://feelmare.blogspot.pt/2012/10/inner-productthe-angle-between-two.html
Definition at line 394 of file findArrow.cpp.
|
static |
|
static |
Morphological operation OPENING.
Morphological operation OPENING Imput: 1-Src Matix 2-Oupt Matrix 3-number of erosions Output: -Matrix "Opening"
Definition at line 112 of file findArrow.cpp.
|
static |
Boundig box BW.
|
static |
|
staticprotected |
Helper function to display text in the center of a contour
Definition at line 452 of file findArrow.cpp.
|
static |
SORTE POINTS helper validate_lengths.
Definition at line 330 of file findArrow.cpp.
|
static |
|
static |
Definition at line 382 of file findArrow.cpp.
|
static |
Definition at line 369 of file findArrow.cpp.
|
static |
Validate the size and relation height/width of bounding box of the arrow
array | with 4 Points (corners of rectangle) |
(optional) | const unsigned short max_length |
(optional) | const unsigned short min_length |
(optional) | const float min_relation_length |
(optional) | const float max_relation_length |
Definition at line 344 of file findArrow.cpp.
|
static |
Definition at line 106 of file findArrow.h.
|
static |
Definition at line 101 of file findArrow.h.
|
static |
Definition at line 100 of file findArrow.h.
|
static |
Definition at line 103 of file findArrow.h.
|
static |
Definition at line 102 of file findArrow.h.
|
static |
Definition at line 105 of file findArrow.h.
|
static |
Definition at line 104 of file findArrow.h.
|
static |
Definition at line 112 of file findArrow.h.
|
static |
Definition at line 109 of file findArrow.h.
|
static |
Definition at line 87 of file findArrow.h.
|
static |
Definition at line 88 of file findArrow.h.
|
static |
Definition at line 83 of file findArrow.h.
|
static |
Definition at line 91 of file findArrow.h.
|
static |
Definition at line 90 of file findArrow.h.
|
static |
Definition at line 89 of file findArrow.h.
|
static |
Definition at line 94 of file findArrow.h.
|
static |
Definition at line 97 of file findArrow.h.
|
static |
Definition at line 95 of file findArrow.h.
|
static |
Definition at line 96 of file findArrow.h.