![]() |
Visual Servoing Platform version 3.6.0
|
#include <vpCircleHoughTransform.h>
Public Member Functions | |
| vpCircleHoughTransformParameters () | |
| vpCircleHoughTransformParameters (const int &gaussianKernelSize, const float &gaussianStdev, const int &sobelKernelSize, const float &lowerCannyThresh, const float &upperCannyThresh, const int &edgeMapFilterNbIter, const std::pair< int, int > ¢erXlimits, const std::pair< int, int > ¢erYlimits, const unsigned int &minRadius, const unsigned int &maxRadius, const int &dilatationNbIter, const float ¢erThresh, const float &radiusThreshRatio, const float &circlePerfectness, const float ¢erMinDistThresh, const float &mergingRadiusDiffThresh) | |
| std::string | toString () const |
| void | saveConfigurationInJSON (const std::string &jsonPath) const |
Static Public Member Functions | |
| static vpCircleHoughTransformParameters | createFromJSON (const std::string &jsonFile) |
Friends | |
| class | vpCircleHoughTransform |
| void | from_json (const json &j, vpCircleHoughTransformParameters ¶ms) |
| void | to_json (json &j, const vpCircleHoughTransformParameters ¶ms) |
Class that gather the algorithm parameters.
Definition at line 72 of file vpCircleHoughTransform.h.
|
inline |
Construct a new vpCircleHoughTransformParameters object with default parameters.
Definition at line 110 of file vpCircleHoughTransform.h.
Referenced by createFromJSON(), from_json, and to_json.
|
inline |
Construct a new vpCircleHoughTransformParameters object.
| [in] | gaussianKernelSize | Size of the Gaussian filter kernel used to smooth the input image. Must be an odd number. |
| [in] | gaussianStdev | Standard deviation of the Gaussian filter. |
| [in] | sobelKernelSize | Size of the Sobel kernels used to compute the gradients. Must be an odd number. |
| [in] | lowerCannyThresh | The lower threshold for the Canny operator. Values lower than this value are rejected. A negative value makes the algorithm compute this threshold and the lower one automatically. |
| [in] | upperCannyThresh | The upper threshold for the Canny operator. Only values greater than this value are marked as an edge. A negative value makes the algorithm compute this threshold and the lower one automatically. |
| [in] | edgeMapFilterNbIter | Number of 8-neighbor connectivity filtering iterations to apply to the edge map. |
| [in] | centerXlimits | Minimum and maximum position on the horizontal axis of the center of the circle we want to detect. |
| [in] | centerYlimits | Minimum and maximum position on the vertical axis of the center of the circle we want to detect. |
| [in] | minRadius | Minimum radius of the circles we want to detect. |
| [in] | maxRadius | Maximum radius of the circles we want to detect. |
| [in] | dilatationNbIter | Number of times dilatation is performed to detect the maximum number of votes for the center candidates |
| [in] | centerThresh | Minimum number of votes a point must exceed to be considered as center candidate. |
| [in] | radiusThreshRatio | Minimum number of votes per radian a radius candidate RC_ij of a center candidate CeC_i must have in order that the circle of center CeC_i and radius RC_ij must be considered as circle candidate. |
| [in] | circlePerfectness | The scalar product radius RC_ij . gradient(Ep_j) >= m_circlePerfectness * || RC_ij || * || gradient(Ep_j) || to add a vote for the radius RC_ij. |
| [in] | centerMinDistThresh | Two circle candidates whose centers are closer than this threshold are considered for merging. |
| [in] | mergingRadiusDiffThresh | Maximum radius difference between two circle candidates to consider merging them. |
Definition at line 153 of file vpCircleHoughTransform.h.
|
inlinestatic |
Create a new vpCircleHoughTransformParameters from a JSON file.
| [in] | jsonFile | The path towards the JSON file. |
Definition at line 222 of file vpCircleHoughTransform.h.
References vpException::ioError, and vpCircleHoughTransformParameters().
|
inline |
Save the configuration of the detector in a JSON file described by the path jsonPath. Throw a vpException is the file cannot be created.
| [in] | jsonPath | The path towards the JSON output file. |
Definition at line 254 of file vpCircleHoughTransform.h.
|
inline |
Create a string with all the Hough transform parameters.
Definition at line 194 of file vpCircleHoughTransform.h.
|
friend |
Read the detector configuration from JSON. All values are optional and if an argument is not present, the default value defined in the constructor is kept.
| [in] | j | : The JSON object, resulting from the parsing of a JSON file. |
| [out] | params | : The circle Hough transform parameters that will be initialized from the JSON data. |
Definition at line 269 of file vpCircleHoughTransform.h.
References vpException::badValue, and vpCircleHoughTransformParameters().
|
friend |
Parse a vpCircleHoughTransform into JSON format.
| [out] | j | : A JSON parser object. |
| [in] | params | : The circle Hough transform parameters that will be serialized in the json object. |
Definition at line 328 of file vpCircleHoughTransform.h.
References vpCircleHoughTransformParameters().
|
friend |
Definition at line 105 of file vpCircleHoughTransform.h.
References vpCircleHoughTransform.
Referenced by vpCircleHoughTransform.