Skip to content

Commit 823353d

Browse files
authored
Merge pull request opencv#9067 from D-Alex:master
Fix error message fisheye CALIB_CHECK_COND
2 parents 639e736 + 5ca7dcc commit 823353d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/calib3d/src/fisheye.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1401,7 +1401,8 @@ void cv::internal::CalibrateExtrinsics(InputArrayOfArrays objectPoints, InputArr
14011401
if (check_cond)
14021402
{
14031403
SVD svd(JJ_kk, SVD::NO_UV);
1404-
CV_Assert(svd.w.at<double>(0) / svd.w.at<double>((int)svd.w.total() - 1) < thresh_cond);
1404+
if(svd.w.at<double>(0) / svd.w.at<double>((int)svd.w.total() - 1) > thresh_cond )
1405+
CV_Error( cv::Error::StsInternal, format("CALIB_CHECK_COND - Ill-conditioned matrix for input array %d",image_idx));
14051406
}
14061407
omckk.reshape(3,1).copyTo(omc.getMat().col(image_idx));
14071408
Tckk.reshape(3,1).copyTo(Tc.getMat().col(image_idx));

0 commit comments

Comments
 (0)