1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 08:13:04 +04:00

Fixed several GCC 5.x warnings

This commit is contained in:
Maksim Shabunin
2016-08-31 23:12:52 +03:00
committed by Alexander Alekhin
parent 4d041e6809
commit 21167b1bf1
21 changed files with 70 additions and 61 deletions
+7 -4
View File
@@ -166,6 +166,7 @@ double showFlowAndCalcError(const string& name, const Mat& gray, const Mat& flow
bool all = true;
Mat inner = flow(where);
for(int y = 0; y < inner.rows; ++y)
{
for(int x = 0; x < inner.cols; ++x)
{
const Point2f f = inner.at<Point2f>(y, x);
@@ -178,12 +179,14 @@ double showFlowAndCalcError(const string& name, const Mat& gray, const Mat& flow
double a = atan2(f.y, f.x);
error += fabs(angle - a);
}
double res = all ? numeric_limits<double>::max() : error / (inner.cols * inner.rows);
}
if (writeError)
cout << "Error " + name << " = " << res << endl;
double res = all ? numeric_limits<double>::max() : error / (inner.cols * inner.rows);
return res;
if (writeError)
cout << "Error " + name << " = " << res << endl;
return res;
}