Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error cv::contourArea #2

Open
khacson opened this issue May 23, 2019 · 2 comments
Open

Error cv::contourArea #2

khacson opened this issue May 23, 2019 · 2 comments

Comments

@khacson
Copy link

khacson commented May 23, 2019

$ python code.py
Traceback (most recent call last):
File "code.py", line 47, in
if cv2.contourArea(c) < 600:
cv2.error: OpenCV(4.1.0) C:\projects\opencv-python\opencv\modules\imgproc\src\shapedescr.cpp:274: error: (-215:Assertion failed) npoints >= 0 && (depth == CV_32F || depth == CV_32S) in function 'cv::contourArea'

[ WARN:1] terminating async callback

@DevashishPrasad
Copy link
Owner

This is happening because of version issues. You may find some solutions
here

@DevashishPrasad
Copy link
Owner

DevashishPrasad commented Jun 19, 2020

Please go through the following link
https://stackoverflow.com/questions/39475125/compatibility-issue-with-contourarea-in-opencv-3

In Opencv 3 API version the cv2.findContours() returns 3 objects

Check you Opencv version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants