ocr usprawnienia
This commit is contained in:
2
app.py
2
app.py
@@ -347,7 +347,7 @@ 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.resize((image.width * 2, image.height * 2), Image.BICUBIC) # większe powiększenie
|
||||
return image
|
||||
|
||||
def extract_total_tesseract(image):
|
||||
|
Reference in New Issue
Block a user