@@ -2094,9 +2094,19 @@ void cv::drawChessboardCorners( InputOutputArray _image, Size patternSize,
2094
2094
nelems, patternWasFound );
2095
2095
}
2096
2096
2097
- bool cv::findCirclesGrid ( InputArray _image, Size patternSize,
2097
+ bool cv::findCirclesGrid ( InputArray image, Size patternSize,
2098
+ OutputArray centers, int flags,
2099
+ const Ptr<FeatureDetector> &blobDetector,
2100
+ CirclesGridFinderParameters parameters)
2101
+ {
2102
+ CirclesGridFinderParameters2 parameters2;
2103
+ *((CirclesGridFinderParameters*)¶meters2) = parameters;
2104
+ return cv::findCirclesGrid2 (image, patternSize, centers, flags, blobDetector, parameters2);
2105
+ }
2106
+
2107
+ bool cv::findCirclesGrid2 ( InputArray _image, Size patternSize,
2098
2108
OutputArray _centers, int flags, const Ptr<FeatureDetector> &blobDetector,
2099
- CirclesGridFinderParameters parameters)
2109
+ CirclesGridFinderParameters2 parameters)
2100
2110
{
2101
2111
CV_INSTRUMENT_REGION ()
2102
2112
@@ -2115,19 +2125,19 @@ bool cv::findCirclesGrid( InputArray _image, Size patternSize,
2115
2125
points.push_back (keypoints[i].pt );
2116
2126
}
2117
2127
2128
+ if (flags & CALIB_CB_ASYMMETRIC_GRID)
2129
+ parameters.gridType = CirclesGridFinderParameters::ASYMMETRIC_GRID;
2130
+ if (flags & CALIB_CB_SYMMETRIC_GRID)
2131
+ parameters.gridType = CirclesGridFinderParameters::SYMMETRIC_GRID;
2132
+
2118
2133
if (flags & CALIB_CB_CLUSTERING)
2119
2134
{
2120
- CirclesGridClusterFinder circlesGridClusterFinder (isAsymmetricGrid );
2135
+ CirclesGridClusterFinder circlesGridClusterFinder (parameters );
2121
2136
circlesGridClusterFinder.findGrid (points, patternSize, centers);
2122
2137
Mat (centers).copyTo (_centers);
2123
2138
return !centers.empty ();
2124
2139
}
2125
2140
2126
- if (flags & CALIB_CB_ASYMMETRIC_GRID)
2127
- parameters.gridType = CirclesGridFinderParameters::ASYMMETRIC_GRID;
2128
- if (flags & CALIB_CB_SYMMETRIC_GRID)
2129
- parameters.gridType = CirclesGridFinderParameters::SYMMETRIC_GRID;
2130
-
2131
2141
const int attempts = 2 ;
2132
2142
const size_t minHomographyPoints = 4 ;
2133
2143
Mat H;
@@ -2191,7 +2201,7 @@ bool cv::findCirclesGrid( InputArray _image, Size patternSize,
2191
2201
bool cv::findCirclesGrid ( InputArray _image, Size patternSize,
2192
2202
OutputArray _centers, int flags, const Ptr<FeatureDetector> &blobDetector)
2193
2203
{
2194
- return cv::findCirclesGrid (_image, patternSize, _centers, flags, blobDetector, CirclesGridFinderParameters ());
2204
+ return cv::findCirclesGrid2 (_image, patternSize, _centers, flags, blobDetector, CirclesGridFinderParameters2 ());
2195
2205
}
2196
2206
2197
2207
/* End of file. */
0 commit comments