Update circlesgrid.cpp

Use identity matrix if homography finding failed. Current behavior zeros out all points.

Update circlesgrid.cpp

Addressed comments

Update circlesgrid.cpp

removed whitespace
This commit is contained in:
Matthias Grundmann 2017-03-24 13:29:04 -07:00 committed by Vladislav Sovrasov
parent 49e16a3c9f
commit de52887c49

View File

@ -839,7 +839,11 @@ Mat CirclesGridFinder::rectifyGrid(Size detectedGridSize, const std::vector<Poin
//Mat H = findHomography( Mat( corners ), Mat( dstPoints ) );
if (H.empty())
{
H = Mat::zeros(3, 3, CV_64FC1);
warpedKeypoints.clear();
return H;
}
std::vector<Point2f> srcKeypoints;
for (size_t i = 0; i < keypoints.size(); i++)