cv2.findContours错误代码error: (-215:Assertion failed) npoints >= 0 && (depth == CV_32F || depth == C...

【解决】error: (-215:Assertion failed) npoints >= 0 && (depth == CV_32F || depth == CV_32S) in function ‘cv::contourArea’

cnts = cv2.findContours(edged.copy(), cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE)[1]