Home | History | Annotate | Download | only in src

Lines Matching refs:holes

603       holes2 = holes;
604 holes.clear();
644 for (size_t i = 0; i < holes.size(); i++)
646 for (size_t j = 0; j < holes[i].size(); j++)
650 if (i != holes.size() - 1 && basisGraphs[k].areVerticesAdjacent(holes[i][j], holes[i + 1][j]))
652 basisGraphs[k].removeEdge(holes[i][j], holes[i + 1][j]);
655 if (j != holes[i].size() - 1 && basisGraphs[k].areVerticesAdjacent(holes[i][j], holes[i][j + 1]))
657 basisGraphs[k].removeEdge(holes[i][j], holes[i][j + 1]);
670 if (holes.size() != patternSize.height)
674 for (size_t i = 0; i < holes.size(); i++)
676 if (holes[i].size() != patternSize.width)
679 for (size_t j = 0; j < holes[i].size(); j++)
681 vertices.insert(holes[i][j]);
690 if (holes.size() < holes2.size() || holes[0].size() < holes2[0].size())
693 smallHoles = &holes;
697 largeHoles = &holes;
759 holes.clear();
772 holes.push_back(holesRow);
773 size_t w = holes[0].size();
774 size_t h = holes.size();
776 //parameters.minGraphConfidence = holes[0].size() * parameters.vertexGain + (holes[0].size() - 1) * parameters.edgeGain;
777 //parameters.minGraphConfidence = holes[0].size() * parameters.vertexGain + (holes[0].size() / 2) * parameters.edgeGain;
778 //parameters.minGraphConfidence = holes[0].size() * parameters.existingVertexGain + (holes[0].size() / 2) * parameters.edgeGain;
779 parameters.minGraphConfidence = holes[0].size() * parameters.existingVertexGain;
785 //parameters.minGraphConfidence = holes.size() * parameters.existingVertexGain + (holes.size() / 2) * parameters.edgeGain;
786 parameters.minGraphConfidence = holes.size() * parameters.existingVertexGain;
795 holes.resize(holesRow.size());
797 holes[i].push_back(holesRow[i]);
799 size_t w = holes[0].size();
800 size_t h = holes.size();
802 parameters.minGraphConfidence = holes.size() * parameters.existingVertexGain;
808 parameters.minGraphConfidence = holes[0].size() * parameters.existingVertexGain;
904 for (size_t i = 0; i < holes[seedLineIdx].size(); i++)
906 Point2f pt = keypoints[holes[seedLineIdx][i]] + basisVec;
908 seeds.push_back(holes[seedLineIdx][i]);
913 for (size_t i = 0; i < holes.size(); i++)
915 Point2f pt = keypoints[holes[i][seedLineIdx]] + basisVec;
917 seeds.push_back(holes[i][seedLineIdx]);
933 size_t lastIdx = addRow ? holes.size() - 1 : holes[0].size() - 1;
941 bool CirclesGridFinder::areCentersNew(const std::vector<size_t> &newCenters, const std::vector<std::vector<size_t> > &holes)
945 for (size_t j = 0; j < holes.size(); j++)
947 if (holes[j].end() != std::find(holes[j].begin(), holes[j].end(), newCenters[i]))
959 std::vector<std::vector<size_t> > &holes)
968 if (!areCentersNew(above, holes))
971 holes.insert(holes.begin(), above);
975 if (!areCentersNew(below, holes))
978 holes.insert(holes.end(), below);
985 if (!areCentersNew(above, holes))
988 for (size_t i = 0; i < holes.size(); i++)
990 holes[i].insert(holes[i].begin(), above[i]);
995 if (!areCentersNew(below, holes))
998 for (size_t i = 0; i < holes.size(); i++)
1000 holes[i].insert(holes[i].end(), below[i]);
1059 insertWinner(aboveConfidence, belowConfidence, parameters.minGraphConfidence, addRow, above, below, holes);
1376 for (size_t i = 0; i < holes.size(); i++)
1378 for (size_t j = 0; j < holes[i].size(); j++)
1380 if (j != holes[i].size() - 1)
1381 line(drawImage, keypoints[holes[i][j]], keypoints[holes[i][j + 1]], Scalar(255, 0, 0), 2);
1382 if (i != holes.size() - 1)
1383 line(drawImage, keypoints[holes[i][j]], keypoints[holes[i + 1][j]], Scalar(255, 0, 0), 2);
1385 //circle(drawImage, keypoints[holes[i][j]], holeRadius, holeColor, holeThickness);
1386 circle(drawImage, keypoints[holes[i][j]], holeRadius, holeColor, holeThickness);
1393 if (holes.size() == 0)
1396 return Size((int)holes[0].size(), (int)holes.size());
1403 for (size_t i = 0; i < holes.size(); i++)
1405 for (size_t j = 0; j < holes[i].size(); j++)
1407 outHoles.push_back(keypoints[holes[i][j]]);