Upgrade to PyQt5
Opened this issue ยท 4 comments
dom-k commented
I tried to set up the project with PyQt4 but couldn't install PyQt4 with pip:
ERROR: Could not find a version that satisfies the requirement PyQt4 (from versions: none)
ERROR: No matching distribution found for PyQt4
Even after installing python3-pyqt4
!
roshniRam commented
You will have to first download it's wheel then install it using pip. Download its wheel from here:
https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyqt4
Then go to the download location:
pip install whl_file_name.whl
dom-k commented
Okay, I am developing on Linux, so these wheel files wouldn't work. ๐
It would be more convenient to install dependencies from pip.
How about upgrading to PyQt5?
I've made the GUI version work with PyQt5, but when I run python main.py
I get the following error:
Traceback (most recent call last):
File "main.py", line 5, in <module>
perform_ocr(".\image_samples\Test_.jpg")
File "/home/dominik/Workspace/Printed-Text-recognition-and-conversion/ocr.py", line 27, in perform_ocr
all_words, words_on_line, max_height_on_line = get_words(raw_image)
File "/home/dominik/Workspace/Printed-Text-recognition-and-conversion/segmentation_words.py", line 24, in get_words
img_for_det = image_for_detection(raw_image)
File "/home/dominik/Workspace/Printed-Text-recognition-and-conversion/before_segmentation.py", line 9, in image_for_detection
sm_image = cv2.GaussianBlur(raw_image,(5,5),0)
cv2.error: OpenCV(4.1.0) /io/opencv/modules/core/src/matrix.cpp:757: error: (-215:Assertion failed) dims <= 2 && step[0] > 0 in function 'locateROI'
Any ideas? ๐
roshniRam commented
Looks like it's some image size problem. I'll look into it.
dom-k commented
Okay cool, I'll create a PR. ๐