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

Small updates for Python 3.9 (and OpenCV 4.5) compatibility #25

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

cweickhmann
Copy link

Hi Matt,
I found your blog post very interesting and this script very useful. Thanks!
Since I left Python 2.x behind years ago, I check if this can be easily made to work with Python 3.x, and yes it can.

So here are my changes that made your scripts work with Python 3.9.1 and current versions of the relevant modules:

  • cv2==4.5.1
  • matplotlib==3.3.3
  • numpy==1.19.4
  • PIL=8.0.1
  • scipy==1.5.4
  • sympy==1.7.1

I'd be happy to see this PR incorporated into your version.

-- Christian

…tibility).

Successfully tested `derive_cubic.py` with Python==3.9.1, matplotlib==3.3.3, sympy==1.7.1 and numpy==1.19.4 .
Changed divisions of floats by integers to floor division (//) statement (Python3 compatibility).
Changed return tuple of cv2.findContours to "new" behaviour (using opencv-python==4.5.1).
Successfully tested with python 3.9.1, cv2==4.5.1, numpy==1.19.4, scipy==1.5.4, PIL=8.0.1 .
@rramphal rramphal mentioned this pull request Oct 24, 2021
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

Successfully merging this pull request may close these issues.

1 participant