@@ -714,6 +714,30 @@ found, or as colored corners connected with lines if the board was found.
714
714
CV_EXPORTS_W void drawChessboardCorners ( InputOutputArray image, Size patternSize,
715
715
InputArray corners, bool patternWasFound );
716
716
717
+ struct CV_EXPORTS_W_SIMPLE CirclesGridFinderParameters
718
+ {
719
+ CV_WRAP CirclesGridFinderParameters ();
720
+ CV_PROP_RW cv::Size2f densityNeighborhoodSize;
721
+ CV_PROP_RW float minDensity;
722
+ CV_PROP_RW int kmeansAttempts;
723
+ CV_PROP_RW int minDistanceToAddKeypoint;
724
+ CV_PROP_RW int keypointScale;
725
+ CV_PROP_RW float minGraphConfidence;
726
+ CV_PROP_RW float vertexGain;
727
+ CV_PROP_RW float vertexPenalty;
728
+ CV_PROP_RW float existingVertexGain;
729
+ CV_PROP_RW float edgeGain;
730
+ CV_PROP_RW float edgePenalty;
731
+ CV_PROP_RW float convexHullFactor;
732
+ CV_PROP_RW float minRNGEdgeSwitchDist;
733
+
734
+ enum GridType
735
+ {
736
+ SYMMETRIC_GRID, ASYMMETRIC_GRID
737
+ };
738
+ GridType gridType;
739
+ };
740
+
717
741
/* * @brief Finds centers in the grid of circles.
718
742
719
743
@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
726
750
- **CALIB_CB_CLUSTERING** uses a special algorithm for grid detection. It is more robust to
727
751
perspective distortions but much more sensitive to background clutter.
728
752
@param blobDetector feature detector that finds blobs like dark circles on light background.
753
+ @param parameters struct for finding circles in a grid pattern.
729
754
730
755
The function attempts to determine whether the input image contains a grid of circles. If it is, the
731
756
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: :
745
770
@note The function requires white space (like a square-thick border, the wider the better) around
746
771
the board to make the detection more robust in various environments.
747
772
*/
773
+ CV_EXPORTS_W bool findCirclesGrid ( InputArray image, Size patternSize,
774
+ OutputArray centers, int flags,
775
+ const Ptr<FeatureDetector> &blobDetector,
776
+ CirclesGridFinderParameters parameters);
777
+
778
+ /* * @overload */
748
779
CV_EXPORTS_W bool findCirclesGrid ( InputArray image, Size patternSize,
749
780
OutputArray centers, int flags = CALIB_CB_SYMMETRIC_GRID,
750
781
const Ptr<FeatureDetector> &blobDetector = SimpleBlobDetector::create());
0 commit comments