OpenCV with Python error for arcLength
问题 I have an issue in my code and can't find a proper solution for it. I am using Python 2.7.10 and OpenCV 3.0. I read two images and want to match one of the pictures(a template) with the contours from the other but I get the following error: error: (-215) count >= 0 && (depth == CV_32F || depth == CV_32S) in function cv::arcLength My code looks like this: gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) gray = cv2.bilateralFilter(gray, 11, 10, 17) edges = cv2.Canny(gray, 100, 20) contours