I have a ValueError in python OpenCV at Google Colaboratory: not enough values to unpack (expected 3, got 2). In addition, I'm making some program that detects the contours of the water and gives coordinates. How I can fix this problem as soon as possible?
import cv2
import numpy as np
from google.colab import drive
drive.mount('/content/drive')
img = cv2.imread('/content/drive/MyDrive/lake1.jpg')
imgray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
ret, imthres = cv2.threshold(imgray, 127, 255, cv2.THRESH_BINARY_INV)
im2, contour, hierarchy = cv2.findContours(imthres, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_NONE) # here's the ValueError.