EasyOCR
EasyOCR copied to clipboard
I'm trying to select the image using OpenCV selectROI then save it, then use the saved image for OCR but it is showing this error
I'm trying to select the image using OpenCV selectROI then save it, then use the saved image for OCR but it is showing this error
Traceback (most recent call last):
File "e:\Python\OCR\tempCodeRunnerFile.py", line 11, in
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python38\lib\site-packages\easyocr\easyocr.py", line 275, in detect
text_box_list = get_textbox(self.detector, img, canvas_size, mag_ratio,
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python38\lib\site-packages\easyocr\detection.py", line 95, in get_textbox
bboxes_list, polys_list = test_net(canvas_size, mag_ratio, detector,
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python38\lib\site-packages\easyocr\detection.py", line 55, in test_net
boxes, polys, mapper = getDetBoxes(
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python38\lib\site-packages\easyocr\craft_utils.py", line 236, in getDetBoxes
boxes, labels, mapper = getDetBoxes_core(textmap, linkmap, text_threshold, link_threshold, low_text, estimate_num_chars)
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python38\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
https://github.com/JaidedAI/EasyOCR/issues/630 Try downgrading opencv-python to 4.5.4.60
#630 Try downgrading opencv-python to 4.5.4.60
but Easy OCR isn't supporting cv 4.5.4.60 so I'm using even lower version
#630 Try downgrading opencv-python to 4.5.4.60
I'm using cv headless 4.5.2.52