Find countors on a dark background
Find countours on a dark background Question: Suppose, I have a dark image on a white background. For example, the image below: With the code below, I can easily extract its countors import imutils import cv2 image = cv2.imread("image.jpg") image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) image = imutils.resize(image, width = 64) thresh = cv2.adaptiveThreshold(image, 255, cv2.ADAPTIVE_THRESH_MEAN_C, cv2.THRESH_BINARY_INV, …