mirror of
https://github.com/opencv/opencv.git
synced 2025-07-25 14:47:07 +08:00
Fix error message fisheye CALIB_CHECK_COND
The old error message was not giving any hint which input array (image) led to an ill conditioned matrix. This made it near impossible to identify poor images in a larger set. A better approach would be to implement a checker function which gives each image a rating before the real calibration is performed. This could also include some image properties like sharpness, etc.
This commit is contained in:
parent
e5aa213554
commit
5ca7dcc6e7
@ -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<double>(0) / svd.w.at<double>((int)svd.w.total() - 1) < thresh_cond);
|
||||
if(svd.w.at<double>(0) / svd.w.at<double>((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));
|
||||
|
Loading…
Reference in New Issue
Block a user