Debanjan Chakraborty
Debanjan Chakraborty

Reputation: 584

Tesseract integration in ios7

I have been trying to integrate to integrate Tesseract OCR Engine into an ios project in xcode5. I have been encountering some problems , some of them I have solved.

  1. Adding the tessdata leads to a lex error (it cannot compile the eng.cube.lm file) --- I solved it by renaming the file as en.languagemodel

2.The stdc error --- I had tochange the compiler c++ library to gnu c++

  1. Other small errors which were solved when the view controller was renamed with .mm extension

Now when I run the code, in the console it says "Couldnot find the file eng.traineddata in the path" and the path shows into the library of my simulator. It is also accompanied with a message saying that the "TESSDATA PREFIX path should be directed to the tessdata folder's parent directory"

Now, if I set my tessdata into the path shown in the console ( into the libraray/application support/simulator etc ) the app runs smoothly in the simulator but fails in the device. If I remove , the console error exists. Please help me to understand this problem and sort out a path to solve.

I have already added the tessdata to my project and there the required ".tranineddata" file exists . So why is it taking up the "TESSDATA PREFIX"?

Upvotes: 2

Views: 1042

Answers (1)

Debanjan Chakraborty
Debanjan Chakraborty

Reputation: 584

I had to add the tessdata folder after selecting the "Create folder references for any added folders" not the "Create group for any added folders" ....... and the error got removed..Yay!!!!!

Upvotes: 3

Related Questions