0

I got this code from online. Can someone help me what went wrong? Here's the snippet where the error popped up:

import cv2
import numpy as np

_, contours, _ = cv2.findContours(Nucleus_img, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
pad_del = np.zeros_like(Nucleus_img)
Josef
  • 2,124
  • 1
  • 20
  • 21

1 Answers1

0

The CV2 findCountours function return 2 values, not 3. They are contours and hierarchy.

Change your code, for example:

contours, hierarchy = cv2.findContours(...)
jarmod
  • 59,580
  • 13
  • 95
  • 104