Here is my and I want to do mask and get this as
thresh = cv2.threshold(gray, 0, 255, cv2.THRESH_BINARY)[1] # use morphology to close figure kernel = cv2.ge