mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 08:13:04 +04:00
rewritten several functions from calib3d: findhomography, findfundamentalmat, findessentialmat, estimateaffine3d, computecorrespondepilines, convert points{to/from}homogeneous to C++.
This commit is contained in:
@@ -402,14 +402,16 @@ void CirclesGridClusterFinder::parsePatternPoints(const std::vector<cv::Point2f>
|
||||
else
|
||||
idealPt = Point2f(j*squareSize, i*squareSize);
|
||||
|
||||
std::vector<float> query = Mat(idealPt);
|
||||
Mat query(1, 2, CV_32F, &idealPt);
|
||||
int knn = 1;
|
||||
std::vector<int> indices(knn);
|
||||
std::vector<float> dists(knn);
|
||||
int indicesbuf = 0;
|
||||
float distsbuf = 0.f;
|
||||
Mat indices(1, knn, CV_32S, &indicesbuf);
|
||||
Mat dists(1, knn, CV_32F, &distsbuf);
|
||||
flannIndex.knnSearch(query, indices, dists, knn, flann::SearchParams());
|
||||
centers.push_back(patternPoints.at(indices[0]));
|
||||
centers.push_back(patternPoints.at(indicesbuf));
|
||||
|
||||
if(dists[0] > maxRectifiedDistance)
|
||||
if(distsbuf > maxRectifiedDistance)
|
||||
{
|
||||
#ifdef DEBUG_CIRCLES
|
||||
cout << "Pattern not detected: too large rectified distance" << endl;
|
||||
|
||||
Reference in New Issue
Block a user