Commit 0aac17d9 authored by Maksim Shabunin's avatar Maksim Shabunin

calib3d: check input values in dls

parent 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% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment