1
0
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:
Vadim Pisarevsky
2013-02-28 18:25:05 +04:00
parent 891d7da6ee
commit 374e3a0890
15 changed files with 2623 additions and 2413 deletions
+7 -5
View File
@@ -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;