mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2025-01-15 08:53:53 +08:00
...
This commit is contained in:
parent
8782024408
commit
5a66c7afe8
@ -6,6 +6,7 @@ from ocrengines.baseocrclass import baseocr
|
|||||||
from qtsymbols import *
|
from qtsymbols import *
|
||||||
from gui.usefulwidget import getboxlayout
|
from gui.usefulwidget import getboxlayout
|
||||||
from gui.dynalang import LPushButton, LFormLayout, LLabel
|
from gui.dynalang import LPushButton, LFormLayout, LLabel
|
||||||
|
from myutils.utils import getlanguagespace
|
||||||
|
|
||||||
|
|
||||||
def initsupports():
|
def initsupports():
|
||||||
@ -84,7 +85,7 @@ class OCR(baseocr):
|
|||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
uselang = self.srclang
|
uselang = self.srclang
|
||||||
ret = winrtutils.OCR_f(imagebinary, self.supportmap[uselang], self.space_1)
|
ret = winrtutils.OCR_f(imagebinary, self.supportmap[uselang], getlanguagespace(uselang))
|
||||||
boxs = [_[1:] for _ in ret]
|
boxs = [_[1:] for _ in ret]
|
||||||
texts = [_[0] for _ in ret]
|
texts = [_[0] for _ in ret]
|
||||||
return {"box": boxs, "text": texts}
|
return {"box": boxs, "text": texts}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user