MipAlgorithms::BearExtrCamUtils Class Reference

Class of static functions used as utils. More...

#include <BearExtrCamUtils.h>

List of all members.

Static Public Member Functions

static std::vector
< std::vector< cv::Point > > 
circle_detect_thresh (cv::Mat &src, int &Tl_x, int &Tl_y, int &_Tp_width, int &_Tp_height, const int &sigma, const int &thresh, const int &max_val, const int &area_circ_min, const int &area_circ_max, const Decimal &tresh_roundness)
 Finds all circles in an image.
static std::vector
< std::vector< cv::Point > > 
detect_rectangle_in_roi (cv::Mat Image, std::vector< std::vector< cv::Point > > circles, BearExtrCamPar *par, BearExtrCamVar *var)
 Find the rectagles around given circles in an image.
static cv::Rect build_roi_around_circle (std::vector< cv::Point > circle, int img_width, int img_height, cv::Point &center_C, BearExtrCamPar *par, BearExtrCamVar *var)
 Finds the center of a circle and builds a roi around it.
static cv::Point computeContourCenter (std::vector< cv::Point > &square, BearExtrCamPar *par)
static void computeContourMaxMin (std::vector< cv::Point > &square, cv::Point &max, cv::Point &min, BearExtrCamPar *par)
static void findSquares1 (const cv::Mat image, std::vector< std::vector< cv::Point > > &squares, BearExtrCamPar *par, BearExtrCamVar *var)
static Decimal angle (cv::Point pt1, cv::Point pt2, cv::Point pt0)
static void findRoiInImage (std::vector< cv::Point > &region, cv::Point pointRoi)
 Gets the localization of a region of an image.
static Decimal distPoint (cv::Point first, cv::Point second)
 Compute the Euler distance between two points.
static cv::Point calc_middle_square (std::vector< cv::Point > square, cv::Point C_center)
 Compute the middle point.


Detailed Description

Class of static functions used as utils.

Author:
Marco Cognetti

Member Function Documentation

std::vector< std::vector< cv::Point > > MipAlgorithms::BearExtrCamUtils::circle_detect_thresh ( cv::Mat &  src,
int &  Tl_x,
int &  Tl_y,
int &  _Tp_width,
int &  _Tp_height,
const int &  sigma,
const int &  thresh,
const int &  max_val,
const int &  area_circ_min,
const int &  area_circ_max,
const Decimal tresh_roundness 
) [static]

Finds all circles in an image.

Parameters:
[in] src Image on wich processing the algorithm to find circles.
[in] Tl_x Starting x of the roi.
[in] Tl_y Starting y of the roi.
[in] _Tp_width Width of the roi (s.t. end x of the roi is Tl_x + _Tp_width).
[in] _Tp_height Height of the roi (s.t. end x of the roi is Tl_y + _Tp_height).
[in] sigma Parameter of smoothing for Gaussian blur.
[in] thresh Value of the threshold for thresholding.
[in] max_val Value put as maximum value in thresholding.
[in] type Type of applied threshold.
[in] area_circ_min Minimum area of a circle.
[in] area_circ_max Maximum area of a circle.
[in] tresh_roundness Minimum value for the roundness of a circle.
Returns:
A vector of vectors of points, each point is the contour of a circle.

std::vector< std::vector< cv::Point > > MipAlgorithms::BearExtrCamUtils::detect_rectangle_in_roi ( cv::Mat  Image,
std::vector< std::vector< cv::Point > >  circles,
BearExtrCamPar par,
BearExtrCamVar var 
) [static]

Find the rectagles around given circles in an image.

Parameters:
[in] Image Image where to look for the rectangles.
[in] circles Circles around which to look for rectangles.

cv::Rect MipAlgorithms::BearExtrCamUtils::build_roi_around_circle ( std::vector< cv::Point circle,
int  img_width,
int  img_height,
cv::Point center_C,
BearExtrCamPar par,
BearExtrCamVar var 
) [static]

Finds the center of a circle and builds a roi around it.

Parameters:
[in] circle Vector of cv:Point that are part of the circle.
[in] img_width Width of the image.
[in] img_height Height of the image.
[out] &center_C The center of the circle will be put here.
Returns:
A cv::Rect representing the roi in the image frame.

cv::Point MipAlgorithms::BearExtrCamUtils::computeContourCenter ( std::vector< cv::Point > &  square,
BearExtrCamPar par 
) [static]

void MipAlgorithms::BearExtrCamUtils::computeContourMaxMin ( std::vector< cv::Point > &  square,
cv::Point max,
cv::Point min,
BearExtrCamPar par 
) [static]

void MipAlgorithms::BearExtrCamUtils::findSquares1 ( const cv::Mat  image,
std::vector< std::vector< cv::Point > > &  squares,
BearExtrCamPar par,
BearExtrCamVar var 
) [static]

Decimal MipAlgorithms::BearExtrCamUtils::angle ( cv::Point  pt1,
cv::Point  pt2,
cv::Point  pt0 
) [static]

void MipAlgorithms::BearExtrCamUtils::findRoiInImage ( std::vector< cv::Point > &  region,
cv::Point  pointRoi 
) [static]

Gets the localization of a region of an image.

Decimal MipAlgorithms::BearExtrCamUtils::distPoint ( cv::Point  first,
cv::Point  second 
) [static]

Compute the Euler distance between two points.

cv::Point MipAlgorithms::BearExtrCamUtils::calc_middle_square ( std::vector< cv::Point square,
cv::Point  C_center 
) [static]

Compute the middle point.


The documentation for this class was generated from the following files:

Generated on Mon Feb 20 07:01:10 2017 for MIP by  doxygen 1.5.6