1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23: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
+2
View File
@@ -111,6 +111,7 @@ vector<Vec3d> QRDecode::searchVerticalLines()
for (size_t i = 0; i < test_lines.size(); i++) { length += test_lines[i]; }
CV_Assert(length > 0);
for (size_t i = 0; i < test_lines.size(); i++)
{
if (i == 2) { weight += abs((test_lines[i] / length) - 3.0/7.0); }
@@ -182,6 +183,7 @@ vector<Point2f> QRDecode::separateHorizontalLines(vector<Vec3d> list_lines)
for (size_t i = 0; i < test_lines.size(); i++) { length += test_lines[i]; }
CV_Assert(length > 0);
for (size_t i = 0; i < test_lines.size(); i++)
{
if (i % 3 == 0) { weight += abs((test_lines[i] / length) - 3.0/14.0); }