Closed dannyfriar closed 4 years ago
You have to load the osd
model, otherwise OSD won't work. Also, you might need to set oem. Try:
from tesserocr import OEM
with PyTessBaseAPI(
psm=PSM.OSD_ONLY,
lang="osd",
oem=OEM.TESSERACT_LSTM_COMBINED
) as api:
The following code snippet from the pypi project gives an incorrect result after rotating the
eurotext.tif
image (fromtests
directory of repo). E.g. after rotating the image by 180 degrees:Result:
Running
tesseract /usr/src/tesseract/testing/eurotext.tif- --psm 0
gives:Tesserocr: 2.4.1 OS: macOS 10.14.3
tesseract 4.1.0 leptonica-1.78.0 libgif 5.1.4 : libjpeg 9c : libpng 1.6.37 : libtiff 4.0.10 : zlib 1.2.11 : libwebp 1.0.3 : libopenjp2 2.3.1