I have such an image with contours

And when I iterate over the contours like
cnts = cv2.findContours(edged.copy(), cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE)[1]
for c in cnts:
peri = cv2.arcLength(c, True)
approx = cv2.approxPolyDP(c, 0.02 * peri, True)
I cannot get the largest outline of the whole document, I think, because it is not closed. So, is there a way to get this outline?
source
share