mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-28 08:04:13 +08:00
Update local.py
This commit is contained in:
parent
ca647fe151
commit
41eae738ac
@ -35,8 +35,10 @@ class ocrwrapper:
|
|||||||
self._OcrInit(det,rec,key)
|
self._OcrInit(det,rec,key)
|
||||||
def ocr(self,path,name,angle=0):
|
def ocr(self,path,name,angle=0):
|
||||||
try:
|
try:
|
||||||
self._OcrDetect(path,name,angle)
|
if (self._OcrDetect(path,name,angle) ):
|
||||||
return self._OcrGet().decode('utf8')
|
return self._OcrGet().decode('utf8')
|
||||||
|
else:
|
||||||
|
return ''
|
||||||
except:
|
except:
|
||||||
|
|
||||||
return ''
|
return ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user