From 9c222b2a0b151e7219e30f0145aa92872890d838 Mon Sep 17 00:00:00 2001
From: Samo Penic <samo.penic@gmail.com>
Date: Wed, 21 Nov 2018 18:48:59 +0000
Subject: [PATCH] Fixes in qr code, in sid third algoritm in answer matrix finding locations...

---
 aoi_ocr/sid_process.py |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/aoi_ocr/sid_process.py b/aoi_ocr/sid_process.py
index 04dbc8d..d8798f1 100644
--- a/aoi_ocr/sid_process.py
+++ b/aoi_ocr/sid_process.py
@@ -17,14 +17,14 @@
 
 def find_biggest_blob(image, original_image,sid_mask):
     if sid_mask[0] == "1":
-        move_left = 45
+        move_left = 35
     elif sid_mask[0] == "x":
-        move_left = 55
+        move_left = 40
     else:
         move_left = 0
        # Remove noise
     image2 = cv2.morphologyEx(
-        original_image, cv2.MORPH_OPEN, kernel(2, 2), iterations=7
+        original_image, cv2.MORPH_OPEN, kernel(2, 2), iterations=3
     )
     # find biggest block of pixels
     image1 = cv2.morphologyEx(image2, cv2.MORPH_DILATE, kernel(5, 25), iterations=4)
@@ -186,14 +186,14 @@
     sid_err = []
     image = 255 - image
     image_original = image.copy()
-    image = img_as_ubyte(image > 100)
+    image = img_as_ubyte(image > 70)
     cv2.imwrite("/tmp/enSID0.png", image)
 
     # Remove noise
-    image = cv2.morphologyEx(image, cv2.MORPH_OPEN, kernel(2, 2), iterations=3)
+    #image = cv2.morphologyEx(image, cv2.MORPH_OPEN, kernel(2, 2), iterations=3)
 
     # Closing. Connect non connected parts
-    image = cv2.morphologyEx(image, cv2.MORPH_CLOSE, kernel(5, 3), iterations=4)
+    image = cv2.morphologyEx(image, cv2.MORPH_CLOSE, kernel(5, 1), iterations=4)
 
     # Again noise removal after closing
     # image = cv2.morphologyEx(image, cv2.MORPH_OPEN, kernel(8, 8), iterations=1)

--
Gitblit v1.9.3