Skip to content

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

Open
cweickhmann wants to merge 4 commits intomzucker:masterfrom
cweickhmann:master
Open

Small updates for Python 3.9 (and OpenCV 4.5) compatibility#25
cweickhmann wants to merge 4 commits intomzucker:masterfrom
cweickhmann:master

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