publish eve_rock_watcher.py
This commit is contained in:
parent
a44131ad07
commit
b28e74ae8b
1 changed files with 3 additions and 0 deletions
|
|
@ -243,6 +243,9 @@ def get_region(cp):
|
|||
|
||||
def read_rows(cp, region, mode):
|
||||
import pytesseract
|
||||
tcmd = cp.get("ocr", "tesseract_cmd", fallback="").strip()
|
||||
if tcmd: # Tesseract isn't always on PATH; set it explicitly
|
||||
pytesseract.pytesseract.tesseract_cmd = tcmd
|
||||
img = w.grab_region(region)
|
||||
try: # upscale: small panel text reads better
|
||||
img = img.resize((img.width * 2, img.height * 2))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue