Permalink
Browse files

First release. Tesseract SVN r756, Leptonica 1.69

  • Loading branch information...
0 parents commit 7f86dcf290954ed081652dfe197411d8355afbf0 @ldiqual committed Sep 23, 2012
Showing with 20,245 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +27 −0 README.md
  3. +2,245 −0 include/leptonica/allheaders.h
  4. +60 −0 include/leptonica/alltypes.h
  5. +163 −0 include/leptonica/array.h
  6. +205 −0 include/leptonica/arrayaccess.h
  7. +57 −0 include/leptonica/bbuffer.h
  8. +62 −0 include/leptonica/bmf.h
  9. +85 −0 include/leptonica/bmp.h
  10. +114 −0 include/leptonica/ccbord.h
  11. +151 −0 include/leptonica/dewarp.h
  12. +11 −0 include/leptonica/endianness.h
  13. +292 −0 include/leptonica/environ.h
  14. +23 −0 include/leptonica/freetype.h
  15. +88 −0 include/leptonica/gplot.h
  16. +84 −0 include/leptonica/heap.h
  17. +163 −0 include/leptonica/imageio.h
  18. +133 −0 include/leptonica/jbclass.h
  19. +45 −0 include/leptonica/leptwin.h
  20. +87 −0 include/leptonica/list.h
  21. +229 −0 include/leptonica/morph.h
  22. +971 −0 include/leptonica/pix.h
  23. +91 −0 include/leptonica/ptra.h
  24. +74 −0 include/leptonica/queue.h
  25. +231 −0 include/leptonica/readbarcode.h
  26. +133 −0 include/leptonica/regutils.h
  27. +66 −0 include/leptonica/stack.h
  28. +73 −0 include/leptonica/sudoku.h
  29. +63 −0 include/leptonica/watershed.h
  30. +214 −0 include/tesseract/ambigs.h
  31. +33 −0 include/tesseract/apitypes.h
  32. +788 −0 include/tesseract/baseapi.h
  33. +33 −0 include/tesseract/basedir.h
  34. +61 −0 include/tesseract/bits16.h
  35. +116 −0 include/tesseract/bitvector.h
  36. +99 −0 include/tesseract/ccutil.h
  37. +975 −0 include/tesseract/clst.h
  38. +45 −0 include/tesseract/control.h
  39. +157 −0 include/tesseract/cube_reco_context.h
  40. +79 −0 include/tesseract/cubeclassifier.h
  41. +36 −0 include/tesseract/docqual.h
  42. +1,018 −0 include/tesseract/elst.h
  43. +1,038 −0 include/tesseract/elst2.h
  44. +277 −0 include/tesseract/equationdetect.h
  45. +105 −0 include/tesseract/errcode.h
  46. +34 −0 include/tesseract/fileerr.h
  47. +32 −0 include/tesseract/fixspace.h
  48. +807 −0 include/tesseract/genericvector.h
  49. +40 −0 include/tesseract/globaloc.h
  50. +30 −0 include/tesseract/hashfn.h
  51. +152 −0 include/tesseract/helpers.h
  52. +159 −0 include/tesseract/host.h
  53. +1 −0 include/tesseract/hosthplb.h
  54. +32 −0 include/tesseract/imgscale.h
  55. +180 −0 include/tesseract/indexmapbidi.h
  56. +43 −0 include/tesseract/lsterr.h
  57. +203 −0 include/tesseract/ltrresultiterator.h
  58. +43 −0 include/tesseract/memry.h
  59. +37 −0 include/tesseract/mfcpch.h
  60. +64 −0 include/tesseract/mutableiterator.h
  61. +31 −0 include/tesseract/ndminx.h
  62. +28 −0 include/tesseract/notdll.h
  63. +176 −0 include/tesseract/nwmain.h
  64. +153 −0 include/tesseract/ocrclass.h
  65. +134 −0 include/tesseract/osdetect.h
  66. +34 −0 include/tesseract/output.h
  67. +327 −0 include/tesseract/pageiterator.h
  68. +108 −0 include/tesseract/paragraphs.h
  69. +312 −0 include/tesseract/paragraphs_internal.h
  70. +296 −0 include/tesseract/params.h
  71. +124 −0 include/tesseract/paramsd.h
  72. +88 −0 include/tesseract/pgedit.h
  73. +72 −0 include/tesseract/platform.h
  74. +249 −0 include/tesseract/publictypes.h
  75. +80 −0 include/tesseract/qrsequence.h
  76. +35 −0 include/tesseract/reject.h
  77. +237 −0 include/tesseract/resultiterator.h
  78. +35 −0 include/tesseract/scaleimg.h
  79. +56 −0 include/tesseract/scanutils.h
  80. +9 −0 include/tesseract/secname.h
  81. +43 −0 include/tesseract/serialis.h
  82. +106 −0 include/tesseract/sorthelper.h
  83. +26 −0 include/tesseract/stderr.h
  84. +156 −0 include/tesseract/strngs.h
  85. +29 −0 include/tesseract/tessbox.h
  86. +1,238 −0 include/tesseract/tesscallback.h
  87. +289 −0 include/tesseract/tessdatamanager.h
  88. +30 −0 include/tesseract/tessedit.h
  89. +103 −0 include/tesseract/tesseract_cube_combiner.h
  90. +962 −0 include/tesseract/tesseractclass.h
  91. +50 −0 include/tesseract/tesseractmain.h
  92. +29 −0 include/tesseract/tessvars.h
  93. +38 −0 include/tesseract/tfacep.h
  94. +42 −0 include/tesseract/tfacepp.h
  95. +191 −0 include/tesseract/thresholder.h
  96. +35 −0 include/tesseract/tprintf.h
  97. +85 −0 include/tesseract/unichar.h
  98. +82 −0 include/tesseract/unicharmap.h
  99. +891 −0 include/tesseract/unicharset.h
  100. +208 −0 include/tesseract/unicity_table.h
  101. +39 −0 include/tesseract/unicodes.h
  102. +31 −0 include/tesseract/werdit.h
  103. BIN lib/liblept.a
  104. BIN lib/libtesseract_all.a
