Commit e675684c authored by Vladislav Vinogradov's avatar Vladislav Vinogradov

fix bug #3277 (findCirclesGrid failures):

findHomagraphy can return empty Mat in master branch
parent c8b97271
...@@ -836,6 +836,9 @@ Mat CirclesGridFinder::rectifyGrid(Size detectedGridSize, const std::vector<Poin ...@@ -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(centers), Mat(dstPoints), RANSAC);
//Mat H = findHomography( Mat( corners ), Mat( dstPoints ) ); //Mat H = findHomography( Mat( corners ), Mat( dstPoints ) );
if (H.empty())
H = Mat::zeros(3, 3, CV_64FC1);
std::vector<Point2f> srcKeypoints; std::vector<Point2f> srcKeypoints;
for (size_t i = 0; i < keypoints.size(); i++) for (size_t i = 0; i < keypoints.size(); i++)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment