diff --git a/process.py b/process.py index 0b52404..20c5ba2 100644 --- a/process.py +++ b/process.py @@ -50,7 +50,7 @@ def run(path): if ret == True: h, w, channels = frame.shape - smol = frame[int(h*0.5):int(h*0.9), int(w*0.55):int(w*0.8)] + smol = frame[int(h*0.5):int(h*0.9), int(w*0.63):int(w*0.8)] gray = cv2.cvtColor(smol, cv2.COLOR_BGR2GRAY) blurred = cv2.GaussianBlur(gray, (7, 7), 0) thresh = cv2.threshold(blurred, 235, 255, cv2.THRESH_BINARY)[1] @@ -59,7 +59,7 @@ def run(path): for c in cnts: area = cv2.contourArea(c) - if area > 28 and area < 80: + if area > 20 and area < 40: # compute the center of the contour M = cv2.moments(c) cX = int(M["m10"] / M["m00"])