mirror of
https://github.com/opencv/opencv.git
synced 2025-07-20 19:17:36 +08:00
calib3d: check input values in dls
This commit is contained in:
parent
f44a0960df
commit
0aac17d9f7
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user