diff --git a/modules/calib3d/src/sqpnp.cpp b/modules/calib3d/src/sqpnp.cpp index 973e95d000..ef2a047d80 100644 --- a/modules/calib3d/src/sqpnp.cpp +++ b/modules/calib3d/src/sqpnp.cpp @@ -453,6 +453,7 @@ bool PoseSolver::invertSPD3x3(const cv::Matx& A, cv::Matx& Q, t12 = c * c; double det = -t4 * f + a * t2 + t7 * f - 2.0 * t9 * e + t12 * d; - if (fabs(det) < threshold) return false; + if (fabs(det) < threshold) { cv::invert(Q, Qinv, cv::DECOMP_SVD); return false; } // fall back to pseudoinverse // 3. Inverse double t15, t20, t24, t30;