I am trying to find the biggest contour in an image which contains 2 contours and one of those are not close line. the contour line is cut from the edge of the image. the other one is close and consist an area.
roi_cnts = sorted(roi_cnts, key = cv2.contourArea, reverse = True)[:1]
is different from
roi_cnts = max(roi_cnts, key=cv2.contourArea)
#or
roi_cnts = sorted(roi_cnts, key = cv2.contourArea, reverse = True)[0]
I don't understand why the two method have different result.