Skip to content
Snippets Groups Projects
Commit afc129a7 authored by Sebastian Hahta's avatar Sebastian Hahta
Browse files

Added missing error check

F can't be estimated should cameras have critical configuration.
parent bfdcc2b7
No related branches found
No related tags found
No related merge requests found
......@@ -393,6 +393,13 @@ double MultiCameraCalibrationNew::calibratePair(size_t camera_from, size_t camer
vector<uchar> inliers;
Mat F, E;
F = cv::findFundamentalMat(points1, points2, fm_method_, fm_ransac_threshold_, fm_confidence_, inliers);
if (F.empty())
{
LOG(ERROR) << "Fundamental matrix estimation failed. Possibly degenerate configuration?";
return INFINITY;
}
E = K2.t() * F * K1;
// Only include inliers
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment