|
| CornerDetectorCSS (float angle_thresh=162., float rc_coeff=1.5, float sigma=3., float curvature_cutoff=100., float straight_line_thresh=0.1, bool accurate=false) |
| Default constructor with given arguments. More...
|
|
| ~CornerDetectorCSS () |
| Destructor. More...
|
|
virtual void | setPropertyValue (const std::string &propertyName, const utils::Any &value) |
| sets value of a property (always call call_callbacks(propertyName) or Configurable::setPropertyValue) More...
|
|
virtual std::vector< std::string > | getPropertyList () const |
| returns Configurable property list More...
|
|
virtual std::string | getPropertyType (const std::string &propertyName) const |
| returns type of given property More...
|
|
virtual std::string | getPropertyInfo (const std::string &propertyName) const |
| returns info for given property More...
|
|
virtual utils::Any | getPropertyValue (const std::string &propertyName) const |
| returns value for given property More...
|
|
virtual int | getPropertyVolatileness (const std::string &propertyName) const |
| returns volatileness for given property More...
|
|
virtual std::string | getPropertyToolTip (const std::string &propertyName) const |
| returns property descriptions More...
|
|
template<class T > |
ICLCV_API const std::vector< std::vector< utils::Point32f > > & | detectCorners (const std::vector< std::vector< T > > &boundaries, const std::vector< icl32f > &sigmas) |
| detects the corners in the passed contour More...
|
|
template<class T > |
ICLCV_API const std::vector< utils::Point32f > & | detectCorners (const std::vector< T > &boundary) |
|
const std::vector< utils::Point32f > & | getLastCorners () const |
| returns the result of last detectCorners call More...
|
|
void | setAngleThreshold (float value) |
|
void | setRCCoeff (float value) |
|
void | setSigma (float value) |
|
void | setCurvatureCutoff (float value) |
|
void | setStraightLineThreshold (float value) |
|
void | setAccurate (bool value) |
|
float | getAngleThreshold () const |
|
float | getRCCoeff () const |
|
float | getSigma () const |
|
float | getCurvatureCutoff () const |
|
float | getStraightLineThreshold () const |
|
bool | getAccurate () const |
|
virtual | ~Configurable () |
| virtual destructor More...
|
|
| Configurable (const Configurable &other) |
| Copy constructor. More...
|
|
Configurable & | operator= (const Configurable &other) |
| Assignment operator. More...
|
|
void | setConfigurableID (const std::string &ID) |
| sets the ID of this configurable More...
|
|
const std::string & | getConfigurableID () const |
| returns the configurables static ID More...
|
|
bool | isOrderedFlagSet () const |
| returns whether the ordered flag is set More...
|
|
void | deactivateProperty (const std::string &pattern) |
| adds an additional deativation pattern More...
|
|
void | deleteDeactivationPattern (const std::string &pattern) |
| removed a formerly added deactivation pattern More...
|
|
std::vector< std::string > | getPropertyListWithoutDeactivated () const |
| this returns a filtered list of properties (using all filters added by deactivateProperty) More...
|
|
virtual void | adaptProperty (const std::string &name, const std::string &newType, const std::string &newInfo, const std::string &newToolTip) |
| this function can be used to adapt a specific property afterwards More...
|
|
void | registerCallback (const Callback &cb) |
| add a callback for changed properties More...
|
|
void | removedCallback (const Callback &cb) |
| removes a callback that was registered before More...
|
|
void | syncChangesTo (Configurable *others, int num=1) |
| this can be used to let this instance also apply property changes to others More...
|
|
virtual bool | supportsProperty (const std::string &propertyName) const |
| base implementation for property check (seaches in the property list) More...
|
|
virtual void | saveProperties (const std::string &filename, const std::vector< std::string > &propertiesToSkip=EMPTY_VEC) const |
| writes all available properties into a file More...
|
|
virtual void | loadProperties (const std::string &filename, const std::vector< std::string > &propertiesToSkip=EMPTY_VEC) |
| reads a camera config file from disc More...
|
|
|
int | gauss_radius (float sigma, float cutoff) |
|
void | fill_gauss (float *mask, float sigma, int width) |
|
void | convolute (const float *data, int data_length, const float *mask, int mask_length, float *convoluted) |
|
void | calculate_curvatures (const float *smoothed_x, const float *smoothed_y, int length, float curvature_cutoff, float *curvatures) |
|
void | calculate_curvatures_bulk (int array_length, int num_boundaries, const int *lengths, const int *indices, const int *indices_padded, const float *smoothed_x, const float *smoothed_y, float curvature_cutoff, float *curvature) |
|
int | findExtrema (int *extrema, int *num_extrema_out, float *k, int length) |
|
void | removeRoundCorners (float rc_coeff, int maxima_offset, float *k, int length, int *extrema, int num_extrema, int *new_extrema, int *num_new_extrema_out) |
|
void | removeRoundCornersAccurate (float rc_coeff, int maxima_offset, float *k, int length, int *extrema, int num_extrema, int *extrema_out, int *num_extrema_out) |
|
float | cornerAngle (float *x, float *y, int prev, int current, int next, int length, float straight_line_thresh) |
|
float | cornerAngleAccurate (float *x, float *y, int prev, int current, int next, int array_length, float straight_line_thresh) |
|
void | removeFalseCorners (float angle_thresh, float *x, float *y, float *k, int length, int *maxima, int num_maxima, int *maxima_out, int *num_maxima_out) |
|
Curvature Corner Detector.
Implementation of the Curvature Scale Space corner detection algorithm described in the paper "Corner detector based on global and local curvature properties", by Chen He, Xiao and Yung, Nelson H.C. in Optical Engineering 2008. There also is a Matlab implementation of the algorithm by Chen He, Xiao available at http://www.mathworks.com/matlabcentral/fileexchange/7652
The algorithm takes an array of contour points as input, that are then smoothed by a gaussian filter. Afterwards the curvature function is calculated and its maxima positions are taken as corner candidates. Afterwards all candidates which belong to round or "false" (noise induced, etc.) corners are removed and finally a list of corners is given back.
Parameters for the algorithm are:
- rc_coeff denotes the minimum ratio of major axis to minor axis of an ellipse, whose vertex could be detected as a corner by proposed detector The default value is 1.5.
- angle_thresh denotes the maximum obtuse angle that a corner can have when it is detected as a true corner, default value is 162.
- sigma denotes the standard deviation of the Gaussian filter when computeing curvature. The default sig is 3.
straight_line_thresh to estimate the angle of a corner, either a circle or a straight line approximation of the left and right surrounding is used. The straight line approximation is used, if the angle between the left neigbour, corner candidate and and the point on the contour half way between them is smaller than straight_line_thresh. 0 leads to circle approximation only, 180 to straight line approximation only.
Diffent to the reference implementation of Xiao He, the second half of the contour is copied before the start of the contour and the first half of the contour is copied behind the end of the contour. That way, the (artificially) first and last corners in the closed contour are calculated more acurately, since there are no discontinuities.
usage example:
const std::vector<icl::Region> &rs = d.detect(&image);
const std::vector<Point32f> &boundary = getThinnedBoundary(rs[0].getBoundary());
const std::vector<Point32f> &
corners = css.detectCorners(boundary);