1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

Expose CirclesGridFinderParameters in findCirclesGrid.

This commit is contained in:
Hans Gaiser
2017-03-01 11:52:25 +01:00
parent f46fa6e096
commit 11b24eb49f
6 changed files with 62 additions and 39 deletions
@@ -714,6 +714,30 @@ found, or as colored corners connected with lines if the board was found.
CV_EXPORTS_W void drawChessboardCorners( InputOutputArray image, Size patternSize,
InputArray corners, bool patternWasFound );
struct CV_EXPORTS_W_SIMPLE CirclesGridFinderParameters
{
CV_WRAP CirclesGridFinderParameters();
CV_PROP_RW cv::Size2f densityNeighborhoodSize;
CV_PROP_RW float minDensity;
CV_PROP_RW int kmeansAttempts;
CV_PROP_RW int minDistanceToAddKeypoint;
CV_PROP_RW int keypointScale;
CV_PROP_RW float minGraphConfidence;
CV_PROP_RW float vertexGain;
CV_PROP_RW float vertexPenalty;
CV_PROP_RW float existingVertexGain;
CV_PROP_RW float edgeGain;
CV_PROP_RW float edgePenalty;
CV_PROP_RW float convexHullFactor;
CV_PROP_RW float minRNGEdgeSwitchDist;
enum GridType
{
SYMMETRIC_GRID, ASYMMETRIC_GRID
};
GridType gridType;
};
/** @brief Finds centers in the grid of circles.
@param image grid view of input circles; it must be an 8-bit grayscale or color image.
@@ -726,6 +750,7 @@ CV_EXPORTS_W void drawChessboardCorners( InputOutputArray image, Size patternSiz
- **CALIB_CB_CLUSTERING** uses a special algorithm for grid detection. It is more robust to
perspective distortions but much more sensitive to background clutter.
@param blobDetector feature detector that finds blobs like dark circles on light background.
@param parameters struct for finding circles in a grid pattern.
The function attempts to determine whether the input image contains a grid of circles. If it is, the
function locates centers of the circles. The function returns a non-zero value if all of the centers
@@ -745,6 +770,12 @@ Sample usage of detecting and drawing the centers of circles: :
@note The function requires white space (like a square-thick border, the wider the better) around
the board to make the detection more robust in various environments.
*/
CV_EXPORTS_W bool findCirclesGrid( InputArray image, Size patternSize,
OutputArray centers, int flags,
const Ptr<FeatureDetector> &blobDetector,
CirclesGridFinderParameters parameters);
/** @overload */
CV_EXPORTS_W bool findCirclesGrid( InputArray image, Size patternSize,
OutputArray centers, int flags = CALIB_CB_SYMMETRIC_GRID,
const Ptr<FeatureDetector> &blobDetector = SimpleBlobDetector::create());