ocr #3

Merged
gru merged 17 commits from ocr into master 2025-07-23 08:34:45 +02:00
Showing only changes of commit cc1dad0d7d - Show all commits

4
app.py
View File

@@ -346,8 +346,8 @@ def _receipt_error(message):
def preprocess_image_for_tesseract(image):
image = ImageOps.autocontrast(image)
image = image.point(lambda x: 0 if x < 160 else 255) # mocniejsza binarizacja
#image = image.resize((image.width * 2, image.height * 2), Image.BICUBIC) # większe powiększenie
image = image.point(lambda x: 0 if x < 150 else 255) # mocniejsza binarizacja
image = image.resize((image.width * 2, image.height * 2), Image.BICUBIC) # większe powiększenie
return image
def extract_total_tesseract(image):