From e0996e35862256114826a6314dc649972972a60c Mon Sep 17 00:00:00 2001 From: Samo Penic <samo.penic@gmail.com> Date: Sat, 17 Nov 2018 13:42:52 +0000 Subject: [PATCH] Multiple SID robustness.. --- sid_process.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sid_process.py b/sid_process.py index ab8aaa3..f21fafb 100644 --- a/sid_process.py +++ b/sid_process.py @@ -210,11 +210,11 @@ cv2.imwrite("enhancedSID.png", image) sid_no = segment_by_contours(image, image_original, classifier, sid_mask) - print(sid_no) + if len(sid_no) != len(sid_mask) or not sid_compare(sid_no, sid_mask): sid_warn.append("Trying second SID algorithm.") sid_no = segment_by_7segments(image, image_original, sid_mask, classifier) - print(sid_no) + if (len(sid_no)) != len(sid_mask): sid_no = segment_by_sid_len(image, image_original, sid_mask, classifier) sid_warn.append("Trying third SID algorithm.") -- Gitblit v1.9.3