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

Using with OpenCV v4.2 #1

Open
tomoyk opened this issue Apr 14, 2020 · 0 comments
Open

Using with OpenCV v4.2 #1

tomoyk opened this issue Apr 14, 2020 · 0 comments

Comments

@tomoyk
Copy link

tomoyk commented Apr 14, 2020

On OpenCV 4.0 or later version, findContours() return 2 values.

https://docs.opencv.org/4.3.0/d3/dc0/group__imgproc__shape.html#gadf1ad6a0b82947fa1fe3c3d497f260e0

I fixed codes below.

# BEFORE
image, contours, hierarchy = cv2.findContours(mask, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)

# AFTER
contours, hierarchy = cv2.findContours(mask, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
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

1 participant