Вот мой код:
Код: Выделить всё
contours, hierarchy = cv2.findContours(copy.deepcopy(img_copy), cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
areas = [cv2.contourArea(c) for c in contours]
max_index = np.argmax(areas)
cnt = contours[max_index]
Подробнее здесь: https://stackoverflow.com/questions/379 ... urs-opencv
Мобильная версия