diff --git a/modules/calib3d/src/fisheye.cpp b/modules/calib3d/src/fisheye.cpp index 6975690113..efd7f6585a 100644 --- a/modules/calib3d/src/fisheye.cpp +++ b/modules/calib3d/src/fisheye.cpp @@ -1401,7 +1401,8 @@ void cv::internal::CalibrateExtrinsics(InputArrayOfArrays objectPoints, InputArr if (check_cond) { SVD svd(JJ_kk, SVD::NO_UV); - CV_Assert(svd.w.at(0) / svd.w.at((int)svd.w.total() - 1) < thresh_cond); + if(svd.w.at(0) / svd.w.at((int)svd.w.total() - 1) > thresh_cond ) + CV_Error( cv::Error::StsInternal, format("CALIB_CHECK_COND - Ill-conditioned matrix for input array %d",image_idx)); } omckk.reshape(3,1).copyTo(omc.getMat().col(image_idx)); Tckk.reshape(3,1).copyTo(Tc.getMat().col(image_idx));