readtext doesn't work with latest opencv version
See original GitHub issueWindows 10 64bit easyocr 1.4.1 opencv-python 4.5.5.62
Problem
When using reader.readtext I was getting an error message from opencv
\lib\site-packages\easyocr\craft_utils.py", line 31, in getDetBoxes_core
nLabels, labels, stats, centroids = cv2.connectedComponentsWithStats(text_score_comb.astype(np.uint8), connectivity=4)
cv2.error: Unknown C++ exception from OpenCV code
Solution
Spent most of my day trying to fix whatever was wrong with connectedComponentsWithStats… Issue didn’t go away no matter what I did until I switched from opencv-python version 4.5.5.62 to version 4.5.4.60 .
I know this is a opencv problem so you can’t do much about, but probably should limit the opencv version until they fix
Issue Analytics
- State:
- Created 2 years ago
- Reactions:22
- Comments:5
Top Results From Across the Web
Unknown OpenCV exception while using EasyOcr
The new version of OpenCV has some issues. Uninstall the newer version of OpenCV and install the older one using:
Read more >OpenCV Text Detection (EAST text detector) - PyImageSearch
In this tutorial you will learn how to use OpenCV to detect text in natural scene images using the EAST text detector.
Read more >How to Extract Text from Images in Python using ... - YouTube
First released in 2007, PyTesseract is the to-go library for extracting text from images. It uses classical computer vision methods to ...
Read more >Text Detection with OpenCV in Python | OCR using Tesseract ...
In this video, we are going to learn how to detect text in images. We will learn how to detect individual characters and...
Read more >easyocr - PyPI
9 April 2022 - Version 1.4.2. Update dependencies (opencv and pillow issues). 11 September 2021 - Version 1.4.1. Add trainer folder; Add readtextlang...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi, Please change the opencv-python version to 4.5.4.60. Try this command,
then, you will use
readtext
thank youJust followed the above solution by @SHA65536 and now readtext is working.