You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def main(x, path): # since this is meant to be used for multiple images, I will make a subroutine instead of a sequence, so multiple the function can be called several times for use instead of repeating a sequence (unnessary lines of code)
gray = cv2.cvtColor(x, cv2.COLOR_BGR2GRAY)
gray1 = gray.copy()
et, thresh = cv2.threshold(gray, 200, 255, cv2.THRESH_OTSU)
cv2.drawContours(gray, contours,-1 ,(0, 0, 0), 2,cv2.LINE_AA) # this method of cv2 draws out the contours (output of cv2.findContours()) onto the original