diff options
author | Iliyan Malchev <malchev@google.com> | 2008-09-23 16:05:27 -0700 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2008-09-23 16:05:27 -0700 |
commit | ca7c5fa17bab23f800afdf7cf174230d407e9264 (patch) | |
tree | ad8b5df52b2588f509550e94a9704e40a08da028 | |
parent | 8a69db175d38bbdaa79e4755310eadffae8dc84d (diff) | |
download | tesseract-ca7c5fa17bab23f800afdf7cf174230d407e9264.tar.gz |
compile libhelium for Android
Signed-off-by: Iliyan Malchev <malchev@google.com>
-rwxr-xr-x | Android.mk | 15 | ||||
-rw-r--r-- | helium/cluster.cpp | 2 | ||||
-rw-r--r-- | helium/clusterer.cpp | 4 | ||||
-rw-r--r-- | helium/contourdetector.cpp | 2 | ||||
-rw-r--r-- | helium/edgedetector.h | 2 | ||||
-rw-r--r-- | helium/gaussiansmooth.h | 2 | ||||
-rw-r--r-- | helium/helium.h | 20 | ||||
-rw-r--r-- | helium/helium_cluster.h (renamed from helium/cluster.h) | 0 | ||||
-rw-r--r-- | helium/helium_image.h (renamed from helium/image.h) | 0 | ||||
-rw-r--r-- | helium/heliumbinarizer.cpp | 4 | ||||
-rw-r--r-- | helium/heliumtextdetector.cpp | 2 | ||||
-rw-r--r-- | helium/histogram.cpp | 2 | ||||
-rw-r--r-- | helium/image.cpp | 2 | ||||
-rw-r--r-- | helium/imageenhancer.cpp | 2 | ||||
-rw-r--r-- | helium/labeler.h | 2 | ||||
-rw-r--r-- | helium/leptonica.cpp | 6 | ||||
-rw-r--r-- | helium/leptonica.h | 7 | ||||
-rw-r--r-- | helium/main_helium.cpp | 4 | ||||
-rw-r--r-- | helium/maxtracer.cpp | 2 | ||||
-rw-r--r-- | helium/quicksmooth.cpp | 2 | ||||
-rw-r--r-- | helium/quicksmooth.h | 2 | ||||
-rw-r--r-- | helium/shapetree.h | 2 | ||||
-rw-r--r-- | helium/tesseract.cpp | 8 | ||||
-rw-r--r-- | helium/tesseract.h | 4 | ||||
-rw-r--r-- | helium/textareas.cpp | 2 | ||||
-rw-r--r-- | helium/thresholdbinarizer.cpp | 2 | ||||
-rw-r--r-- | helium/trace.cpp | 2 | ||||
-rw-r--r-- | helium/tracer.cpp | 2 |
28 files changed, 57 insertions, 49 deletions
@@ -559,7 +559,7 @@ LOCAL_SHARED_LIBRARIES:= \ include $(BUILD_EXECUTABLE) -ifeq (0,1) +ifeq (1,1) # # libhelium # @@ -609,12 +609,14 @@ LOCAL_SRC_FILES:= \ helium/unionfind.cpp \ helium/heliumtextdetector.cpp \ helium/box.cpp \ - helium/imageenhancer.cpp \ - helium/main_helium.cpp + helium/imageenhancer.cpp + +# helium/main_helium.cpp # helium/leptonica.cpp LOCAL_C_INCLUDES:= \ - system/tesseract \ + system/tesseract \ + system/tesseract/ccmain \ system/tesseract/helium \ system/tesseract/ccutil \ system/tesseract/ccstruct \ @@ -626,7 +628,10 @@ LOCAL_C_INCLUDES:= \ system/tesseract/textord \ LOCAL_SHARED_LIBRARIES:= \ - libtesseract_main + libtesseract_main \ + libtesseract_image \ + libtesseract_globals \ + libtesseract_cc_util LOCAL_PRELINK_MODULE:= false include $(BUILD_SHARED_LIBRARY) diff --git a/helium/cluster.cpp b/helium/cluster.cpp index 576f918..8f61a51 100644 --- a/helium/cluster.cpp +++ b/helium/cluster.cpp @@ -2,7 +2,7 @@ // All Rights Reserved. // Author: <renn@google.com> (Marius Renn) -#include "cluster.h" +#include "helium_cluster.h" #include "shape.h" using namespace helium; diff --git a/helium/clusterer.cpp b/helium/clusterer.cpp index 7240b3b..86b09b3 100644 --- a/helium/clusterer.cpp +++ b/helium/clusterer.cpp @@ -2,11 +2,11 @@ // All Rights Reserved. // Author: <renn@google.com> (Marius Renn) -#include "cluster.h" +#include "helium_cluster.h" #include "clusterer.h" #include "clustervalidator.h" #include "debugging.h" -#include "image.h" +#include "helium_image.h" #include "shape.h" using namespace helium; diff --git a/helium/contourdetector.cpp b/helium/contourdetector.cpp index e7c63c0..1efee59 100644 --- a/helium/contourdetector.cpp +++ b/helium/contourdetector.cpp @@ -4,7 +4,7 @@ // #include "contourdetector.h" #include "debugging.h" -#include "image.h" +#include "helium_image.h" #include "traceclassifier.h" #include "trace.h" #include "tracer.h" diff --git a/helium/edgedetector.h b/helium/edgedetector.h index c7fa5fb..8ee2a99 100644 --- a/helium/edgedetector.h +++ b/helium/edgedetector.h @@ -12,7 +12,7 @@ // Local includes #include "color.h" #include "graymap.h" -#include "image.h" +#include "helium_image.h" namespace helium { diff --git a/helium/gaussiansmooth.h b/helium/gaussiansmooth.h index 7eba1a7..32e9096 100644 --- a/helium/gaussiansmooth.h +++ b/helium/gaussiansmooth.h @@ -9,7 +9,7 @@ #define HELIUM_GAUSSIANSMOOTH_H__ // Local includes -#include "image.h" +#include "helium_image.h" namespace helium { diff --git a/helium/helium.h b/helium/helium.h index 84593db..a1b158b 100644 --- a/helium/helium.h +++ b/helium/helium.h @@ -1,15 +1,15 @@ #ifndef THIRD_PARY_TESSERACT_HELIUM_HELIUM_H__ #define THIRD_PARY_TESSERACT_HELIUM_HELIUM_H__ -#include "third_party/tesseract/helium/cstringutils.h" -#include "third_party/tesseract/helium/color.h" -#include "third_party/tesseract/helium/debugging.h" -#include "third_party/tesseract/helium/image.h" -#include "third_party/tesseract/helium/heliumbinarizer.h" -#include "third_party/tesseract/helium/heliumtextdetector.h" -#include "third_party/tesseract/helium/textareas.h" -#include "third_party/tesseract/helium/textdetector.h" -#include "third_party/tesseract/helium/textrecognition.h" -#include "third_party/tesseract/helium/thresholdbinarizer.h" +#include "helium/cstringutils.h" +#include "helium/color.h" +#include "helium/debugging.h" +#include "helium/helium_image.h" +#include "helium/heliumbinarizer.h" +#include "helium/heliumtextdetector.h" +#include "helium/textareas.h" +#include "helium/textdetector.h" +#include "helium/textrecognition.h" +#include "helium/thresholdbinarizer.h" #endif // THIRD_PARY_TESSERACT_HELIUM_HELIUM_H__ diff --git a/helium/cluster.h b/helium/helium_cluster.h index 14ef127..14ef127 100644 --- a/helium/cluster.h +++ b/helium/helium_cluster.h diff --git a/helium/image.h b/helium/helium_image.h index 1ebce8d..1ebce8d 100644 --- a/helium/image.h +++ b/helium/helium_image.h diff --git a/helium/heliumbinarizer.cpp b/helium/heliumbinarizer.cpp index eae5d92..d77199f 100644 --- a/helium/heliumbinarizer.cpp +++ b/helium/heliumbinarizer.cpp @@ -3,10 +3,10 @@ // Author: <renn@google.com> (Marius Renn) // Local includes -#include "cluster.h" +#include "helium_cluster.h" #include "debugging.h" #include "heliumbinarizer.h" -#include "image.h" +#include "helium_image.h" #include "mathfunctions.h" #include "shape.h" diff --git a/helium/heliumtextdetector.cpp b/helium/heliumtextdetector.cpp index 424d546..401597c 100644 --- a/helium/heliumtextdetector.cpp +++ b/helium/heliumtextdetector.cpp @@ -12,7 +12,7 @@ #include "heliumtextdetector.h" #include "maxtracer.h" #include "imageenhancer.h" -#include "image.h" +#include "helium_image.h" #include "quicksmooth.h" #include "shapetree.h" #include "sobeledgedetector.h" diff --git a/helium/histogram.cpp b/helium/histogram.cpp index bf2805b..43d19b6 100644 --- a/helium/histogram.cpp +++ b/helium/histogram.cpp @@ -9,7 +9,7 @@ // Local includes #include "debugging.h" #include "histogram.h" -#include "image.h" +#include "helium_image.h" #include "mathfunctions.h" using namespace helium; diff --git a/helium/image.cpp b/helium/image.cpp index 9a4fc38..9f114f4 100644 --- a/helium/image.cpp +++ b/helium/image.cpp @@ -4,7 +4,7 @@ // Local includes #include "box.h" -#include "image.h" +#include "helium_image.h" using namespace helium; diff --git a/helium/imageenhancer.cpp b/helium/imageenhancer.cpp index 6a45204..80e523e 100644 --- a/helium/imageenhancer.cpp +++ b/helium/imageenhancer.cpp @@ -8,7 +8,7 @@ #include <math.h> #include "debugging.h" #include "histogram.h" -#include "image.h" +#include "helium_image.h" #include "graymap.h" #include "imageenhancer.h" diff --git a/helium/labeler.h b/helium/labeler.h index 70c0074..b6937d6 100644 --- a/helium/labeler.h +++ b/helium/labeler.h @@ -11,7 +11,7 @@ #ifndef HELIUM_LABELER_H__ #define HELIUM_LABELER_H__ -#include "image.h" +#include "helium_image.h" namespace helium { diff --git a/helium/leptonica.cpp b/helium/leptonica.cpp index 8c102d0..73b424a 100644 --- a/helium/leptonica.cpp +++ b/helium/leptonica.cpp @@ -4,7 +4,7 @@ // Local includes #include "leptonica.h" -#include "image.h" +#include "helium_image.h" #include "graymap.h" #include "imageenhancer.h" @@ -15,7 +15,7 @@ using namespace helium; // TODO: CONVERT IF NECESSARY!!! -Image Leptonica::PixToImage(const Pix* cpix) { +Image& Leptonica::PixToImage(const Pix* cpix) { Pix* pix = const_cast<Pix*>(cpix); if (pixGetDepth(pix) == 8) { GrayMap gmap = PixToGrayMap(pix); @@ -23,7 +23,7 @@ Image Leptonica::PixToImage(const Pix* cpix) { } // Else must be 32-bit ASSERT(pixGetDepth(pix) == 32); - Image out = Image(pixGetWidth(pix), pixGetHeight(pix)); + Image& out = Image(pixGetWidth(pix), pixGetHeight(pix)); memcpy(out.data(), pix->data, out.width() * out.height() * 4); return out; } diff --git a/helium/leptonica.h b/helium/leptonica.h index c5ad9d5..822b515 100644 --- a/helium/leptonica.h +++ b/helium/leptonica.h @@ -10,14 +10,17 @@ #define HELIUM_LEPTONICA_H__ // Local includes -#include "image.h" +#include "helium_image.h" +#ifdef HAVE_LIBLEPT // Leptonica include #include "third_party/leptonica/include/allheaders.h" +#endif namespace helium { class Image; +class Pix; // This class is used for converting images from the Helium format to the // Leptonica Pix format, and vice versa. Note, that these methods are @@ -27,7 +30,7 @@ class Leptonica { public: // Converts the given Pix pointer to an image. The Pix pointer must be // a 32 bit color image. - static Image PixToImage(const Pix* pix); + static Image& PixToImage(const Pix* pix); // Converts an Image to a Pix pointer. static Pix* ImageToPix(const Image& image); diff --git a/helium/main_helium.cpp b/helium/main_helium.cpp index c013855..00fc95d 100644 --- a/helium/main_helium.cpp +++ b/helium/main_helium.cpp @@ -11,7 +11,7 @@ // Local includes #include "color.h" #include "debugging.h" -#include "image.h" +#include "helium_image.h" #include "heliumbinarizer.h" #include "heliumtextdetector.h" #include "leptonica.h" @@ -37,7 +37,7 @@ int main(int argc, char** argv) { // Read input image LOG_MSG("Reading file..."); - PIX* input = pixRead(argv[1]); + Pix* input = pixRead(argv[1]); if (!input) ExitWithError("Could not open image file!"); Image image = Leptonica::PixToImage(input); if (!image.Valid()) ExitWithError("Error while loading image file!"); diff --git a/helium/maxtracer.cpp b/helium/maxtracer.cpp index 789c58a..02d5195 100644 --- a/helium/maxtracer.cpp +++ b/helium/maxtracer.cpp @@ -4,7 +4,7 @@ // // Local includes #include "debugging.h" -#include "image.h" +#include "helium_image.h" #include "maxtracer.h" #include "mathfunctions.h" #include "trace.h" diff --git a/helium/quicksmooth.cpp b/helium/quicksmooth.cpp index 346d0e7..00a6c40 100644 --- a/helium/quicksmooth.cpp +++ b/helium/quicksmooth.cpp @@ -4,7 +4,7 @@ // #include "color.h" #include "debugging.h" -#include "image.h" +#include "helium_image.h" #include "quicksmooth.h" using namespace helium; diff --git a/helium/quicksmooth.h b/helium/quicksmooth.h index 69905b4..775fbf6 100644 --- a/helium/quicksmooth.h +++ b/helium/quicksmooth.h @@ -12,7 +12,7 @@ #define HELIUM_QUICKSMOOTH_H__ // Local includes -#include "image.h" +#include "helium_image.h" namespace helium { diff --git a/helium/shapetree.h b/helium/shapetree.h index 422acb8..2b55798 100644 --- a/helium/shapetree.h +++ b/helium/shapetree.h @@ -13,7 +13,7 @@ #define HELIUM_SHAPETREE_H__ #include "array.h" -#include "image.h" +#include "helium_image.h" namespace helium { diff --git a/helium/tesseract.cpp b/helium/tesseract.cpp index 06bb8c8..b1cd06f 100644 --- a/helium/tesseract.cpp +++ b/helium/tesseract.cpp @@ -10,10 +10,10 @@ #include "tessvars.h" #include "control.h" #else -#include "third_party/tesseract/ccmain/tessedit.h" -#include "third_party/tesseract/ccstruct/pageres.h" -#include "third_party/tesseract/ccmain/tessvars.h" -#include "third_party/tesseract/ccmain/control.h" +#include "ccmain/tessedit.h" +#include "ccstruct/pageres.h" +#include "ccmain/tessvars.h" +#include "ccmain/control.h" #endif #undef LOG diff --git a/helium/tesseract.h b/helium/tesseract.h index 5688637..d29b56e 100644 --- a/helium/tesseract.h +++ b/helium/tesseract.h @@ -10,8 +10,8 @@ #ifndef HELIUM_TESSERACT_H__ #define HELIUM_TESSERACT_H__ -#include "third_party/tesseract/ccmain/baseapi.h" -#include "third_party/tesseract/ccmain/thresholder.h" +#include "ccmain/baseapi.h" +#include "ccmain/thresholder.h" namespace helium { diff --git a/helium/textareas.cpp b/helium/textareas.cpp index 0fff839..9282ddf 100644 --- a/helium/textareas.cpp +++ b/helium/textareas.cpp @@ -9,7 +9,7 @@ // Local includes #include "debugging.h" -#include "cluster.h" +#include "helium_cluster.h" #include "mathfunctions.h" #include "stringutils.h" #include "textareas.h" diff --git a/helium/thresholdbinarizer.cpp b/helium/thresholdbinarizer.cpp index 7977e7f..dc7cb97 100644 --- a/helium/thresholdbinarizer.cpp +++ b/helium/thresholdbinarizer.cpp @@ -3,7 +3,7 @@ // Author: <renn@google.com> (Marius Renn) #include "box.h" -#include "image.h" +#include "helium_image.h" #include "textareas.h" #include "thresholdbinarizer.h" diff --git a/helium/trace.cpp b/helium/trace.cpp index 2218143..b1f842e 100644 --- a/helium/trace.cpp +++ b/helium/trace.cpp @@ -3,7 +3,7 @@ // Author: <renn@google.com> (Marius Renn) // #include "debugging.h" -#include "image.h" +#include "helium_image.h" #include "trace.h" using namespace helium; diff --git a/helium/tracer.cpp b/helium/tracer.cpp index 4e7d54d..e454d67 100644 --- a/helium/tracer.cpp +++ b/helium/tracer.cpp @@ -3,7 +3,7 @@ // Author: <renn@google.com> (Marius Renn) // #include "debugging.h" -#include "image.h" +#include "helium_image.h" #include "trace.h" #include "tracer.h" |