B4i Library iTesseract- Simple OCR

Name: iTesseract

Version: 1.02

Description: iTesseract is a wrapper of the Tesseract IOS Framework and allows you to recognize text from images (OCR- optical character recognition).

License:
Notes/Tips:
Download from Dropbox:
Please let me know if you need more features and feel free to ask questions ;)
 
Last edited:

cloner7801

Active Member
Licensed User
Longtime User
I get error when I run project
B4X:
b4i_main.m:53:13: error: no visible @interface for 'iTesseract' declares the selector 'Initialize::::::'
[self._iocr Initialize:self.bi :[self.__c True] :@"iOCR" :(NSArray*)((_datalist).object) :[[self.__c File] DirDocuments] :@"deu"];
~~~~~~~~~~ ^~~~~~~~~~
1 error generated.


Error: ** BUILD FAILED **


The following build commands failed:
    CompileC build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/b4i_main.o B4iProject/b4i_main.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
 

JanPRO

Well-Known Member
Licensed User
Longtime User
Hi,
you are using hosted builder, right?

I just saw that Erel didn't upload the newest version 1.01 to the builder, so ( @Erel ) uploading the new version should solve the issue ...

Jan
 
Last edited:

tufanv

Expert
Licensed User
Longtime User
Hi,
you are using hosted builder, right?

I just saw that Erel didn't upload the newest version 1.01 to the builder, so ( @Erel ) uploading the new version should solve the issue ...

Jan
Dear Jan,

I deleted all other trainedata and just downloaded and added tur.trainedata to files folder.
Than changed the line to
Dim DataList As List = Array As String("tur.traineddata")

but my phone still can recognie the german poem. How is it possible ?
 

JanPRO

Well-Known Member
Licensed User
Longtime User
You have to change also the Initialize line.
However you are right, the result with the turkish traineddata is quite good.

I don't know how the recognition process works, but one reason might be the fact, that turkish and german characters are nearly the same ...

Jan
 

tufanv

Expert
Licensed User
Longtime User
You have to change also the Initialize line.
However you are right, the result with the turkish traineddata is quite good.

I don't know how the recognition process works, but one reason might be the fact, that turkish and german characters are nearly the same ...

Jan
one more question. Turkish has only trainedata file while english has many files. Does it increase the accuruacy or what is the difference ?
 

JanPRO

Well-Known Member
Licensed User
Longtime User
Does it increase the accuruacy
Yes, when you have more language files, you can also choose EngineModeCubeOnly as EngineMode which is more accurate, but slower.

Jan
 

tufanv

Expert
Licensed User
Longtime User
Ah understood Thanks. So maybe as Turkish file could read German, We can use English cube for Turkish =)
 

tufanv

Expert
Licensed User
Longtime User
Dear Jan,

One last question: In the url you specified , I only found traineddata file for turkish. Later i searched theinternet and found this link :https://github.com/tesseract-ocr/langdata/tree/master/tur

it says it is for 3.04 and the file extensions are very different than you use. Is it a newer one or what is it ? I tried to add them to files but it did not make any difference becaue only teserractonly engine mode is available ..
Yes, when you have more language files, you can also choose EngineModeCubeOnly as EngineMode which is more accurate, but slower.

Jan
 

fbritop

Active Member
Licensed User
Longtime User
Not sure if this library is still at the hosted builder, but at init it breaks with:

B4X:
-----
Available EngineModes for your language:
- EngineModeTesseractOnly
-----
Tesseract destination path: /var/mobile/Containers/Data/Application/A37035F3-9B0C-4B57-A17D-13FE8E37D69A/Library/Caches/var/mobile/Containers/Data/Application/A37035F3-9B0C-4B57-A17D-13FE8E37D69A/Documents/tessdata
SignalHandler 6
Error occurred on line: 104 (aadminnotificationsvisits)
Signal - 6
Stack Trace: (
    "0   LlaveMovil.com       SignalHandler + 120",
    "1   libsystem_platform.dylib            0x00000001befd29ec <redacted> + 40",
    "2   libsystem_pthread.dylib             0x00000001befd8094 <redacted> + 380",
    "3   libsystem_c.dylib    abort + 140",
    "4   LlaveMovil.com       _Z19ExtractBlobFeaturesRK19FEATURE_DEFS_STRUCTRK6DENORMS4_RK20INT_FX_RESULT_STRUCTP5TBLOB + 0",
    "5   LlaveMovil.com       _ZN9tesseract15TessdataManager4InitEPKci + 204",
    "6   LlaveMovil.com       _ZN9tesseract9Tesseract24init_tesseract_lang_dataEPKcS2_S2_NS_13OcrEngineModeEPPciPK13GenericVectorI6STRINGESA_b + 208",
    "7   LlaveMovil.com       _ZN9tesseract9Tesseract23init_tesseract_internalEPKcS2_S2_NS_13OcrEngineModeEPPciPK13GenericVectorI6STRINGESA_b + 48",
    "8   LlaveMovil.com       _ZN9tesseract9Tesseract14init_tesseractEPKcS2_S2_NS_13OcrEngineModeEPPciPK13GenericVectorI6STRINGESA_b + 376",
    "9   LlaveMovil.com       _ZN9tesseract11TessBaseAPI4InitEPKcS2_NS_13OcrEngineModeEPPciPK13GenericVectorI6STRINGESA_b + 276"
)
 
Top