Luke
commited on
Commit
·
c5475c8
1
Parent(s):
c6f1797
no message
Browse files- Plan/pytesseractOCR.py +1 -2
Plan/pytesseractOCR.py
CHANGED
@@ -8,9 +8,8 @@ from Preprocess.preprocessImg import preprocess_image001
|
|
8 |
|
9 |
def ocr_recognition(image, validation_type, language):
|
10 |
try:
|
11 |
-
preprocessed_image = preprocess_image001(image)
|
12 |
custom_config = r'--oem 3 --psm 6'
|
13 |
-
text = pytesseract.image_to_string(
|
14 |
return parse_id_card(text, validation_type)
|
15 |
except Exception as e:
|
16 |
return str(e)
|
|
|
8 |
|
9 |
def ocr_recognition(image, validation_type, language):
|
10 |
try:
|
|
|
11 |
custom_config = r'--oem 3 --psm 6'
|
12 |
+
text = pytesseract.image_to_string(image, lang=language, config=custom_config)
|
13 |
return parse_id_card(text, validation_type)
|
14 |
except Exception as e:
|
15 |
return str(e)
|