提交 0aac17d9 编写于 作者: M Maksim Shabunin

calib3d: check input values in dls

上级 f44a0960
...@@ -653,6 +653,7 @@ bool dls::is_empty(const cv::Mat * M) ...@@ -653,6 +653,7 @@ bool dls::is_empty(const cv::Mat * M)
bool dls::positive_eigenvalues(const cv::Mat * eigenvalues) bool dls::positive_eigenvalues(const cv::Mat * eigenvalues)
{ {
CV_Assert(eigenvalues && !eigenvalues->empty());
cv::MatConstIterator_<double> it = eigenvalues->begin<double>(); cv::MatConstIterator_<double> it = eigenvalues->begin<double>();
return *(it) > 0 && *(it+1) > 0 && *(it+2) > 0; return *(it) > 0 && *(it+1) > 0 && *(it+2) > 0;
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册