Commit fa27fe2b authored by berak's avatar berak

face: fix NaN's in bif.cpp

parent 62ed66cb
......@@ -201,8 +201,8 @@ void BIFImpl::computeUnit(int unit_idx, const cv::Mat &img,
int x1 = std::min(resp.cols, xc + Whalf);
int area = (y1-y0) * (x1-x0);
float mean = sum.at<float>(y1,x1) - sum.at<float>(y1,x0)
- sum.at<float>(y0,x1) + sum.at<float>(y0,x0);
double mean = sum.at<double>(y1,x1) - sum.at<double>(y1,x0)
- sum.at<double>(y0,x1) + sum.at<double>(y0,x0);
mean /= area;
double sd = sumsq.at<double>(y1,x1) - sumsq.at<double>(y1,x0)
......
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