Functions | Variables
arrow_detection.h File Reference
#include <stdlib.h>
#include <iostream>
#include <stdio.h>
#include <string>
#include <math.h>
#include <vector>
#include <map>
#include <ros/ros.h>
#include <std_msgs/String.h>
#include <sstream>
#include <unistd.h>
#include <cmath>
#include <sys/types.h>
#include <geometry_msgs/Point.h>
#include <visp/vp1394CMUGrabber.h>
#include <visp/vp1394TwoGrabber.h>
#include <visp/vpDisplayGDI.h>
#include <visp/vpDisplayX.h>
#include <visp/vpDot2.h>
#include <visp/vpPixelMeterConversion.h>
#include <visp/vpPose.h>
#include <opencv2/features2d/features2d.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/calib3d/calib3d.hpp>
#include <opencv2/nonfree/nonfree.hpp>
#include <opencv2/core/core.hpp>
#include <opencv2/opencv.hpp>
#include <arrow_detection/stabelized_func_arrow_detection.h>
Include dependency graph for arrow_detection.h:

Go to the source code of this file.

Functions

void boundig_box (Mat &src_tresh, Mat &dst)
 FIND THE BOUDING BOX. More...
 
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. More...
 
void closing (Mat &src, Mat &dest, unsigned int erosion_size)
 Morphological operation Closing. More...
 
void descritor (Mat &img_object, Mat &img_scene)
 Find discriptors (Match points) More...
 
cv::Point find_arrow (void)
 
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!) More...
 
void multiplymatrixbool (Mat &src, Mat &matbol)
 
void Opening (Mat &src, Mat &dest, unsigned int erosion_size)
 Morphological operation OPENING. More...
 
void ProcessEdges (Mat &src, Mat &dest)
 Boundig box BW. More...
 
void ProcessMyImage (Mat &src, Mat &dest)
 Canny. More...
 
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)
 

Variables

const double AREA_MIN = 500
 
const double BBCA_MAX = 1.9
 
const double BBCA_MIN = 1.3
 Variables for validate_contour_Area_Length function. More...
 
const double BBCL_MAX = 35
 
const double BBCL_MIN = 7
 
const double CACL_MAX = 22
 
const double CACL_MIN = 4
 
const unsigned short CONVEX_ARROW_CORNERS = 7
 Variable for validate_corners_arrow. More...
 
const unsigned short CONVEX_HULL_CORNERS = 5
 Variable for validate_convexHull. More...
 
const unsigned int EROSION_SIZE =1
 VERIFICAR SE o que esta a detetar é preto! e se é solido!!!!! (cor constante) More...
 
const unsigned int EROSION_SIZE_MIN =1
 
const unsigned int LINE_THICKNESS = 2
 
const unsigned int MAX_THRESH = 255
 
const unsigned int THRESH = 100
 
const unsigned short VAL_MAX_LENGTH = 500
 For validate_lengths function. More...
 
const float VAL_MAX_RELATION_LENGTH = 3.1
 
const unsigned short VAL_MIN_LENGTH = 100
 
const float VAL_MIN_RELATION_LENGTH = 1.3
 

Function Documentation

void boundig_box ( Mat &  src_tresh,
Mat &  dst 
)

FIND THE BOUDING BOX.

FIND THE BOUDING BOX

Parameters
MatSrc Matix BW
MatOupt Matrix BW
Returns
Matrix "Opening" // not implemented yet
Precondition
requires the source matrix with contours to compute the boundig_box of with one and the output matrix
Postcondition
void!

Find contours

Approximate contours to polygons + get bounding rects and circles

Draw polygonal contour + bonding rects + circles

Show in a window

Definition at line 67 of file stabelized_func_arrow_detection.cpp.

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 closing ( Mat &  src,
Mat &  dest,
unsigned int  erosion_size 
)

Morphological operation Closing.

Morphological operation closing Imput: 1-Src Matix 2-Oupt Matrix 3-number of erosions Output: -Matrix "closing"

Definition at line 49 of file stabelized_func_arrow_detection.cpp.

void descritor ( Mat &  img_object,
Mat &  img_scene 
)
cv::Point find_arrow ( void  )

Main function to processec image and return the position of object Find arrow

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!)

Find Counturs

void multiplymatrixbool ( Mat &  src,
Mat &  matbol 
)
void Opening ( Mat &  src,
Mat &  dest,
unsigned int  erosion_size 
)

Morphological operation OPENING.

Morphological operation OPENING Imput: 1-Src Matix 2-Oupt Matrix 3-number of erosions Output: -Matrix "Opening"

Definition at line 30 of file stabelized_func_arrow_detection.cpp.

void ProcessEdges ( Mat &  src,
Mat &  dest 
)

Boundig box BW.

void ProcessMyImage ( Mat &  src,
Mat &  dest 
)

Canny.

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 
)
static

Variable Documentation

const double AREA_MIN = 500

Definition at line 148 of file arrow_detection.h.

const double BBCA_MAX = 1.9

Definition at line 143 of file arrow_detection.h.

const double BBCA_MIN = 1.3

Variables for validate_contour_Area_Length function.

Definition at line 142 of file arrow_detection.h.

const double BBCL_MAX = 35

Definition at line 145 of file arrow_detection.h.

const double BBCL_MIN = 7

Definition at line 144 of file arrow_detection.h.

const double CACL_MAX = 22

Definition at line 147 of file arrow_detection.h.

const double CACL_MIN = 4

Definition at line 146 of file arrow_detection.h.

const unsigned short CONVEX_ARROW_CORNERS = 7

Variable for validate_corners_arrow.

Definition at line 154 of file arrow_detection.h.

const unsigned short CONVEX_HULL_CORNERS = 5

Variable for validate_convexHull.

Definition at line 151 of file arrow_detection.h.

const unsigned int EROSION_SIZE =1

VERIFICAR SE o que esta a detetar é preto! e se é solido!!!!! (cor constante)

Notes :


hughLines para encontrar linhashttp://docs.opencv.org/doc/tutorials/imgproc/shapedescriptors/hull/hull.html

Definition at line 129 of file arrow_detection.h.

const unsigned int EROSION_SIZE_MIN =1

Definition at line 130 of file arrow_detection.h.

const unsigned int LINE_THICKNESS = 2

Definition at line 133 of file arrow_detection.h.

const unsigned int MAX_THRESH = 255

Definition at line 132 of file arrow_detection.h.

const unsigned int THRESH = 100

Definition at line 131 of file arrow_detection.h.

const unsigned short VAL_MAX_LENGTH = 500

For validate_lengths function.

Definition at line 136 of file arrow_detection.h.

const float VAL_MAX_RELATION_LENGTH = 3.1

Definition at line 139 of file arrow_detection.h.

const unsigned short VAL_MIN_LENGTH = 100

Definition at line 137 of file arrow_detection.h.

const float VAL_MIN_RELATION_LENGTH = 1.3

Definition at line 138 of file arrow_detection.h.



arrow_detection
Author(s): César Sousa
autogenerated on Mon Mar 2 2015 01:31:21