1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

Fixed issues found by static analysis (mostly DBZ)

This commit is contained in:
Maksim Shabunin
2018-07-17 16:14:54 +03:00
parent 78d07e841d
commit 1da46fe6fb
26 changed files with 71 additions and 19 deletions
+1
View File
@@ -772,6 +772,7 @@ bool LineSegmentDetectorImpl::refine(std::vector<RegionPoint>& reg, double reg_a
++n;
}
}
CV_Assert(n > 0);
double mean_angle = sum / double(n);
// 2 * standard deviation
double tau = 2.0 * sqrt((s_sum - 2.0 * mean_angle * sum) / double(n) + mean_angle * mean_angle);