iOS - Tesseract - unable to read cube language model Cube ERROR (CubeRecoContext::Create): unable to init CubeRecoContext object
Clash Royale CLAN TAG#URR8PPP
iOS - Tesseract - unable to read cube language model Cube ERROR (CubeRecoContext::Create): unable to init CubeRecoContext object
I am trying to make a Japanese
OCR
app. I am getting this error while i try to initialize Tesseract
. Below are my code:
Japanese
OCR
Tesseract
if let tesseract = G8Tesseract(language: "eng+jpn")
tesseract.engineMode = .tesseractCubeCombined
tesseract.pageSegmentationMode = .auto
tesseract.image = image.g8_blackAndWhite()
tesseract.recognize()
textView.text = tesseract.recognizedText
Finally i figured out that i don't have cube files and i couldn't find searching them on github and other's site . Can anyone give me any link where i can find cube files for other language ???
1 Answer
1
Cube files are not available for all language. As i used
tesseract.engineMode = .tesseractCubeCombined
the above code, it will try to use both cube file and regular .traineddata
file . To solve this problem , i had to replace the above code as below and add only the langdata
as .traineddata
format for the specific language under a folder named tessdata
.traineddata
langdata
.traineddata
tessdata
tesseract.engineMode = .tesseractOnly
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.