fix bug #3277 (findCirclesGrid failures):

findHomagraphy can return empty Mat in master branch
This commit is contained in:
Vladislav Vinogradov 2013-09-24 14:45:13 +04:00
parent c8b97271cc
commit e675684c81

View File

@ -836,6 +836,9 @@ Mat CirclesGridFinder::rectifyGrid(Size detectedGridSize, const std::vector<Poin
Mat H = findHomography(Mat(centers), Mat(dstPoints), RANSAC);
//Mat H = findHomography( Mat( corners ), Mat( dstPoints ) );
if (H.empty())
H = Mat::zeros(3, 3, CV_64FC1);
std::vector<Point2f> srcKeypoints;
for (size_t i = 0; i < keypoints.size(); i++)
{