mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-19 02:16:34 +08:00
Merge pull request #837 from savuor:fix/bif_nan_sqrt
This commit is contained in:
@@ -207,7 +207,7 @@ void BIFImpl::computeUnit(int unit_idx, const cv::Mat &img,
|
||||
|
||||
double sd = sumsq.at<double>(y1,x1) - sumsq.at<double>(y1,x0)
|
||||
- sumsq.at<double>(y0,x1) + sumsq.at<double>(y0,x0);
|
||||
sd = sqrt(sd / area - mean * mean);
|
||||
sd = sqrt(std::max(0.0, sd / area - mean * mean));
|
||||
|
||||
dst.at<float>(pos) = static_cast<float>(sd);
|
||||
}
|
||||
|
Reference in New Issue
Block a user