calib3d: check input values in dls

This commit is contained in:
Maksim Shabunin 2020-03-24 12:22:26 +03:00
parent f44a0960df
commit 0aac17d9f7

View File

@ -653,6 +653,7 @@ bool dls::is_empty(const cv::Mat * M)
bool dls::positive_eigenvalues(const cv::Mat * eigenvalues)
{
CV_Assert(eigenvalues && !eigenvalues->empty());
cv::MatConstIterator_<double> it = eigenvalues->begin<double>();
return *(it) > 0 && *(it+1) > 0 && *(it+2) > 0;
}