gitanat / simple-ocr-opencv

A simple python OCR engine using opencv
GNU Affero General Public License v3.0
525 stars 175 forks source link

handle cv2 version greater than 3.0.0 #37

Closed Jambon1510 closed 5 years ago

Jambon1510 commented 5 years ago

Suppose to be able to handle cv2 version greater than 3.0.0 Only been tested with cv2 4.0.0.21

Related to #36

gitanat commented 5 years ago

By the way - you can always take a look at the status of the build in https://travis-ci.org/goncalopp/simple-ocr-opencv

In the build for this PR case, the build fails, because you didn't include packaging in the deps section of setup.py. But let's remove the dependency instead :)

Jambon1510 commented 5 years ago

oh yep, I thought PyCharm would have suggested me this. I need to check to automatically doing it next time I am adding a new depedency. Thx Goncalopp

Jambon1510 commented 5 years ago

Committed and pushed I realized that I forgot to do a special commit for segmentation. After some tests on cv2 4, it appears that I have the below message which I fixed by rollbacking to the master on this particular line

ValueError: not enough values to unpack (expected 3, got 2)

gitanat commented 5 years ago

Perfect! Travis is passing, so I'll merge this in I'm surprised that the API for findContours in cv 4 is closer to version 2 - but we can always revisit this as needed Thank you for contributing!