T
T
TS22021-09-17 16:11:49
Python
TS2, 2021-09-17 16:11:49

How to make Python Tesseract ORC recognize Russian language?

I wrote just such a program that recognizes text from an image.

import pytesseract
import translatepy
import cv2

pytesseract.pytesseract.tesseract_cmd = 'Resources\\tesseract.exe'
img = cv2.imread('1.png')
text = pytesseract.image_to_string(img)[:-2:]

print(text)


It recognizes English calmly, but it does not recognize other languages.
I installed an additional Russian language.
gK8sJlw.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
U
U235U235, 2021-09-17
@TS2

Specify the lang='rus' parameter in the image_to_string function.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question