(-215:assertion Failed) Npoints >= 0 && (depth == Cv_32f || Depth == Cv_32s) In Function 'contourarea'
I am trying to run the website code to create the image. When I run the code it gives me an error: cv2.error: OpenCV(4.1.0) /Users/travis/build/skvark/opencv-python/opencv/module
Solution 1:
The repo is clearly written for OpenCV 3.x. But, you are running on OpenCV 4.1. Repo code takes find_contour's second return value for contours( find_contours(...)[1]
). You should change 1 to 0.
Post a Comment for "(-215:assertion Failed) Npoints >= 0 && (depth == Cv_32f || Depth == Cv_32s) In Function 'contourarea'"