import numpy as np
import cv2 as cv
im = cv.imread('images\\frame24.jpg').copy()
imgray = cv.cvtColor(im, cv.COLOR_BGR2GRAY)
ret, thresh = cv.threshold(imgray, 127, 255, 0)
contours, hierarchy = cv.findContours(thresh, cv.RETR_TREE, cv.CHAIN_APPROX_SIMPLE)
cv.drawContours(im, contours, -1, (0,255,0), 3)

cv.imshow('image',im)
cv.waitKey(0)
cv.destroyAllWindows()