ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (111,) + inhomogeneous part.
Я пытаюсь прочитать контуры из opencv и передать их в matplotlib для отображения. Вот мой код. Что мне делать? [code]img = cv2.imread('sample.jpeg') _, bin_img = cv2.threshold(cv2.cvtColor(img, cv2.COLOR_BGR2GRAY), 180, 255, cv2.THRESH_BINARY_INV) contours, hierarchy = cv2.findContours(bin_img, mode, method) plt.contour(contours) [/code] Выдает ошибку: [code]ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (111,) + inhomogeneous part.[/code]