obsere / tesseract-ocr

Automatically exported from code.google.com/p/tesseract-ocr
Other
0 stars 0 forks source link

FEATURE REQUEST: Partial compilation of Tesseract based on features required #538

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi there,

I use tesseract on android. Although it is great and it works the library 
itself takes up a lot of space ~6-7 Mbs. It is not a problem on a desktop but 
on a mobile device that's a massive issue.

So I was wondering if some extra flags features flags can be added to the build 
files so that only needed components are compiled and put into library?

For example: If I don't use API for cube, it only takes up space in the 
library. So if a flag BUILD_CUBE, for example,  can be added, then if it is set 
to 0 this API is not built. Do this for all different sub parts of the library, 
except for the core of course.

Of course by default everything is enabled so that the others don't see change 
in the behaviour when building. But this will make the library a lot more 
lightweight and a lot more manageable on the mobile devices.

Original issue reported on code.google.com by alexjiro...@gmail.com on 26 Aug 2011 at 10:27

GoogleCodeExporter commented 9 years ago
Ray committed some Android specific changes yesterday that remove a lot of 
non-essential pieces.

Original comment by joregan on 13 May 2015 at 1:38

GoogleCodeExporter commented 9 years ago
To skip cube (--disable-cube) is implemented in tesseract gihub code[1] - but 
side effect is that pdf rendering will not work with it, because pdfrenderer 
uses one function from cube for (utf conversion).
Also there are other experimental options that can help you:
--disable-graphics
--enable-visibility
+ stripping final library
In my quick test I was able to decrease size of libtesseract.so.3.0.4 from 5.6M 
to 2.5M with this (experimental) options

[1] 
https://github.com/tesseract-ocr/tesseract/commit/41478fd5a1f713f56ec51134d25987
00b7f1463c

Original comment by zde...@gmail.com on 24 Jul 2015 at 10:47