sid_process.py
@@ -1,8 +1,6 @@ import cv2 import numpy as np from skimage import morphology, img_as_ubyte from sklearn import svm from sklearn.externals import joblib """ @@ -90,7 +88,7 @@ move_left = 0 # find biggest block of pixels image1 = cv2.morphologyEx(image, cv2.MORPH_DILATE, kernel(5, 25), iterations=3) image1 = cv2.morphologyEx(image, cv2.MORPH_DILATE, kernel(5, 25), iterations=4) cv2.imwrite("sidblock1.png", image1) im2, ctrs, hier = cv2.findContours( image1.copy(), cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE