OpenCV in Python fornisce il seguente codice:Come rimuovere un contorno all'interno del contorno in Python OpenCV?
regions, hierarchy = cv2.findContours(binary_image, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE)
for region in regions:
x, y, w, h = cv2.boundingRect(region)
cv2.rectangle(image, (x, y), (x + w, y + h), (0, 255, 0), 1)
Questo dà alcuni contorni all'interno di contorno. Come rimuoverli in Python?
Grazie! Mi hai salvato. – Tegos