def main():
    while True:
        img = ImageGrab.grab(bbox=(0, 40, 1075, 640))
        vanilla = img_np = np.array(img)
        img_np = np.array(img)
        gray = cv2.cvtColor(img_np, cv2.COLOR_BGR2GRAY)
        (_, binary) = cv2.threshold(gray, 100, 255, cv2.THRESH_BINARY_INV)
        (contours, hierarchy) = cv2.findContours(binary, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
        image = cv2.drawContours(img_np, contours, (- 1), (0, 255, 0), 2)
        cv2.imshow('test', image)
        if ((cv2.waitKey(25) & 255) == ord('q')):
            cv2.destroyAllWindows()
            print('test')
            break
        else:
            cv2.waitKey(1)
def main():
    while True:
        img = ImageGrab.grab(bbox=(0, 40, 1075, 640))
        vanilla = img_np = np.array(img)
        img_np = np.array(img)
        gray = cv2.cvtColor(img_np, cv2.COLOR_BGR2GRAY)
        (_, binary) = cv2.threshold(gray, 100, 255, cv2.THRESH_BINARY_INV)
        (contours, hierarchy) = cv2.findContours(binary, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
        image = cv2.drawContours(img_np, contours, (- 1), (0, 255, 0), 2)
        cv2.imshow('test', image)
        if ((cv2.waitKey(25) & 255) == ord('q')):
            cv2.destroyAllWindows()
            print('test')
            break
        else:
            cv2.waitKey(1)