This commit is contained in:
kba 2026-04-28 15:36:50 +02:00
parent abdcb1a1f9
commit d705f855f1
2 changed files with 1 additions and 2 deletions

View file

@ -317,7 +317,7 @@ class Eynollah_ocr:
w_scaled = w * image_height/float(h) w_scaled = w * image_height/float(h)
img_poly_on_img = np.copy(img) img_poly_on_img = np.copy(img)
if img_bin: if img_bin is not None:
img_poly_on_img_bin = np.copy(img_bin) img_poly_on_img_bin = np.copy(img_bin)
img_crop_bin = img_poly_on_img_bin[y:y+h, x:x+w, :] img_crop_bin = img_poly_on_img_bin[y:y+h, x:x+w, :]

View file

@ -65,7 +65,6 @@ class EynollahRecognizeProcessor(Processor):
page.get_Page(), page_file.pageId, page.get_Page(), page_file.pageId,
feature_selector="binarized") feature_selector="binarized")
img_bin = pil2cv(page_image_bin) img_bin = pil2cv(page_image_bin)
print(img_bin)
result = self.eynollah_ocr.run_cnn( result = self.eynollah_ocr.run_cnn(
img=img, img=img,
page_tree=page.etree.getroottree(), page_tree=page.etree.getroottree(),