@@ -0,0 +1 @@
+.DS_Store
@@ -0,0 +1,27 @@
+Tesseract Lib for iOS
+=====================
+
+
+About
+-----
+
+This project contains only the [leptonica](http://www.leptonica.com/download.html) and [tesseract-ocr](http://code.google.com/p/tesseract-ocr/) libraries compiled for iOS.
+
+There is no support for armv6, so it won't work with iPhone 1st Gen and iPhone 3G.
+
+
+Usage
+-----
+
+You can use the raw library with regular C++ code. An objective-C wrapper is coming soon.
+
+Don't forget to rename your implementation classes with `.mm` instead of `.m` as it uses C++ code.
+
+
+Code Sample
+-----------
+
+Follow [this blog post](http://tinsuke.wordpress.com/2011/11/01/how-to-compile-and-use-tesseract-3-01-on-ios-sdk-5/) for more informations.
+
+
+
Oops, something went wrong.
@@ -0,0 +1,60 @@
+/*====================================================================*
+ - Copyright (C) 2001 Leptonica. All rights reserved.
+ -
+ - Redistribution and use in source and binary forms, with or without
+ - modification, are permitted provided that the following conditions
+ - are met:
+ - 1. Redistributions of source code must retain the above copyright
+ - notice, this list of conditions and the following disclaimer.
+ - 2. Redistributions in binary form must reproduce the above
+ - copyright notice, this list of conditions and the following
+ - disclaimer in the documentation and/or other materials
+ - provided with the distribution.
+ -
+ - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY
+ - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *====================================================================*/
+
+#ifndef LEPTONICA_ALLTYPES_H
+#define LEPTONICA_ALLTYPES_H
+
+ /* Standard */
+#include <stdio.h>
+#include <stdlib.h>
+
+ /* General and configuration defs */
+#include "environ.h"
+
+ /* Imaging */
+#include "array.h"
+#include "arrayaccess.h"
+#include "bbuffer.h"
+#include "bmf.h"
+#include "ccbord.h"
+#include "dewarp.h"
+#include "gplot.h"
+#include "heap.h"
+#include "imageio.h"
+#include "jbclass.h"
+#include "list.h"
+#include "morph.h"
+#include "pix.h"
+#include "ptra.h"
+#include "queue.h"
+#include "regutils.h"
+#include "sudoku.h"
+#include "stack.h"
+#include "watershed.h"
+
+
+#endif /* LEPTONICA_ALLTYPES_H */
+
@@ -0,0 +1,163 @@
+/*====================================================================*
+ - Copyright (C) 2001 Leptonica. All rights reserved.
+ -
+ - Redistribution and use in source and binary forms, with or without
+ - modification, are permitted provided that the following conditions
+ - are met:
+ - 1. Redistributions of source code must retain the above copyright
+ - notice, this list of conditions and the following disclaimer.
+ - 2. Redistributions in binary form must reproduce the above
+ - copyright notice, this list of conditions and the following
+ - disclaimer in the documentation and/or other materials
+ - provided with the distribution.
+ -
+ - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY
+ - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *====================================================================*/
+
+#ifndef LEPTONICA_ARRAY_H
+#define LEPTONICA_ARRAY_H
+
+/*
+ * Contains the following structs:
+ * struct Numa
+ * struct Numaa
+ * struct Numa2d
+ * struct NumaHash
+ * struct L_Dna
+ * struct L_Dnaa
+ * struct Sarray
+ * struct L_Bytea
+ *
+ * Contains definitions for:
+ * Numa interpolation flags
+ */
+
+
+/*------------------------------------------------------------------------*
+ * Array Structs *
+ *------------------------------------------------------------------------*/
+
+#define NUMA_VERSION_NUMBER 1
+
+ /* Number array: an array of floats */
+struct Numa
+{
+ l_int32 nalloc; /* size of allocated number array */
+ l_int32 n; /* number of numbers saved */
+ l_int32 refcount; /* reference count (1 if no clones) */
+ l_float32 startx; /* x value assigned to array[0] */
+ l_float32 delx; /* change in x value as i --> i + 1 */
+ l_float32 *array; /* number array */
+};
+typedef struct Numa NUMA;
+
+
+ /* Array of number arrays */
+struct Numaa
+{
+ l_int32 nalloc; /* size of allocated ptr array */
+ l_int32 n; /* number of Numa saved */
+ struct Numa **numa; /* array of Numa */
+};
+typedef struct Numaa NUMAA;
+
+
+ /* Sparse 2-dimensional array of number arrays */
+struct Numa2d
+{
+ l_int32 nrows; /* number of rows allocated for ptr array */
+ l_int32 ncols; /* number of cols allocated for ptr array */
+ l_int32 initsize; /* initial size of each numa that is made */
+ struct Numa ***numa; /* 2D array of Numa */
+};
+typedef struct Numa2d NUMA2D;
+
+
+ /* A hash table of Numas */
+struct NumaHash
+{
+ l_int32 nbuckets;
+ l_int32 initsize; /* initial size of each numa that is made */
+ struct Numa **numa;
+};
+typedef struct NumaHash NUMAHASH;
+
+
+#define DNA_VERSION_NUMBER 1
+
+ /* Double number array: an array of doubles */
+struct L_Dna
+{
+ l_int32 nalloc; /* size of allocated number array */
+ l_int32 n; /* number of numbers saved */
+ l_int32 refcount; /* reference count (1 if no clones) */
+ l_float64 startx; /* x value assigned to array[0] */
+ l_float64 delx; /* change in x value as i --> i + 1 */
+ l_float64 *array; /* number array */
+};
+typedef struct L_Dna L_DNA;
+
+
+ /* Array of double number arrays */
+struct L_Dnaa
+{
+ l_int32 nalloc; /* size of allocated ptr array */
+ l_int32 n; /* number of L_Dna saved */
+ struct L_Dna **dna; /* array of L_Dna */
+};
+typedef struct L_Dnaa L_DNAA;
+
+
+#define SARRAY_VERSION_NUMBER 1
+
+ /* String array: an array of C strings */
+struct Sarray
+{
+ l_int32 nalloc; /* size of allocated ptr array */
+ l_int32 n; /* number of strings allocated */
+ l_int32 refcount; /* reference count (1 if no clones) */
+ char **array; /* string array */
+};
+typedef struct Sarray SARRAY;
+
+
+ /* Byte array (analogous to C++ "string") */
+struct L_Bytea
+{
+ size_t nalloc; /* number of bytes allocated in data array */
+ size_t size; /* number of bytes presently used */
+ l_int32 refcount; /* reference count (1 if no clones) */
+ l_uint8 *data; /* data array */
+};
+typedef struct L_Bytea L_BYTEA;
+
+
+/*------------------------------------------------------------------------*
+ * Array flags *
+ *------------------------------------------------------------------------*/
+
+ /* Flags for interpolation in Numa */
+enum {
+ L_LINEAR_INTERP = 1, /* linear */
+ L_QUADRATIC_INTERP = 2 /* quadratic */
+};
+
+ /* Flags for added borders in Numa and Fpix */
+enum {
+ L_CONTINUED_BORDER = 1, /* extended with same value */
+ L_SLOPE_BORDER = 2, /* extended with constant normal derivative */
+ L_MIRRORED_BORDER = 3 /* mirrored */
+};
+
+
+#endif /* LEPTONICA_ARRAY_H */
Oops, something went wrong.

0 comments on commit 7f86dcf

Please sign in to comment.