import cv2

img = cv2.imread('image.jpg')
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
thresh_img = cv2.threshold(gray, 127, 255, 0)
contours, hierarchy = cv2.findContours(
    thresh_img[1], cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
cv2.drawContours(img, contours, -1, (255, 0, 0), 3)
cv2.imshow("contours", img)
cv2.waitKey(0)
cv2.destroyAllWindows()

d0be85ee967cbdd95252fc1f6443041d07dcc1f7
<mask token>

<mask token>
cv2.drawContours(img, contours, -1, (255, 0, 0), 3)
cv2.imshow('contours', img)
cv2.waitKey(0)
cv2.destroyAllWindows()

<mask token>
img = cv2.imread('image.jpg')
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
thresh_img = cv2.threshold(gray, 127, 255, 0)
contours, hierarchy = cv2.findContours(thresh_img[1], cv2.RETR_TREE, cv2.
    CHAIN_APPROX_SIMPLE)
cv2.drawContours(img, contours, -1, (255, 0, 0), 3)
cv2.imshow('contours', img)
cv2.waitKey(0)
cv2.destroyAllWindows()

import cv2
img = cv2.imread('image.jpg')
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
thresh_img = cv2.threshold(gray, 127, 255, 0)
contours, hierarchy = cv2.findContours(thresh_img[1], cv2.RETR_TREE, cv2.
    CHAIN_APPROX_SIMPLE)
cv2.drawContours(img, contours, -1, (255, 0, 0), 3)
cv2.imshow('contours', img)
cv2.waitKey(0)
cv2.destroyAllWindows()

import cv2

img = cv2.imread('image.jpg')
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
thresh_img = cv2.threshold(gray, 127, 255, 0)
contours, hierarchy = cv2.findContours(
    thresh_img[1], cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
cv2.drawContours(img, contours, -1, (255, 0, 0), 3)
cv2.imshow("contours", img)
cv2.waitKey(0)
cv2.destroyAllWindows()
