From 25c908afa04864f452a5c36413f00e69db3617eb Mon Sep 17 00:00:00 2001 From: Alexander Pozdnyakov Date: Tue, 6 Nov 2018 16:51:59 +0000 Subject: [PATCH] Import tesseract_4.0.0.orig.tar.xz [dgit import orig tesseract_4.0.0.orig.tar.xz] --- .clang-format | 5 + .github/ISSUE_TEMPLATE.md | 23 + .gitignore | 117 + .gitmodules | 9 + .lgtm.yml | 15 + .travis.yml | 55 + AUTHORS | 44 + CMakeLists.txt | 401 + CONTRIBUTING.md | 70 + COPYING | 21 + ChangeLog | 270 + Dockerfile | 15 + INSTALL | 229 + INSTALL.GIT.md | 86 + LICENSE | 202 + Makefile.am | 64 + README.md | 108 + VERSION | 1 + android/AndroidManifest.xml | 4 + android/Makefile.am | 1 + android/jni/Android.mk | 49 + android/jni/Application.mk | 13 + appveyor.yml | 45 + autogen.sh | 127 + cmake/BuildFunctions.cmake | 23 + cmake/Configure.cmake | 138 + cmake/FindICU.cmake | 323 + cmake/SourceGroups.cmake | 38 + .../TesseractConfig-version.cmake.in | 14 + cmake/templates/TesseractConfig.cmake.in | 43 + configure.ac | 557 + cppan.yml | 280 + doc/Doxyfile | 2378 ++ doc/Makefile.am | 46 + doc/ambiguous_words.1.asc | 32 + doc/classifier_tester.1.asc | 61 + doc/cntraining.1.asc | 37 + doc/combine_lang_model.1.asc | 71 + doc/combine_tessdata.1.asc | 198 + doc/dawg2wordlist.1.asc | 45 + doc/generate_manpages.sh | 34 + doc/lstmeval.1.asc | 55 + doc/lstmtraining.1.asc | 117 + doc/merge_unicharsets.1.asc | 51 + doc/mftraining.1.asc | 56 + doc/set_unicharset_properties.1.asc | 50 + doc/shapeclustering.1.asc | 59 + doc/tesseract.1.asc | 449 + doc/tesseract.bib | 69 + doc/text2image.1.asc | 168 + doc/unicharambigs.5.asc | 89 + doc/unicharset.5.asc | 133 + doc/unicharset_extractor.1.asc | 57 + doc/wordlist2dawg.1.asc | 69 + docker-compose.yml | 2 + java/Makefile.am | 73 + java/Manifest.txt | 2 + java/com/Makefile.am | 1 + java/com/google/Makefile.am | 1 + java/com/google/scrollview/Makefile.am | 4 + java/com/google/scrollview/ScrollView.java | 403 + java/com/google/scrollview/events/Makefile.am | 5 + .../com/google/scrollview/events/SVEvent.java | 87 + .../scrollview/events/SVEventHandler.java | 301 + .../google/scrollview/events/SVEventType.java | 31 + java/com/google/scrollview/ui/Makefile.am | 7 + .../scrollview/ui/SVAbstractMenuItem.java | 57 + .../scrollview/ui/SVCheckboxMenuItem.java | 57 + .../google/scrollview/ui/SVEmptyMenuItem.java | 46 + .../google/scrollview/ui/SVImageHandler.java | 74 + java/com/google/scrollview/ui/SVMenuBar.java | 130 + java/com/google/scrollview/ui/SVMenuItem.java | 60 + .../com/google/scrollview/ui/SVPopupMenu.java | 144 + .../google/scrollview/ui/SVSubMenuItem.java | 39 + java/com/google/scrollview/ui/SVWindow.java | 648 + langtests/.gitignore | 2 + langtests/Makefile.am | 8 + langtests/README.md | 54 + langtests/counttestset.sh | 52 + langtests/deva_setup.sh | 18 + langtests/deva_test.sh | 18 + langtests/frk_setup.sh | 24 + langtests/frk_test.sh | 13 + langtests/reports/4_best_Devanagari.summary | 8 + langtests/reports/4_best_frk.summary | 2 + .../reports/4_best_int_Devanagari.summary | 8 + langtests/reports/4_best_int_frk.summary | 2 + langtests/reports/4_best_int_san.summary | 8 + langtests/reports/4_best_san.summary | 8 + langtests/reports/4_fast_Devanagari.summary | 8 + langtests/reports/4_fast_Fraktur.summary | 2 + langtests/reports/4_fast_frk.summary | 2 + langtests/reports/4_fast_san.summary | 8 + langtests/reports/4_plus10k_san.summary | 8 + langtests/reports/4_plus20k_san.summary | 8 + langtests/reports/4_plus30k_san.summary | 8 + langtests/reports/4_plus40k_san.summary | 8 + langtests/runlangtests.sh | 105 + langtests/runtestset.sh | 61 + m4/ax_check_compile_flag.m4 | 53 + m4/ax_split_version.m4 | 38 + snap/snapcraft.yaml | 50 + src/api/Makefile.am | 85 + src/api/apitypes.h | 33 + src/api/baseapi.cpp | 3005 +++ src/api/baseapi.h | 926 + src/api/capi.cpp | 861 + src/api/capi.h | 451 + src/api/pdfrenderer.cpp | 1016 + src/api/renderer.cpp | 280 + src/api/renderer.h | 262 + src/api/tess_version.h.in | 30 + src/api/tesseractmain.cpp | 696 + src/arch/Makefile.am | 36 + src/arch/dotproductavx.cpp | 114 + src/arch/dotproductavx.h | 30 + src/arch/dotproductsse.cpp | 140 + src/arch/dotproductsse.h | 35 + src/arch/intsimdmatrix.cpp | 135 + src/arch/intsimdmatrix.h | 136 + src/arch/intsimdmatrixavx2.cpp | 284 + src/arch/intsimdmatrixavx2.h | 33 + src/arch/intsimdmatrixsse.cpp | 44 + src/arch/intsimdmatrixsse.h | 33 + src/arch/simddetect.cpp | 81 + src/arch/simddetect.h | 58 + src/ccmain/Makefile.am | 86 + src/ccmain/adaptions.cpp | 115 + src/ccmain/applybox.cpp | 824 + src/ccmain/control.cpp | 2147 ++ src/ccmain/control.h | 38 + src/ccmain/docqual.cpp | 1001 + src/ccmain/docqual.h | 40 + src/ccmain/equationdetect.cpp | 1520 ++ src/ccmain/equationdetect.h | 274 + src/ccmain/fixspace.cpp | 895 + src/ccmain/fixspace.h | 32 + src/ccmain/fixxht.cpp | 215 + src/ccmain/linerec.cpp | 302 + src/ccmain/ltrresultiterator.cpp | 395 + src/ccmain/ltrresultiterator.h | 224 + src/ccmain/mutableiterator.cpp | 24 + src/ccmain/mutableiterator.h | 64 + src/ccmain/osdetect.cpp | 581 + src/ccmain/osdetect.h | 140 + src/ccmain/output.cpp | 424 + src/ccmain/output.h | 33 + src/ccmain/pageiterator.cpp | 627 + src/ccmain/pageiterator.h | 364 + src/ccmain/pagesegmain.cpp | 410 + src/ccmain/pagewalk.cpp | 43 + src/ccmain/par_control.cpp | 72 + src/ccmain/paragraphs.cpp | 2583 +++ src/ccmain/paragraphs.h | 109 + src/ccmain/paragraphs_internal.h | 311 + src/ccmain/paramsd.cpp | 355 + src/ccmain/paramsd.h | 131 + src/ccmain/pgedit.cpp | 1001 + src/ccmain/pgedit.h | 79 + src/ccmain/recogtraining.cpp | 236 + src/ccmain/reject.cpp | 799 + src/ccmain/reject.h | 35 + src/ccmain/resultiterator.cpp | 695 + src/ccmain/resultiterator.h | 256 + src/ccmain/superscript.cpp | 612 + src/ccmain/tessbox.cpp | 75 + src/ccmain/tessedit.cpp | 488 + src/ccmain/tessedit.h | 28 + src/ccmain/tesseractclass.cpp | 692 + src/ccmain/tesseractclass.h | 1187 + src/ccmain/tessvars.cpp | 24 + src/ccmain/tessvars.h | 27 + src/ccmain/tfacepp.cpp | 323 + src/ccmain/thresholder.cpp | 333 + src/ccmain/thresholder.h | 190 + src/ccmain/werdit.cpp | 63 + src/ccmain/werdit.h | 29 + src/ccstruct/Makefile.am | 38 + src/ccstruct/blamer.cpp | 591 + src/ccstruct/blamer.h | 344 + src/ccstruct/blobbox.cpp | 1096 + src/ccstruct/blobbox.h | 863 + src/ccstruct/blobs.cpp | 1008 + src/ccstruct/blobs.h | 456 + src/ccstruct/blread.cpp | 69 + src/ccstruct/blread.h | 36 + src/ccstruct/boxread.cpp | 241 + src/ccstruct/boxread.h | 90 + src/ccstruct/boxword.cpp | 200 + src/ccstruct/boxword.h | 98 + src/ccstruct/ccstruct.cpp | 36 + src/ccstruct/ccstruct.h | 41 + src/ccstruct/coutln.cpp | 1052 + src/ccstruct/coutln.h | 293 + src/ccstruct/crakedge.h | 37 + src/ccstruct/debugpixa.h | 52 + src/ccstruct/detlinefit.cpp | 293 + src/ccstruct/detlinefit.h | 162 + src/ccstruct/dppoint.cpp | 98 + src/ccstruct/dppoint.h | 101 + src/ccstruct/fontinfo.cpp | 236 + src/ccstruct/fontinfo.h | 189 + src/ccstruct/imagedata.cpp | 711 + src/ccstruct/imagedata.h | 379 + src/ccstruct/linlsq.cpp | 258 + src/ccstruct/linlsq.h | 136 + src/ccstruct/matrix.cpp | 164 + src/ccstruct/matrix.h | 640 + src/ccstruct/mod128.cpp | 88 + src/ccstruct/mod128.h | 83 + src/ccstruct/normalis.cpp | 568 + src/ccstruct/normalis.h | 316 + src/ccstruct/ocrblock.cpp | 517 + src/ccstruct/ocrblock.h | 234 + src/ccstruct/ocrpara.cpp | 100 + src/ccstruct/ocrpara.h | 191 + src/ccstruct/ocrrow.cpp | 243 + src/ccstruct/ocrrow.h | 171 + src/ccstruct/otsuthr.cpp | 214 + src/ccstruct/otsuthr.h | 56 + src/ccstruct/pageres.cpp | 1690 ++ src/ccstruct/pageres.h | 791 + src/ccstruct/params_training_featdef.cpp | 40 + src/ccstruct/params_training_featdef.h | 154 + src/ccstruct/pdblock.cpp | 381 + src/ccstruct/pdblock.h | 174 + src/ccstruct/points.cpp | 144 + src/ccstruct/points.h | 777 + src/ccstruct/polyaprx.cpp | 589 + src/ccstruct/polyaprx.h | 45 + src/ccstruct/polyblk.cpp | 416 + src/ccstruct/polyblk.h | 110 + src/ccstruct/publictypes.cpp | 40 + src/ccstruct/publictypes.h | 286 + src/ccstruct/quadlsq.cpp | 143 + src/ccstruct/quadlsq.h | 67 + src/ccstruct/quadratc.h | 62 + src/ccstruct/quspline.cpp | 409 + src/ccstruct/quspline.h | 100 + src/ccstruct/ratngs.cpp | 854 + src/ccstruct/ratngs.h | 659 + src/ccstruct/rect.cpp | 263 + src/ccstruct/rect.h | 494 + src/ccstruct/rejctmap.cpp | 450 + src/ccstruct/rejctmap.h | 263 + src/ccstruct/seam.cpp | 280 + src/ccstruct/seam.h | 203 + src/ccstruct/split.cpp | 328 + src/ccstruct/split.h | 120 + src/ccstruct/statistc.cpp | 781 + src/ccstruct/statistc.h | 169 + src/ccstruct/stepblob.cpp | 553 + src/ccstruct/stepblob.h | 137 + src/ccstruct/vecfuncs.cpp | 63 + src/ccstruct/vecfuncs.h | 78 + src/ccstruct/werd.cpp | 599 + src/ccstruct/werd.h | 197 + src/ccutil/Makefile.am | 45 + src/ccutil/ambigs.cpp | 394 + src/ccutil/ambigs.h | 227 + src/ccutil/basedir.cpp | 44 + src/ccutil/basedir.h | 31 + src/ccutil/bits16.h | 62 + src/ccutil/bitvector.cpp | 265 + src/ccutil/bitvector.h | 142 + src/ccutil/ccutil.cpp | 60 + src/ccutil/ccutil.h | 94 + src/ccutil/clst.cpp | 510 + src/ccutil/clst.h | 931 + src/ccutil/doubleptr.h | 93 + src/ccutil/elst.cpp | 459 + src/ccutil/elst.h | 986 + src/ccutil/elst2.cpp | 488 + src/ccutil/elst2.h | 988 + src/ccutil/errcode.cpp | 91 + src/ccutil/errcode.h | 103 + src/ccutil/fileerr.h | 34 + src/ccutil/fileio.cpp | 197 + src/ccutil/fileio.h | 98 + src/ccutil/genericheap.h | 237 + src/ccutil/genericvector.h | 1130 + src/ccutil/globaloc.cpp | 92 + src/ccutil/globaloc.h | 39 + src/ccutil/helpers.h | 205 + src/ccutil/host.h | 65 + src/ccutil/indexmapbidi.cpp | 256 + src/ccutil/indexmapbidi.h | 180 + src/ccutil/kdpair.h | 189 + src/ccutil/lsterr.h | 44 + src/ccutil/mainblk.cpp | 100 + src/ccutil/object_cache.h | 125 + src/ccutil/ocrclass.h | 184 + src/ccutil/params.cpp | 216 + src/ccutil/params.h | 312 + src/ccutil/platform.h | 79 + src/ccutil/qrsequence.h | 80 + src/ccutil/scanutils.cpp | 546 + src/ccutil/scanutils.h | 67 + src/ccutil/serialis.cpp | 332 + src/ccutil/serialis.h | 162 + src/ccutil/sorthelper.h | 108 + src/ccutil/strngs.cpp | 505 + src/ccutil/strngs.h | 181 + src/ccutil/tesscallback.h | 9721 ++++++++ src/ccutil/tessdatamanager.cpp | 275 + src/ccutil/tessdatamanager.h | 248 + src/ccutil/tprintf.cpp | 68 + src/ccutil/tprintf.h | 29 + src/ccutil/unichar.cpp | 244 + src/ccutil/unichar.h | 175 + src/ccutil/unicharcompress.cpp | 426 + src/ccutil/unicharcompress.h | 239 + src/ccutil/unicharmap.cpp | 130 + src/ccutil/unicharmap.h | 73 + src/ccutil/unicharset.cpp | 1144 + src/ccutil/unicharset.h | 1043 + src/ccutil/unicity_table.h | 208 + src/ccutil/unicodes.cpp | 57 + src/ccutil/unicodes.h | 39 + src/ccutil/universalambigs.cpp | 19021 ++++++++++++++++ src/ccutil/universalambigs.h | 31 + src/classify/Makefile.am | 94 + src/classify/adaptive.cpp | 510 + src/classify/adaptive.h | 140 + src/classify/adaptmatch.cpp | 2305 ++ src/classify/blobclass.cpp | 117 + src/classify/blobclass.h | 50 + src/classify/classify.cpp | 264 + src/classify/classify.h | 585 + src/classify/cluster.cpp | 2494 ++ src/classify/cluster.h | 131 + src/classify/clusttool.cpp | 362 + src/classify/clusttool.h | 50 + src/classify/cutoffs.cpp | 73 + src/classify/cutoffs.h | 45 + src/classify/errorcounter.cpp | 500 + src/classify/errorcounter.h | 227 + src/classify/featdefs.cpp | 277 + src/classify/featdefs.h | 83 + src/classify/float2int.cpp | 111 + src/classify/float2int.h | 30 + src/classify/fpoint.cpp | 54 + src/classify/fpoint.h | 54 + src/classify/intfeaturedist.cpp | 159 + src/classify/intfeaturedist.h | 80 + src/classify/intfeaturemap.cpp | 244 + src/classify/intfeaturemap.h | 163 + src/classify/intfeaturespace.cpp | 123 + src/classify/intfeaturespace.h | 104 + src/classify/intfx.cpp | 488 + src/classify/intfx.h | 68 + src/classify/intmatcher.cpp | 1251 + src/classify/intmatcher.h | 201 + src/classify/intproto.cpp | 1792 ++ src/classify/intproto.h | 261 + src/classify/kdtree.cpp | 540 + src/classify/kdtree.h | 94 + src/classify/mastertrainer.cpp | 984 + src/classify/mastertrainer.h | 309 + src/classify/mf.cpp | 81 + src/classify/mf.h | 39 + src/classify/mfdefs.cpp | 48 + src/classify/mfdefs.h | 56 + src/classify/mfoutline.cpp | 463 + src/classify/mfoutline.h | 125 + src/classify/mfx.cpp | 185 + src/classify/mfx.h | 45 + src/classify/normfeat.cpp | 75 + src/classify/normfeat.h | 40 + src/classify/normmatch.cpp | 274 + src/classify/normmatch.h | 37 + src/classify/ocrfeatures.cpp | 193 + src/classify/ocrfeatures.h | 124 + src/classify/outfeat.cpp | 173 + src/classify/outfeat.h | 48 + src/classify/picofeat.cpp | 269 + src/classify/picofeat.h | 64 + src/classify/protos.cpp | 279 + src/classify/protos.h | 169 + src/classify/sampleiterator.cpp | 261 + src/classify/sampleiterator.h | 195 + src/classify/shapeclassifier.cpp | 231 + src/classify/shapeclassifier.h | 124 + src/classify/shapetable.cpp | 726 + src/classify/shapetable.h | 404 + src/classify/tessclassifier.cpp | 85 + src/classify/tessclassifier.h | 77 + src/classify/trainingsample.cpp | 345 + src/classify/trainingsample.h | 250 + src/classify/trainingsampleset.cpp | 763 + src/classify/trainingsampleset.h | 289 + src/cutil/Makefile.am | 20 + src/cutil/bitvec.cpp | 85 + src/cutil/bitvec.h | 75 + src/cutil/callcpp.cpp | 138 + src/cutil/callcpp.h | 113 + src/cutil/cutil.h | 35 + src/cutil/cutil_class.cpp | 28 + src/cutil/cutil_class.h | 36 + src/cutil/emalloc.cpp | 48 + src/cutil/emalloc.h | 27 + src/cutil/globals.h | 33 + src/cutil/oldlist.cpp | 377 + src/cutil/oldlist.h | 356 + src/cutil/structures.cpp | 36 + src/cutil/structures.h | 49 + src/dict/Makefile.am | 21 + src/dict/context.cpp | 82 + src/dict/dawg.cpp | 424 + src/dict/dawg.h | 567 + src/dict/dawg_cache.cpp | 97 + src/dict/dawg_cache.h | 53 + src/dict/dict.cpp | 865 + src/dict/dict.h | 649 + src/dict/hyphen.cpp | 62 + src/dict/matchdefs.h | 114 + src/dict/permdawg.cpp | 397 + src/dict/stopper.cpp | 511 + src/dict/stopper.h | 50 + src/dict/trie.cpp | 728 + src/dict/trie.h | 436 + src/lstm/Makefile.am | 40 + src/lstm/convolve.cpp | 115 + src/lstm/convolve.h | 73 + src/lstm/ctc.cpp | 414 + src/lstm/ctc.h | 130 + src/lstm/fullyconnected.cpp | 313 + src/lstm/fullyconnected.h | 136 + src/lstm/functions.cpp | 26 + src/lstm/functions.h | 249 + src/lstm/input.cpp | 147 + src/lstm/input.h | 104 + src/lstm/lstm.cpp | 767 + src/lstm/lstm.h | 162 + src/lstm/lstmrecognizer.cpp | 517 + src/lstm/lstmrecognizer.h | 312 + src/lstm/lstmtrainer.cpp | 1353 ++ src/lstm/lstmtrainer.h | 488 + src/lstm/maxpool.cpp | 82 + src/lstm/maxpool.h | 69 + src/lstm/network.cpp | 337 + src/lstm/network.h | 320 + src/lstm/networkbuilder.cpp | 487 + src/lstm/networkbuilder.h | 160 + src/lstm/networkio.cpp | 997 + src/lstm/networkio.h | 349 + src/lstm/networkscratch.h | 257 + src/lstm/parallel.cpp | 176 + src/lstm/parallel.h | 87 + src/lstm/plumbing.cpp | 243 + src/lstm/plumbing.h | 144 + src/lstm/recodebeam.cpp | 1010 + src/lstm/recodebeam.h | 405 + src/lstm/reconfig.cpp | 119 + src/lstm/reconfig.h | 85 + src/lstm/reversed.cpp | 89 + src/lstm/reversed.h | 89 + src/lstm/series.cpp | 201 + src/lstm/series.h | 93 + src/lstm/static_shape.h | 104 + src/lstm/stridemap.cpp | 175 + src/lstm/stridemap.h | 137 + src/lstm/tfnetwork.cpp | 146 + src/lstm/tfnetwork.h | 90 + src/lstm/tfnetwork.proto | 61 + src/lstm/weightmatrix.cpp | 426 + src/lstm/weightmatrix.h | 199 + src/opencl/Makefile.am | 12 + src/opencl/oclkernels.h | 1073 + src/opencl/opencl_device_selection.h | 48 + src/opencl/openclwrapper.cpp | 2637 +++ src/opencl/openclwrapper.h | 295 + src/textord/Makefile.am | 47 + src/textord/alignedblob.cpp | 534 + src/textord/alignedblob.h | 126 + src/textord/baselinedetect.cpp | 863 + src/textord/baselinedetect.h | 277 + src/textord/bbgrid.cpp | 286 + src/textord/bbgrid.h | 960 + src/textord/blkocc.cpp | 169 + src/textord/blkocc.h | 252 + src/textord/blobgrid.cpp | 45 + src/textord/blobgrid.h | 46 + src/textord/ccnontextdetect.cpp | 324 + src/textord/ccnontextdetect.h | 87 + src/textord/cjkpitch.cpp | 1096 + src/textord/cjkpitch.h | 71 + src/textord/colfind.cpp | 1626 ++ src/textord/colfind.h | 369 + src/textord/colpartition.cpp | 2589 +++ src/textord/colpartition.h | 940 + src/textord/colpartitiongrid.cpp | 1750 ++ src/textord/colpartitiongrid.h | 253 + src/textord/colpartitionset.cpp | 666 + src/textord/colpartitionset.h | 172 + src/textord/devanagari_processing.cpp | 500 + src/textord/devanagari_processing.h | 210 + src/textord/drawedg.cpp | 81 + src/textord/drawedg.h | 37 + src/textord/drawtord.cpp | 419 + src/textord/drawtord.h | 98 + src/textord/edgblob.cpp | 462 + src/textord/edgblob.h | 95 + src/textord/edgloop.cpp | 159 + src/textord/edgloop.h | 49 + src/textord/equationdetectbase.cpp | 64 + src/textord/equationdetectbase.h | 59 + src/textord/fpchop.cpp | 816 + src/textord/fpchop.h | 132 + src/textord/gap_map.cpp | 184 + src/textord/gap_map.h | 49 + src/textord/imagefind.cpp | 1365 ++ src/textord/imagefind.h | 159 + src/textord/linefind.cpp | 771 + src/textord/linefind.h | 149 + src/textord/makerow.cpp | 2677 +++ src/textord/makerow.h | 286 + src/textord/oldbasel.cpp | 1703 ++ src/textord/oldbasel.h | 174 + src/textord/pithsync.cpp | 690 + src/textord/pithsync.h | 132 + src/textord/pitsync1.cpp | 418 + src/textord/pitsync1.h | 121 + src/textord/scanedg.cpp | 370 + src/textord/scanedg.h | 67 + src/textord/sortflts.cpp | 77 + src/textord/sortflts.h | 71 + src/textord/strokewidth.cpp | 2015 ++ src/textord/strokewidth.h | 355 + src/textord/tabfind.cpp | 1431 ++ src/textord/tabfind.h | 385 + src/textord/tablefind.cpp | 2097 ++ src/textord/tablefind.h | 430 + src/textord/tablerecog.cpp | 1065 + src/textord/tablerecog.h | 378 + src/textord/tabvector.cpp | 983 + src/textord/tabvector.h | 430 + src/textord/textlineprojection.cpp | 775 + src/textord/textlineprojection.h | 206 + src/textord/textord.cpp | 353 + src/textord/textord.h | 403 + src/textord/topitch.cpp | 1845 ++ src/textord/topitch.h | 187 + src/textord/tordmain.cpp | 994 + src/textord/tordmain.h | 41 + src/textord/tospace.cpp | 1895 ++ src/textord/tovars.cpp | 83 + src/textord/tovars.h | 89 + src/textord/underlin.cpp | 278 + src/textord/underlin.h | 51 + src/textord/wordseg.cpp | 624 + src/textord/wordseg.h | 76 + src/textord/workingpartset.cpp | 144 + src/textord/workingpartset.h | 88 + src/training/CMakeLists.txt | 312 + src/training/Makefile.am | 282 + src/training/ambiguous_words.cpp | 80 + src/training/boxchar.cpp | 346 + src/training/boxchar.h | 132 + src/training/classifier_tester.cpp | 139 + src/training/cntraining.cpp | 259 + src/training/combine_lang_model.cpp | 81 + src/training/combine_tessdata.cpp | 202 + src/training/commandlineflags.cpp | 340 + src/training/commandlineflags.h | 83 + src/training/commontraining.cpp | 867 + src/training/commontraining.h | 224 + src/training/dawg2wordlist.cpp | 101 + src/training/degradeimage.cpp | 310 + src/training/degradeimage.h | 61 + src/training/icuerrorcode.cpp | 28 + src/training/icuerrorcode.h | 63 + src/training/lang_model_helpers.cpp | 240 + src/training/lang_model_helpers.h | 84 + src/training/language-specific.sh | 1196 + src/training/ligature_table.cpp | 194 + src/training/ligature_table.h | 80 + src/training/lstmeval.cpp | 82 + src/training/lstmtester.cpp | 158 + src/training/lstmtester.h | 95 + src/training/lstmtraining.cpp | 222 + src/training/merge_unicharsets.cpp | 58 + src/training/mergenf.cpp | 328 + src/training/mergenf.h | 79 + src/training/mftraining.cpp | 295 + src/training/normstrngs.cpp | 304 + src/training/normstrngs.h | 103 + src/training/pango_font_info.cpp | 799 + src/training/pango_font_info.h | 217 + src/training/set_unicharset_properties.cpp | 47 + src/training/shapeclustering.cpp | 77 + src/training/stringrenderer.cpp | 907 + src/training/stringrenderer.h | 227 + src/training/tessopt.cpp | 59 + src/training/tessopt.h | 33 + src/training/tesstrain.sh | 88 + src/training/tesstrain_utils.sh | 609 + src/training/text2image.cpp | 708 + src/training/tlog.cpp | 23 + src/training/tlog.h | 41 + src/training/unicharset_extractor.cpp | 115 + src/training/unicharset_training_utils.cpp | 209 + src/training/unicharset_training_utils.h | 58 + src/training/util.h | 65 + src/training/validate_grapheme.cpp | 176 + src/training/validate_grapheme.h | 35 + src/training/validate_indic.cpp | 275 + src/training/validate_indic.h | 44 + src/training/validate_javanese.cpp | 276 + src/training/validate_javanese.h | 63 + src/training/validate_khmer.cpp | 106 + src/training/validate_khmer.h | 27 + src/training/validate_myanmar.cpp | 160 + src/training/validate_myanmar.h | 47 + src/training/validator.cpp | 222 + src/training/validator.h | 247 + src/training/wordlist2dawg.cpp | 105 + src/viewer/Makefile.am | 14 + src/viewer/scrollview.cpp | 835 + src/viewer/scrollview.h | 418 + src/viewer/svmnode.cpp | 143 + src/viewer/svmnode.h | 96 + src/viewer/svpaint.cpp | 235 + src/viewer/svutil.cpp | 460 + src/viewer/svutil.h | 146 + src/vs2010/port/gettimeofday.cpp | 32 + src/vs2010/port/gettimeofday.h | 31 + src/vs2010/tesseract/libtesseract.rc.in | 100 + src/vs2010/tesseract/resource.h | 23 + src/vs2010/tesseract/tesseract.rc.in | 100 + src/wordrec/Makefile.am | 64 + src/wordrec/associate.cpp | 171 + src/wordrec/associate.h | 123 + src/wordrec/chop.cpp | 312 + src/wordrec/chop.h | 44 + src/wordrec/chopper.cpp | 661 + src/wordrec/chopper.h | 47 + src/wordrec/drawfx.cpp | 89 + src/wordrec/drawfx.h | 31 + src/wordrec/findseam.cpp | 373 + src/wordrec/findseam.h | 44 + src/wordrec/gradechop.cpp | 90 + src/wordrec/language_model.cpp | 1480 ++ src/wordrec/language_model.h | 427 + src/wordrec/lm_consistency.cpp | 113 + src/wordrec/lm_consistency.h | 143 + src/wordrec/lm_pain_points.cpp | 219 + src/wordrec/lm_pain_points.h | 142 + src/wordrec/lm_state.cpp | 81 + src/wordrec/lm_state.h | 240 + src/wordrec/measure.h | 127 + src/wordrec/outlines.cpp | 85 + src/wordrec/outlines.h | 135 + src/wordrec/params_model.cpp | 174 + src/wordrec/params_model.h | 90 + src/wordrec/pieces.cpp | 342 + src/wordrec/plotedges.cpp | 119 + src/wordrec/plotedges.h | 73 + src/wordrec/render.cpp | 134 + src/wordrec/render.h | 64 + src/wordrec/segsearch.cpp | 343 + src/wordrec/tface.cpp | 156 + src/wordrec/wordclass.cpp | 83 + src/wordrec/wordrec.cpp | 147 + src/wordrec/wordrec.h | 560 + tessdata/Makefile.am | 34 + tessdata/configs/Makefile.am | 3 + tessdata/configs/ambigs.train | 7 + tessdata/configs/api_config | 1 + tessdata/configs/bazaar | 4 + tessdata/configs/bigram | 5 + tessdata/configs/box.train | 14 + tessdata/configs/box.train.stderr | 15 + tessdata/configs/digits | 1 + tessdata/configs/get.image | 1 + tessdata/configs/hocr | 2 + tessdata/configs/inter | 2 + tessdata/configs/kannada | 4 + tessdata/configs/linebox | 2 + tessdata/configs/logfile | 1 + tessdata/configs/lstm.train | 13 + tessdata/configs/lstmdebug | 4 + tessdata/configs/makebox | 1 + tessdata/configs/pdf | 1 + tessdata/configs/quiet | 1 + tessdata/configs/rebox | 2 + tessdata/configs/strokewidth | 12 + tessdata/configs/tsv | 1 + tessdata/configs/txt | 3 + tessdata/configs/unlv | 2 + tessdata/eng.user-patterns | 2 + tessdata/eng.user-words | 5 + tessdata/pdf.ttf | Bin 0 -> 572 bytes tessdata/tessconfigs/Makefile.am | 3 + tessdata/tessconfigs/batch | 1 + tessdata/tessconfigs/batch.nochop | 2 + tessdata/tessconfigs/matdemo | 7 + tessdata/tessconfigs/msdemo | 13 + tessdata/tessconfigs/nobatch | 1 + tessdata/tessconfigs/segdemo | 10 + tesseract.pc.cmake | 12 + tesseract.pc.in | 16 + test/.gitignore | 32 + test/LICENSE | 201 + test/README.md | 4 + test/testdata/README.md | 2 + test/testdata/chi_sim.unicharset | 5075 +++++ test/testdata/chi_tra.unicharset | 6220 +++++ test/testdata/eng.unicharset | 112 + test/testdata/jpn.unicharset | 3707 +++ test/testdata/kan.unicharset | 2841 +++ test/testdata/kor.unicharset | 1651 ++ test/testdata/mar.unicharset | 2198 ++ test/testdata/por.unicharset | 227 + test/testdata/trivial.unicharset | 5 + test/testing/12.tif | Bin 0 -> 254 bytes test/testing/136.tif | Bin 0 -> 272 bytes test/testing/256.tif | Bin 0 -> 288 bytes test/testing/324.tif | Bin 0 -> 290 bytes test/testing/410.tif | Bin 0 -> 272 bytes test/testing/432.tif | Bin 0 -> 280 bytes test/testing/433.tif | Bin 0 -> 274 bytes test/testing/540.tif | Bin 0 -> 276 bytes test/testing/692.tif | Bin 0 -> 304 bytes test/testing/779.tif | Bin 0 -> 286 bytes test/testing/793.tif | Bin 0 -> 284 bytes test/testing/808.tif | Bin 0 -> 292 bytes test/testing/815.tif | Bin 0 -> 274 bytes test/testing/FILES | 18 + test/testing/HelloGoogle.tif | Bin 0 -> 956 bytes test/testing/README.md | 2 + test/testing/arabic.tif | Bin 0 -> 342 bytes test/testing/deslant.tif | Bin 0 -> 122298 bytes test/testing/devatest-rotated-270.png | Bin 0 -> 150314 bytes test/testing/devatest.png | Bin 0 -> 126784 bytes test/testing/eng_beam.unicharset | 114 + test/testing/eurotext.tif | Bin 0 -> 102598 bytes test/testing/eurotext.txt | 12 + test/testing/hebrew-nikud-genesis-1-2.png | Bin 0 -> 399613 bytes test/testing/hebrew.png | Bin 0 -> 193942 bytes test/testing/hebtypo.jpg | Bin 0 -> 444141 bytes test/testing/phototest-rotated-180.png | Bin 0 -> 5276 bytes test/testing/phototest-rotated-L.png | Bin 0 -> 6793 bytes test/testing/phototest-rotated-R.png | Bin 0 -> 6862 bytes test/testing/phototest.gold.txt | 9 + test/testing/phototest.tif | Bin 0 -> 38668 bytes test/testing/phototest.txt | 9 + test/testing/phototest_2.tif | Bin 0 -> 1614184 bytes test/testing/phototestrot.tif | Bin 0 -> 23604 bytes test/testing/raaj.tif | Bin 0 -> 312 bytes test/testing/trainingital.box | 33 + test/testing/trainingital.tif | Bin 0 -> 1522 bytes test/testing/trainingitalline.box | 1 + test/testing/trainingitalline.tif | Bin 0 -> 1522 bytes test/testing/trainingtimes.box | 33 + test/testing/trainingtimes.tif | Bin 0 -> 1488 bytes test/testing/trainingtimesline.box | 1 + test/testing/trainingtimesline.tif | Bin 0 -> 1488 bytes test/testing/viet.tif | Bin 0 -> 394 bytes tests/tesseracttests.cpp | 26 + unittest/Makefile.am | 257 + unittest/README.md | 11 + unittest/apiexample_test.cc | 110 + unittest/applybox_test.cc | 125 + unittest/baseapi_test.cc | 394 + unittest/baseapi_thread_test.cc | 205 + unittest/bitvector_test.cc | 162 + unittest/cleanapi_test.cc | 29 + unittest/colpartition_test.cc | 76 + unittest/commandlineflags_test.cc | 158 + unittest/cycletimer.h | 61 + unittest/dawg_test.cc | 106 + unittest/denorm_test.cc | 96 + unittest/equationdetect_test.cc | 526 + unittest/fileio_test.cc | 65 + unittest/heap_test.cc | 196 + unittest/imagedata_test.cc | 130 + unittest/include_gunit.h | 50 + unittest/indexmapbidi_test.cc | 114 + unittest/intfeaturemap_test.cc | 122 + unittest/intsimdmatrix_test.cc | 106 + unittest/lang_model_test.cc | 114 + unittest/layout_test.cc | 198 + unittest/ligature_table_test.cc | 92 + unittest/linlsq_test.cc | 115 + unittest/loadlang_test.cc | 250 + unittest/log.h | 55 + unittest/lstm_recode_test.cc | 25 + unittest/lstm_squashed_test.cc | 20 + unittest/lstm_test.cc | 199 + unittest/lstm_test.h | 168 + unittest/lstmtrainer_test.cc | 91 + unittest/mastertrainer_test.cc | 308 + unittest/matrix_test.cc | 135 + unittest/networkio_test.cc | 183 + unittest/normstrngs_test.cc | 394 + unittest/normstrngs_test.h | 71 + unittest/nthitem_test.cc | 116 + unittest/osd_test.cc | 125 + unittest/pagesegmode_test.cc | 80 + unittest/pango_font_info_test.cc | 288 + unittest/paragraphs_test.cc | 704 + unittest/params_model_test.cc | 38 + unittest/progress_test.cc | 161 + unittest/qrsequence_test.cc | 64 + unittest/recodebeam_test.cc | 462 + unittest/rect_test.cc | 174 + unittest/resultiterator_test.cc | 605 + unittest/scanutils_test.cc | 82 + unittest/shapetable_test.cc | 148 + unittest/stats_test.cc | 58 + unittest/stridemap_test.cc | 167 + unittest/stringrenderer_test.cc | 545 + unittest/tablefind_test.cc | 264 + unittest/tablerecog_test.cc | 319 + unittest/tabvector_test.cc | 129 + unittest/tatweel_test.cc | 65 + unittest/textlineprojection_test.cc | 256 + unittest/tfile_test.cc | 177 + unittest/unichar_test.cc | 32 + unittest/unicharcompress_test.cc | 248 + unittest/unicharset_test.cc | 139 + unittest/validate_grapheme_test.cc | 170 + unittest/validate_indic_test.cc | 222 + unittest/validate_khmer_test.cc | 41 + unittest/validate_myanmar_test.cc | 45 + unittest/validator_test.cc | 78 + unlvtests/Makefile.am | 12 + unlvtests/README.md | 94 + unlvtests/counttestset.sh | 68 + unlvtests/reorgdata.sh | 53 + unlvtests/reports/1995.bus.3B.sum | 1 + unlvtests/reports/1995.doe3.3B.sum | 1 + unlvtests/reports/1995.mag.3B.sum | 1 + unlvtests/reports/1995.news.3B.sum | 1 + unlvtests/reports/2.03.summary | 9 + unlvtests/reports/2.04.summary | 9 + unlvtests/reports/4_best_int_spa.summary | 2 + unlvtests/reports/4_best_spa.summary | 2 + unlvtests/reports/4_fast_eng.summary | 9 + unlvtests/reports/4_fast_spa.summary | 2 + unlvtests/runalltests.sh | 135 + unlvtests/runalltests_spa.sh | 109 + unlvtests/runtestset.sh | 80 + 844 files changed, 258877 insertions(+) create mode 100644 .clang-format create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .gitignore create mode 100644 .gitmodules create mode 100644 .lgtm.yml create mode 100644 .travis.yml create mode 100644 AUTHORS create mode 100644 CMakeLists.txt create mode 100644 CONTRIBUTING.md create mode 100644 COPYING create mode 100644 ChangeLog create mode 100644 Dockerfile create mode 100644 INSTALL create mode 100644 INSTALL.GIT.md create mode 100644 LICENSE create mode 100644 Makefile.am create mode 100644 README.md create mode 100644 VERSION create mode 100644 android/AndroidManifest.xml create mode 100644 android/Makefile.am create mode 100644 android/jni/Android.mk create mode 100644 android/jni/Application.mk create mode 100644 appveyor.yml create mode 100755 autogen.sh create mode 100644 cmake/BuildFunctions.cmake create mode 100644 cmake/Configure.cmake create mode 100644 cmake/FindICU.cmake create mode 100644 cmake/SourceGroups.cmake create mode 100644 cmake/templates/TesseractConfig-version.cmake.in create mode 100644 cmake/templates/TesseractConfig.cmake.in create mode 100644 configure.ac create mode 100644 cppan.yml create mode 100644 doc/Doxyfile create mode 100644 doc/Makefile.am create mode 100644 doc/ambiguous_words.1.asc create mode 100644 doc/classifier_tester.1.asc create mode 100644 doc/cntraining.1.asc create mode 100644 doc/combine_lang_model.1.asc create mode 100644 doc/combine_tessdata.1.asc create mode 100644 doc/dawg2wordlist.1.asc create mode 100755 doc/generate_manpages.sh create mode 100644 doc/lstmeval.1.asc create mode 100644 doc/lstmtraining.1.asc create mode 100644 doc/merge_unicharsets.1.asc create mode 100644 doc/mftraining.1.asc create mode 100644 doc/set_unicharset_properties.1.asc create mode 100644 doc/shapeclustering.1.asc create mode 100644 doc/tesseract.1.asc create mode 100644 doc/tesseract.bib create mode 100644 doc/text2image.1.asc create mode 100644 doc/unicharambigs.5.asc create mode 100644 doc/unicharset.5.asc create mode 100644 doc/unicharset_extractor.1.asc create mode 100644 doc/wordlist2dawg.1.asc create mode 100644 docker-compose.yml create mode 100644 java/Makefile.am create mode 100644 java/Manifest.txt create mode 100644 java/com/Makefile.am create mode 100644 java/com/google/Makefile.am create mode 100644 java/com/google/scrollview/Makefile.am create mode 100644 java/com/google/scrollview/ScrollView.java create mode 100644 java/com/google/scrollview/events/Makefile.am create mode 100644 java/com/google/scrollview/events/SVEvent.java create mode 100644 java/com/google/scrollview/events/SVEventHandler.java create mode 100644 java/com/google/scrollview/events/SVEventType.java create mode 100644 java/com/google/scrollview/ui/Makefile.am create mode 100644 java/com/google/scrollview/ui/SVAbstractMenuItem.java create mode 100644 java/com/google/scrollview/ui/SVCheckboxMenuItem.java create mode 100644 java/com/google/scrollview/ui/SVEmptyMenuItem.java create mode 100644 java/com/google/scrollview/ui/SVImageHandler.java create mode 100644 java/com/google/scrollview/ui/SVMenuBar.java create mode 100644 java/com/google/scrollview/ui/SVMenuItem.java create mode 100644 java/com/google/scrollview/ui/SVPopupMenu.java create mode 100644 java/com/google/scrollview/ui/SVSubMenuItem.java create mode 100644 java/com/google/scrollview/ui/SVWindow.java create mode 100644 langtests/.gitignore create mode 100644 langtests/Makefile.am create mode 100644 langtests/README.md create mode 100755 langtests/counttestset.sh create mode 100644 langtests/deva_setup.sh create mode 100644 langtests/deva_test.sh create mode 100644 langtests/frk_setup.sh create mode 100644 langtests/frk_test.sh create mode 100644 langtests/reports/4_best_Devanagari.summary create mode 100644 langtests/reports/4_best_frk.summary create mode 100644 langtests/reports/4_best_int_Devanagari.summary create mode 100644 langtests/reports/4_best_int_frk.summary create mode 100644 langtests/reports/4_best_int_san.summary create mode 100644 langtests/reports/4_best_san.summary create mode 100644 langtests/reports/4_fast_Devanagari.summary create mode 100644 langtests/reports/4_fast_Fraktur.summary create mode 100644 langtests/reports/4_fast_frk.summary create mode 100644 langtests/reports/4_fast_san.summary create mode 100644 langtests/reports/4_plus10k_san.summary create mode 100644 langtests/reports/4_plus20k_san.summary create mode 100644 langtests/reports/4_plus30k_san.summary create mode 100644 langtests/reports/4_plus40k_san.summary create mode 100755 langtests/runlangtests.sh create mode 100755 langtests/runtestset.sh create mode 100644 m4/ax_check_compile_flag.m4 create mode 100644 m4/ax_split_version.m4 create mode 100644 snap/snapcraft.yaml create mode 100644 src/api/Makefile.am create mode 100644 src/api/apitypes.h create mode 100644 src/api/baseapi.cpp create mode 100644 src/api/baseapi.h create mode 100644 src/api/capi.cpp create mode 100644 src/api/capi.h create mode 100644 src/api/pdfrenderer.cpp create mode 100644 src/api/renderer.cpp create mode 100644 src/api/renderer.h create mode 100644 src/api/tess_version.h.in create mode 100644 src/api/tesseractmain.cpp create mode 100644 src/arch/Makefile.am create mode 100644 src/arch/dotproductavx.cpp create mode 100644 src/arch/dotproductavx.h create mode 100644 src/arch/dotproductsse.cpp create mode 100644 src/arch/dotproductsse.h create mode 100644 src/arch/intsimdmatrix.cpp create mode 100644 src/arch/intsimdmatrix.h create mode 100644 src/arch/intsimdmatrixavx2.cpp create mode 100644 src/arch/intsimdmatrixavx2.h create mode 100644 src/arch/intsimdmatrixsse.cpp create mode 100644 src/arch/intsimdmatrixsse.h create mode 100644 src/arch/simddetect.cpp create mode 100644 src/arch/simddetect.h create mode 100644 src/ccmain/Makefile.am create mode 100644 src/ccmain/adaptions.cpp create mode 100644 src/ccmain/applybox.cpp create mode 100644 src/ccmain/control.cpp create mode 100644 src/ccmain/control.h create mode 100644 src/ccmain/docqual.cpp create mode 100644 src/ccmain/docqual.h create mode 100644 src/ccmain/equationdetect.cpp create mode 100644 src/ccmain/equationdetect.h create mode 100644 src/ccmain/fixspace.cpp create mode 100644 src/ccmain/fixspace.h create mode 100644 src/ccmain/fixxht.cpp create mode 100644 src/ccmain/linerec.cpp create mode 100644 src/ccmain/ltrresultiterator.cpp create mode 100644 src/ccmain/ltrresultiterator.h create mode 100644 src/ccmain/mutableiterator.cpp create mode 100644 src/ccmain/mutableiterator.h create mode 100644 src/ccmain/osdetect.cpp create mode 100644 src/ccmain/osdetect.h create mode 100644 src/ccmain/output.cpp create mode 100644 src/ccmain/output.h create mode 100644 src/ccmain/pageiterator.cpp create mode 100644 src/ccmain/pageiterator.h create mode 100644 src/ccmain/pagesegmain.cpp create mode 100644 src/ccmain/pagewalk.cpp create mode 100644 src/ccmain/par_control.cpp create mode 100644 src/ccmain/paragraphs.cpp create mode 100644 src/ccmain/paragraphs.h create mode 100644 src/ccmain/paragraphs_internal.h create mode 100644 src/ccmain/paramsd.cpp create mode 100644 src/ccmain/paramsd.h create mode 100644 src/ccmain/pgedit.cpp create mode 100644 src/ccmain/pgedit.h create mode 100644 src/ccmain/recogtraining.cpp create mode 100644 src/ccmain/reject.cpp create mode 100644 src/ccmain/reject.h create mode 100644 src/ccmain/resultiterator.cpp create mode 100644 src/ccmain/resultiterator.h create mode 100644 src/ccmain/superscript.cpp create mode 100644 src/ccmain/tessbox.cpp create mode 100644 src/ccmain/tessedit.cpp create mode 100644 src/ccmain/tessedit.h create mode 100644 src/ccmain/tesseractclass.cpp create mode 100644 src/ccmain/tesseractclass.h create mode 100644 src/ccmain/tessvars.cpp create mode 100644 src/ccmain/tessvars.h create mode 100644 src/ccmain/tfacepp.cpp create mode 100644 src/ccmain/thresholder.cpp create mode 100644 src/ccmain/thresholder.h create mode 100644 src/ccmain/werdit.cpp create mode 100644 src/ccmain/werdit.h create mode 100644 src/ccstruct/Makefile.am create mode 100644 src/ccstruct/blamer.cpp create mode 100644 src/ccstruct/blamer.h create mode 100644 src/ccstruct/blobbox.cpp create mode 100644 src/ccstruct/blobbox.h create mode 100644 src/ccstruct/blobs.cpp create mode 100644 src/ccstruct/blobs.h create mode 100644 src/ccstruct/blread.cpp create mode 100644 src/ccstruct/blread.h create mode 100644 src/ccstruct/boxread.cpp create mode 100644 src/ccstruct/boxread.h create mode 100644 src/ccstruct/boxword.cpp create mode 100644 src/ccstruct/boxword.h create mode 100644 src/ccstruct/ccstruct.cpp create mode 100644 src/ccstruct/ccstruct.h create mode 100644 src/ccstruct/coutln.cpp create mode 100644 src/ccstruct/coutln.h create mode 100644 src/ccstruct/crakedge.h create mode 100644 src/ccstruct/debugpixa.h create mode 100644 src/ccstruct/detlinefit.cpp create mode 100644 src/ccstruct/detlinefit.h create mode 100644 src/ccstruct/dppoint.cpp create mode 100644 src/ccstruct/dppoint.h create mode 100644 src/ccstruct/fontinfo.cpp create mode 100644 src/ccstruct/fontinfo.h create mode 100644 src/ccstruct/imagedata.cpp create mode 100644 src/ccstruct/imagedata.h create mode 100644 src/ccstruct/linlsq.cpp create mode 100644 src/ccstruct/linlsq.h create mode 100644 src/ccstruct/matrix.cpp create mode 100644 src/ccstruct/matrix.h create mode 100644 src/ccstruct/mod128.cpp create mode 100644 src/ccstruct/mod128.h create mode 100644 src/ccstruct/normalis.cpp create mode 100644 src/ccstruct/normalis.h create mode 100644 src/ccstruct/ocrblock.cpp create mode 100644 src/ccstruct/ocrblock.h create mode 100644 src/ccstruct/ocrpara.cpp create mode 100644 src/ccstruct/ocrpara.h create mode 100644 src/ccstruct/ocrrow.cpp create mode 100644 src/ccstruct/ocrrow.h create mode 100644 src/ccstruct/otsuthr.cpp create mode 100644 src/ccstruct/otsuthr.h create mode 100644 src/ccstruct/pageres.cpp create mode 100644 src/ccstruct/pageres.h create mode 100644 src/ccstruct/params_training_featdef.cpp create mode 100644 src/ccstruct/params_training_featdef.h create mode 100644 src/ccstruct/pdblock.cpp create mode 100644 src/ccstruct/pdblock.h create mode 100644 src/ccstruct/points.cpp create mode 100644 src/ccstruct/points.h create mode 100644 src/ccstruct/polyaprx.cpp create mode 100644 src/ccstruct/polyaprx.h create mode 100644 src/ccstruct/polyblk.cpp create mode 100644 src/ccstruct/polyblk.h create mode 100644 src/ccstruct/publictypes.cpp create mode 100644 src/ccstruct/publictypes.h create mode 100644 src/ccstruct/quadlsq.cpp create mode 100644 src/ccstruct/quadlsq.h create mode 100644 src/ccstruct/quadratc.h create mode 100644 src/ccstruct/quspline.cpp create mode 100644 src/ccstruct/quspline.h create mode 100644 src/ccstruct/ratngs.cpp create mode 100644 src/ccstruct/ratngs.h create mode 100644 src/ccstruct/rect.cpp create mode 100644 src/ccstruct/rect.h create mode 100644 src/ccstruct/rejctmap.cpp create mode 100644 src/ccstruct/rejctmap.h create mode 100644 src/ccstruct/seam.cpp create mode 100644 src/ccstruct/seam.h create mode 100644 src/ccstruct/split.cpp create mode 100644 src/ccstruct/split.h create mode 100644 src/ccstruct/statistc.cpp create mode 100644 src/ccstruct/statistc.h create mode 100644 src/ccstruct/stepblob.cpp create mode 100644 src/ccstruct/stepblob.h create mode 100644 src/ccstruct/vecfuncs.cpp create mode 100644 src/ccstruct/vecfuncs.h create mode 100644 src/ccstruct/werd.cpp create mode 100644 src/ccstruct/werd.h create mode 100644 src/ccutil/Makefile.am create mode 100644 src/ccutil/ambigs.cpp create mode 100644 src/ccutil/ambigs.h create mode 100644 src/ccutil/basedir.cpp create mode 100644 src/ccutil/basedir.h create mode 100644 src/ccutil/bits16.h create mode 100644 src/ccutil/bitvector.cpp create mode 100644 src/ccutil/bitvector.h create mode 100644 src/ccutil/ccutil.cpp create mode 100644 src/ccutil/ccutil.h create mode 100644 src/ccutil/clst.cpp create mode 100644 src/ccutil/clst.h create mode 100644 src/ccutil/doubleptr.h create mode 100644 src/ccutil/elst.cpp create mode 100644 src/ccutil/elst.h create mode 100644 src/ccutil/elst2.cpp create mode 100644 src/ccutil/elst2.h create mode 100644 src/ccutil/errcode.cpp create mode 100644 src/ccutil/errcode.h create mode 100644 src/ccutil/fileerr.h create mode 100644 src/ccutil/fileio.cpp create mode 100644 src/ccutil/fileio.h create mode 100644 src/ccutil/genericheap.h create mode 100644 src/ccutil/genericvector.h create mode 100644 src/ccutil/globaloc.cpp create mode 100644 src/ccutil/globaloc.h create mode 100644 src/ccutil/helpers.h create mode 100644 src/ccutil/host.h create mode 100644 src/ccutil/indexmapbidi.cpp create mode 100644 src/ccutil/indexmapbidi.h create mode 100644 src/ccutil/kdpair.h create mode 100644 src/ccutil/lsterr.h create mode 100644 src/ccutil/mainblk.cpp create mode 100644 src/ccutil/object_cache.h create mode 100644 src/ccutil/ocrclass.h create mode 100644 src/ccutil/params.cpp create mode 100644 src/ccutil/params.h create mode 100644 src/ccutil/platform.h create mode 100644 src/ccutil/qrsequence.h create mode 100644 src/ccutil/scanutils.cpp create mode 100644 src/ccutil/scanutils.h create mode 100644 src/ccutil/serialis.cpp create mode 100644 src/ccutil/serialis.h create mode 100644 src/ccutil/sorthelper.h create mode 100644 src/ccutil/strngs.cpp create mode 100644 src/ccutil/strngs.h create mode 100644 src/ccutil/tesscallback.h create mode 100644 src/ccutil/tessdatamanager.cpp create mode 100644 src/ccutil/tessdatamanager.h create mode 100644 src/ccutil/tprintf.cpp create mode 100644 src/ccutil/tprintf.h create mode 100644 src/ccutil/unichar.cpp create mode 100644 src/ccutil/unichar.h create mode 100644 src/ccutil/unicharcompress.cpp create mode 100644 src/ccutil/unicharcompress.h create mode 100644 src/ccutil/unicharmap.cpp create mode 100644 src/ccutil/unicharmap.h create mode 100644 src/ccutil/unicharset.cpp create mode 100644 src/ccutil/unicharset.h create mode 100644 src/ccutil/unicity_table.h create mode 100644 src/ccutil/unicodes.cpp create mode 100644 src/ccutil/unicodes.h create mode 100644 src/ccutil/universalambigs.cpp create mode 100644 src/ccutil/universalambigs.h create mode 100644 src/classify/Makefile.am create mode 100644 src/classify/adaptive.cpp create mode 100644 src/classify/adaptive.h create mode 100644 src/classify/adaptmatch.cpp create mode 100644 src/classify/blobclass.cpp create mode 100644 src/classify/blobclass.h create mode 100644 src/classify/classify.cpp create mode 100644 src/classify/classify.h create mode 100644 src/classify/cluster.cpp create mode 100644 src/classify/cluster.h create mode 100644 src/classify/clusttool.cpp create mode 100644 src/classify/clusttool.h create mode 100644 src/classify/cutoffs.cpp create mode 100644 src/classify/cutoffs.h create mode 100644 src/classify/errorcounter.cpp create mode 100644 src/classify/errorcounter.h create mode 100644 src/classify/featdefs.cpp create mode 100644 src/classify/featdefs.h create mode 100644 src/classify/float2int.cpp create mode 100644 src/classify/float2int.h create mode 100644 src/classify/fpoint.cpp create mode 100644 src/classify/fpoint.h create mode 100644 src/classify/intfeaturedist.cpp create mode 100644 src/classify/intfeaturedist.h create mode 100644 src/classify/intfeaturemap.cpp create mode 100644 src/classify/intfeaturemap.h create mode 100644 src/classify/intfeaturespace.cpp create mode 100644 src/classify/intfeaturespace.h create mode 100644 src/classify/intfx.cpp create mode 100644 src/classify/intfx.h create mode 100644 src/classify/intmatcher.cpp create mode 100644 src/classify/intmatcher.h create mode 100644 src/classify/intproto.cpp create mode 100644 src/classify/intproto.h create mode 100644 src/classify/kdtree.cpp create mode 100644 src/classify/kdtree.h create mode 100644 src/classify/mastertrainer.cpp create mode 100644 src/classify/mastertrainer.h create mode 100644 src/classify/mf.cpp create mode 100644 src/classify/mf.h create mode 100644 src/classify/mfdefs.cpp create mode 100644 src/classify/mfdefs.h create mode 100644 src/classify/mfoutline.cpp create mode 100644 src/classify/mfoutline.h create mode 100644 src/classify/mfx.cpp create mode 100644 src/classify/mfx.h create mode 100644 src/classify/normfeat.cpp create mode 100644 src/classify/normfeat.h create mode 100644 src/classify/normmatch.cpp create mode 100644 src/classify/normmatch.h create mode 100644 src/classify/ocrfeatures.cpp create mode 100644 src/classify/ocrfeatures.h create mode 100644 src/classify/outfeat.cpp create mode 100644 src/classify/outfeat.h create mode 100644 src/classify/picofeat.cpp create mode 100644 src/classify/picofeat.h create mode 100644 src/classify/protos.cpp create mode 100644 src/classify/protos.h create mode 100644 src/classify/sampleiterator.cpp create mode 100644 src/classify/sampleiterator.h create mode 100644 src/classify/shapeclassifier.cpp create mode 100644 src/classify/shapeclassifier.h create mode 100644 src/classify/shapetable.cpp create mode 100644 src/classify/shapetable.h create mode 100644 src/classify/tessclassifier.cpp create mode 100644 src/classify/tessclassifier.h create mode 100644 src/classify/trainingsample.cpp create mode 100644 src/classify/trainingsample.h create mode 100644 src/classify/trainingsampleset.cpp create mode 100644 src/classify/trainingsampleset.h create mode 100644 src/cutil/Makefile.am create mode 100644 src/cutil/bitvec.cpp create mode 100644 src/cutil/bitvec.h create mode 100644 src/cutil/callcpp.cpp create mode 100644 src/cutil/callcpp.h create mode 100644 src/cutil/cutil.h create mode 100644 src/cutil/cutil_class.cpp create mode 100644 src/cutil/cutil_class.h create mode 100644 src/cutil/emalloc.cpp create mode 100644 src/cutil/emalloc.h create mode 100644 src/cutil/globals.h create mode 100644 src/cutil/oldlist.cpp create mode 100644 src/cutil/oldlist.h create mode 100644 src/cutil/structures.cpp create mode 100644 src/cutil/structures.h create mode 100644 src/dict/Makefile.am create mode 100644 src/dict/context.cpp create mode 100644 src/dict/dawg.cpp create mode 100644 src/dict/dawg.h create mode 100644 src/dict/dawg_cache.cpp create mode 100644 src/dict/dawg_cache.h create mode 100644 src/dict/dict.cpp create mode 100644 src/dict/dict.h create mode 100644 src/dict/hyphen.cpp create mode 100644 src/dict/matchdefs.h create mode 100644 src/dict/permdawg.cpp create mode 100644 src/dict/stopper.cpp create mode 100644 src/dict/stopper.h create mode 100644 src/dict/trie.cpp create mode 100644 src/dict/trie.h create mode 100644 src/lstm/Makefile.am create mode 100644 src/lstm/convolve.cpp create mode 100644 src/lstm/convolve.h create mode 100644 src/lstm/ctc.cpp create mode 100644 src/lstm/ctc.h create mode 100644 src/lstm/fullyconnected.cpp create mode 100644 src/lstm/fullyconnected.h create mode 100644 src/lstm/functions.cpp create mode 100644 src/lstm/functions.h create mode 100644 src/lstm/input.cpp create mode 100644 src/lstm/input.h create mode 100644 src/lstm/lstm.cpp create mode 100644 src/lstm/lstm.h create mode 100644 src/lstm/lstmrecognizer.cpp create mode 100644 src/lstm/lstmrecognizer.h create mode 100644 src/lstm/lstmtrainer.cpp create mode 100644 src/lstm/lstmtrainer.h create mode 100644 src/lstm/maxpool.cpp create mode 100644 src/lstm/maxpool.h create mode 100644 src/lstm/network.cpp create mode 100644 src/lstm/network.h create mode 100644 src/lstm/networkbuilder.cpp create mode 100644 src/lstm/networkbuilder.h create mode 100644 src/lstm/networkio.cpp create mode 100644 src/lstm/networkio.h create mode 100644 src/lstm/networkscratch.h create mode 100644 src/lstm/parallel.cpp create mode 100644 src/lstm/parallel.h create mode 100644 src/lstm/plumbing.cpp create mode 100644 src/lstm/plumbing.h create mode 100644 src/lstm/recodebeam.cpp create mode 100644 src/lstm/recodebeam.h create mode 100644 src/lstm/reconfig.cpp create mode 100644 src/lstm/reconfig.h create mode 100644 src/lstm/reversed.cpp create mode 100644 src/lstm/reversed.h create mode 100644 src/lstm/series.cpp create mode 100644 src/lstm/series.h create mode 100644 src/lstm/static_shape.h create mode 100644 src/lstm/stridemap.cpp create mode 100644 src/lstm/stridemap.h create mode 100644 src/lstm/tfnetwork.cpp create mode 100644 src/lstm/tfnetwork.h create mode 100644 src/lstm/tfnetwork.proto create mode 100644 src/lstm/weightmatrix.cpp create mode 100644 src/lstm/weightmatrix.h create mode 100644 src/opencl/Makefile.am create mode 100644 src/opencl/oclkernels.h create mode 100644 src/opencl/opencl_device_selection.h create mode 100644 src/opencl/openclwrapper.cpp create mode 100644 src/opencl/openclwrapper.h create mode 100644 src/textord/Makefile.am create mode 100644 src/textord/alignedblob.cpp create mode 100644 src/textord/alignedblob.h create mode 100644 src/textord/baselinedetect.cpp create mode 100644 src/textord/baselinedetect.h create mode 100644 src/textord/bbgrid.cpp create mode 100644 src/textord/bbgrid.h create mode 100644 src/textord/blkocc.cpp create mode 100644 src/textord/blkocc.h create mode 100644 src/textord/blobgrid.cpp create mode 100644 src/textord/blobgrid.h create mode 100644 src/textord/ccnontextdetect.cpp create mode 100644 src/textord/ccnontextdetect.h create mode 100644 src/textord/cjkpitch.cpp create mode 100644 src/textord/cjkpitch.h create mode 100644 src/textord/colfind.cpp create mode 100644 src/textord/colfind.h create mode 100644 src/textord/colpartition.cpp create mode 100644 src/textord/colpartition.h create mode 100644 src/textord/colpartitiongrid.cpp create mode 100644 src/textord/colpartitiongrid.h create mode 100644 src/textord/colpartitionset.cpp create mode 100644 src/textord/colpartitionset.h create mode 100644 src/textord/devanagari_processing.cpp create mode 100644 src/textord/devanagari_processing.h create mode 100644 src/textord/drawedg.cpp create mode 100644 src/textord/drawedg.h create mode 100644 src/textord/drawtord.cpp create mode 100644 src/textord/drawtord.h create mode 100644 src/textord/edgblob.cpp create mode 100644 src/textord/edgblob.h create mode 100644 src/textord/edgloop.cpp create mode 100644 src/textord/edgloop.h create mode 100644 src/textord/equationdetectbase.cpp create mode 100644 src/textord/equationdetectbase.h create mode 100644 src/textord/fpchop.cpp create mode 100644 src/textord/fpchop.h create mode 100644 src/textord/gap_map.cpp create mode 100644 src/textord/gap_map.h create mode 100644 src/textord/imagefind.cpp create mode 100644 src/textord/imagefind.h create mode 100644 src/textord/linefind.cpp create mode 100644 src/textord/linefind.h create mode 100644 src/textord/makerow.cpp create mode 100644 src/textord/makerow.h create mode 100644 src/textord/oldbasel.cpp create mode 100644 src/textord/oldbasel.h create mode 100644 src/textord/pithsync.cpp create mode 100644 src/textord/pithsync.h create mode 100644 src/textord/pitsync1.cpp create mode 100644 src/textord/pitsync1.h create mode 100644 src/textord/scanedg.cpp create mode 100644 src/textord/scanedg.h create mode 100644 src/textord/sortflts.cpp create mode 100644 src/textord/sortflts.h create mode 100644 src/textord/strokewidth.cpp create mode 100644 src/textord/strokewidth.h create mode 100644 src/textord/tabfind.cpp create mode 100644 src/textord/tabfind.h create mode 100644 src/textord/tablefind.cpp create mode 100644 src/textord/tablefind.h create mode 100644 src/textord/tablerecog.cpp create mode 100644 src/textord/tablerecog.h create mode 100644 src/textord/tabvector.cpp create mode 100644 src/textord/tabvector.h create mode 100644 src/textord/textlineprojection.cpp create mode 100644 src/textord/textlineprojection.h create mode 100644 src/textord/textord.cpp create mode 100644 src/textord/textord.h create mode 100644 src/textord/topitch.cpp create mode 100644 src/textord/topitch.h create mode 100644 src/textord/tordmain.cpp create mode 100644 src/textord/tordmain.h create mode 100644 src/textord/tospace.cpp create mode 100644 src/textord/tovars.cpp create mode 100644 src/textord/tovars.h create mode 100644 src/textord/underlin.cpp create mode 100644 src/textord/underlin.h create mode 100644 src/textord/wordseg.cpp create mode 100644 src/textord/wordseg.h create mode 100644 src/textord/workingpartset.cpp create mode 100644 src/textord/workingpartset.h create mode 100644 src/training/CMakeLists.txt create mode 100644 src/training/Makefile.am create mode 100644 src/training/ambiguous_words.cpp create mode 100644 src/training/boxchar.cpp create mode 100644 src/training/boxchar.h create mode 100644 src/training/classifier_tester.cpp create mode 100644 src/training/cntraining.cpp create mode 100644 src/training/combine_lang_model.cpp create mode 100644 src/training/combine_tessdata.cpp create mode 100644 src/training/commandlineflags.cpp create mode 100644 src/training/commandlineflags.h create mode 100644 src/training/commontraining.cpp create mode 100644 src/training/commontraining.h create mode 100644 src/training/dawg2wordlist.cpp create mode 100644 src/training/degradeimage.cpp create mode 100644 src/training/degradeimage.h create mode 100644 src/training/icuerrorcode.cpp create mode 100644 src/training/icuerrorcode.h create mode 100644 src/training/lang_model_helpers.cpp create mode 100644 src/training/lang_model_helpers.h create mode 100755 src/training/language-specific.sh create mode 100644 src/training/ligature_table.cpp create mode 100644 src/training/ligature_table.h create mode 100644 src/training/lstmeval.cpp create mode 100644 src/training/lstmtester.cpp create mode 100644 src/training/lstmtester.h create mode 100644 src/training/lstmtraining.cpp create mode 100644 src/training/merge_unicharsets.cpp create mode 100644 src/training/mergenf.cpp create mode 100644 src/training/mergenf.h create mode 100644 src/training/mftraining.cpp create mode 100644 src/training/normstrngs.cpp create mode 100644 src/training/normstrngs.h create mode 100644 src/training/pango_font_info.cpp create mode 100644 src/training/pango_font_info.h create mode 100644 src/training/set_unicharset_properties.cpp create mode 100644 src/training/shapeclustering.cpp create mode 100644 src/training/stringrenderer.cpp create mode 100644 src/training/stringrenderer.h create mode 100644 src/training/tessopt.cpp create mode 100644 src/training/tessopt.h create mode 100755 src/training/tesstrain.sh create mode 100644 src/training/tesstrain_utils.sh create mode 100644 src/training/text2image.cpp create mode 100644 src/training/tlog.cpp create mode 100644 src/training/tlog.h create mode 100644 src/training/unicharset_extractor.cpp create mode 100644 src/training/unicharset_training_utils.cpp create mode 100644 src/training/unicharset_training_utils.h create mode 100644 src/training/util.h create mode 100644 src/training/validate_grapheme.cpp create mode 100644 src/training/validate_grapheme.h create mode 100644 src/training/validate_indic.cpp create mode 100644 src/training/validate_indic.h create mode 100644 src/training/validate_javanese.cpp create mode 100644 src/training/validate_javanese.h create mode 100644 src/training/validate_khmer.cpp create mode 100644 src/training/validate_khmer.h create mode 100644 src/training/validate_myanmar.cpp create mode 100644 src/training/validate_myanmar.h create mode 100644 src/training/validator.cpp create mode 100644 src/training/validator.h create mode 100644 src/training/wordlist2dawg.cpp create mode 100644 src/viewer/Makefile.am create mode 100644 src/viewer/scrollview.cpp create mode 100644 src/viewer/scrollview.h create mode 100644 src/viewer/svmnode.cpp create mode 100644 src/viewer/svmnode.h create mode 100644 src/viewer/svpaint.cpp create mode 100644 src/viewer/svutil.cpp create mode 100644 src/viewer/svutil.h create mode 100644 src/vs2010/port/gettimeofday.cpp create mode 100644 src/vs2010/port/gettimeofday.h create mode 100644 src/vs2010/tesseract/libtesseract.rc.in create mode 100644 src/vs2010/tesseract/resource.h create mode 100644 src/vs2010/tesseract/tesseract.rc.in create mode 100644 src/wordrec/Makefile.am create mode 100644 src/wordrec/associate.cpp create mode 100644 src/wordrec/associate.h create mode 100644 src/wordrec/chop.cpp create mode 100644 src/wordrec/chop.h create mode 100644 src/wordrec/chopper.cpp create mode 100644 src/wordrec/chopper.h create mode 100644 src/wordrec/drawfx.cpp create mode 100644 src/wordrec/drawfx.h create mode 100644 src/wordrec/findseam.cpp create mode 100644 src/wordrec/findseam.h create mode 100644 src/wordrec/gradechop.cpp create mode 100644 src/wordrec/language_model.cpp create mode 100644 src/wordrec/language_model.h create mode 100644 src/wordrec/lm_consistency.cpp create mode 100644 src/wordrec/lm_consistency.h create mode 100644 src/wordrec/lm_pain_points.cpp create mode 100644 src/wordrec/lm_pain_points.h create mode 100644 src/wordrec/lm_state.cpp create mode 100644 src/wordrec/lm_state.h create mode 100644 src/wordrec/measure.h create mode 100644 src/wordrec/outlines.cpp create mode 100644 src/wordrec/outlines.h create mode 100644 src/wordrec/params_model.cpp create mode 100644 src/wordrec/params_model.h create mode 100644 src/wordrec/pieces.cpp create mode 100644 src/wordrec/plotedges.cpp create mode 100644 src/wordrec/plotedges.h create mode 100644 src/wordrec/render.cpp create mode 100644 src/wordrec/render.h create mode 100644 src/wordrec/segsearch.cpp create mode 100644 src/wordrec/tface.cpp create mode 100644 src/wordrec/wordclass.cpp create mode 100644 src/wordrec/wordrec.cpp create mode 100644 src/wordrec/wordrec.h create mode 100644 tessdata/Makefile.am create mode 100644 tessdata/configs/Makefile.am create mode 100644 tessdata/configs/ambigs.train create mode 100644 tessdata/configs/api_config create mode 100644 tessdata/configs/bazaar create mode 100644 tessdata/configs/bigram create mode 100644 tessdata/configs/box.train create mode 100644 tessdata/configs/box.train.stderr create mode 100644 tessdata/configs/digits create mode 100644 tessdata/configs/get.image create mode 100644 tessdata/configs/hocr create mode 100644 tessdata/configs/inter create mode 100644 tessdata/configs/kannada create mode 100644 tessdata/configs/linebox create mode 100644 tessdata/configs/logfile create mode 100644 tessdata/configs/lstm.train create mode 100644 tessdata/configs/lstmdebug create mode 100644 tessdata/configs/makebox create mode 100644 tessdata/configs/pdf create mode 100644 tessdata/configs/quiet create mode 100644 tessdata/configs/rebox create mode 100644 tessdata/configs/strokewidth create mode 100644 tessdata/configs/tsv create mode 100644 tessdata/configs/txt create mode 100644 tessdata/configs/unlv create mode 100644 tessdata/eng.user-patterns create mode 100644 tessdata/eng.user-words create mode 100644 tessdata/pdf.ttf create mode 100644 tessdata/tessconfigs/Makefile.am create mode 100644 tessdata/tessconfigs/batch create mode 100644 tessdata/tessconfigs/batch.nochop create mode 100644 tessdata/tessconfigs/matdemo create mode 100644 tessdata/tessconfigs/msdemo create mode 100644 tessdata/tessconfigs/nobatch create mode 100644 tessdata/tessconfigs/segdemo create mode 100644 tesseract.pc.cmake create mode 100644 tesseract.pc.in create mode 100644 test/.gitignore create mode 100644 test/LICENSE create mode 100644 test/README.md create mode 100644 test/testdata/README.md create mode 100644 test/testdata/chi_sim.unicharset create mode 100644 test/testdata/chi_tra.unicharset create mode 100644 test/testdata/eng.unicharset create mode 100644 test/testdata/jpn.unicharset create mode 100644 test/testdata/kan.unicharset create mode 100644 test/testdata/kor.unicharset create mode 100644 test/testdata/mar.unicharset create mode 100644 test/testdata/por.unicharset create mode 100644 test/testdata/trivial.unicharset create mode 100644 test/testing/12.tif create mode 100644 test/testing/136.tif create mode 100644 test/testing/256.tif create mode 100644 test/testing/324.tif create mode 100644 test/testing/410.tif create mode 100644 test/testing/432.tif create mode 100644 test/testing/433.tif create mode 100644 test/testing/540.tif create mode 100644 test/testing/692.tif create mode 100644 test/testing/779.tif create mode 100644 test/testing/793.tif create mode 100644 test/testing/808.tif create mode 100644 test/testing/815.tif create mode 100644 test/testing/FILES create mode 100644 test/testing/HelloGoogle.tif create mode 100644 test/testing/README.md create mode 100644 test/testing/arabic.tif create mode 100644 test/testing/deslant.tif create mode 100644 test/testing/devatest-rotated-270.png create mode 100644 test/testing/devatest.png create mode 100644 test/testing/eng_beam.unicharset create mode 100644 test/testing/eurotext.tif create mode 100644 test/testing/eurotext.txt create mode 100644 test/testing/hebrew-nikud-genesis-1-2.png create mode 100644 test/testing/hebrew.png create mode 100644 test/testing/hebtypo.jpg create mode 100644 test/testing/phototest-rotated-180.png create mode 100644 test/testing/phototest-rotated-L.png create mode 100644 test/testing/phototest-rotated-R.png create mode 100644 test/testing/phototest.gold.txt create mode 100644 test/testing/phototest.tif create mode 100644 test/testing/phototest.txt create mode 100644 test/testing/phototest_2.tif create mode 100644 test/testing/phototestrot.tif create mode 100644 test/testing/raaj.tif create mode 100644 test/testing/trainingital.box create mode 100644 test/testing/trainingital.tif create mode 100644 test/testing/trainingitalline.box create mode 100644 test/testing/trainingitalline.tif create mode 100644 test/testing/trainingtimes.box create mode 100644 test/testing/trainingtimes.tif create mode 100644 test/testing/trainingtimesline.box create mode 100644 test/testing/trainingtimesline.tif create mode 100644 test/testing/viet.tif create mode 100644 tests/tesseracttests.cpp create mode 100644 unittest/Makefile.am create mode 100644 unittest/README.md create mode 100644 unittest/apiexample_test.cc create mode 100644 unittest/applybox_test.cc create mode 100644 unittest/baseapi_test.cc create mode 100644 unittest/baseapi_thread_test.cc create mode 100644 unittest/bitvector_test.cc create mode 100644 unittest/cleanapi_test.cc create mode 100644 unittest/colpartition_test.cc create mode 100644 unittest/commandlineflags_test.cc create mode 100644 unittest/cycletimer.h create mode 100644 unittest/dawg_test.cc create mode 100644 unittest/denorm_test.cc create mode 100644 unittest/equationdetect_test.cc create mode 100644 unittest/fileio_test.cc create mode 100644 unittest/heap_test.cc create mode 100644 unittest/imagedata_test.cc create mode 100644 unittest/include_gunit.h create mode 100644 unittest/indexmapbidi_test.cc create mode 100644 unittest/intfeaturemap_test.cc create mode 100644 unittest/intsimdmatrix_test.cc create mode 100644 unittest/lang_model_test.cc create mode 100644 unittest/layout_test.cc create mode 100644 unittest/ligature_table_test.cc create mode 100644 unittest/linlsq_test.cc create mode 100644 unittest/loadlang_test.cc create mode 100644 unittest/log.h create mode 100644 unittest/lstm_recode_test.cc create mode 100644 unittest/lstm_squashed_test.cc create mode 100644 unittest/lstm_test.cc create mode 100644 unittest/lstm_test.h create mode 100644 unittest/lstmtrainer_test.cc create mode 100644 unittest/mastertrainer_test.cc create mode 100644 unittest/matrix_test.cc create mode 100644 unittest/networkio_test.cc create mode 100644 unittest/normstrngs_test.cc create mode 100644 unittest/normstrngs_test.h create mode 100644 unittest/nthitem_test.cc create mode 100644 unittest/osd_test.cc create mode 100644 unittest/pagesegmode_test.cc create mode 100644 unittest/pango_font_info_test.cc create mode 100644 unittest/paragraphs_test.cc create mode 100644 unittest/params_model_test.cc create mode 100644 unittest/progress_test.cc create mode 100644 unittest/qrsequence_test.cc create mode 100644 unittest/recodebeam_test.cc create mode 100644 unittest/rect_test.cc create mode 100644 unittest/resultiterator_test.cc create mode 100644 unittest/scanutils_test.cc create mode 100644 unittest/shapetable_test.cc create mode 100644 unittest/stats_test.cc create mode 100644 unittest/stridemap_test.cc create mode 100644 unittest/stringrenderer_test.cc create mode 100644 unittest/tablefind_test.cc create mode 100644 unittest/tablerecog_test.cc create mode 100644 unittest/tabvector_test.cc create mode 100644 unittest/tatweel_test.cc create mode 100644 unittest/textlineprojection_test.cc create mode 100644 unittest/tfile_test.cc create mode 100644 unittest/unichar_test.cc create mode 100644 unittest/unicharcompress_test.cc create mode 100644 unittest/unicharset_test.cc create mode 100644 unittest/validate_grapheme_test.cc create mode 100644 unittest/validate_indic_test.cc create mode 100644 unittest/validate_khmer_test.cc create mode 100644 unittest/validate_myanmar_test.cc create mode 100644 unittest/validator_test.cc create mode 100644 unlvtests/Makefile.am create mode 100644 unlvtests/README.md create mode 100755 unlvtests/counttestset.sh create mode 100755 unlvtests/reorgdata.sh create mode 100644 unlvtests/reports/1995.bus.3B.sum create mode 100644 unlvtests/reports/1995.doe3.3B.sum create mode 100644 unlvtests/reports/1995.mag.3B.sum create mode 100644 unlvtests/reports/1995.news.3B.sum create mode 100644 unlvtests/reports/2.03.summary create mode 100644 unlvtests/reports/2.04.summary create mode 100644 unlvtests/reports/4_best_int_spa.summary create mode 100644 unlvtests/reports/4_best_spa.summary create mode 100644 unlvtests/reports/4_fast_eng.summary create mode 100644 unlvtests/reports/4_fast_spa.summary create mode 100755 unlvtests/runalltests.sh create mode 100755 unlvtests/runalltests_spa.sh create mode 100755 unlvtests/runtestset.sh diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..c311a1d --- /dev/null +++ b/.clang-format @@ -0,0 +1,5 @@ +--- +BasedOnStyle: Google +# Enforce always the same pointer alignment. +DerivePointerAlignment: false +IndentPPDirectives: AfterHash diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..ecc0b18 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,23 @@ +Before you submit an issue, please review [the guidelines for this repository](https://github.com/tesseract-ocr/tesseract/blob/master/CONTRIBUTING.md). + +Please report an issue only for a BUG, not for asking questions. + +Note that it will be much easier for us to fix the issue if a test case that +reproduces the problem is provided. Ideally this test case should not have any +external dependencies. Provide a copy of the image or link to files for the test case. + +Please delete this text and fill in the template below. + +------------------------ + +### Environment + +* **Tesseract Version**: +* **Commit Number**: +* **Platform**: + +### Current Behavior: + +### Expected Behavior: + +### Suggested Fix: diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4622249 --- /dev/null +++ b/.gitignore @@ -0,0 +1,117 @@ +*~ +# Windows +*.user +*.log +*.tlog +*.cache +*.obj +*.sdf +*.opensdf +*.lastbuildstate +*.unsuccessfulbuild +*.suo +*.res +*.ipch +*.manifest + +# Linux +# ignore local configuration +config.* +config/* +Makefile +Makefile.in +*.m4 + +# ignore help scripts/files +configure +libtool +stamp-h1 +tesseract.pc +config_auto.h +/doc/html/* +/doc/*.1 +/doc/*.5 +/doc/*.html +/doc/*.xml + +# generated version file +/src/api/tess_version.h + +# executables +/src/api/tesseract +/src/training/ambiguous_words +/src/training/classifier_tester +/src/training/cntraining +/src/training/combine_tessdata +/src/training/dawg2wordlist +/src/training/merge_unicharsets +/src/training/mftraining +/src/training/set_unicharset_properties +/src/training/shapeclustering +/src/training/text2image +/src/training/unicharset_extractor +/src/training/wordlist2dawg + +*.patch + +# files generated by libtool +/src/training/combine_lang_model +/src/training/lstmeval +/src/training/lstmtraining + +# ignore compilation files +build/* +/bin +*/.deps/* +*/.libs/* +*/*/.deps/* +*/*/.libs/* +*.lo +*.la +*.o +*.Plo +*.a +*.class +*.jar + +# tessdata +*.traineddata + +# OpenCL +tesseract_opencl_profile_devices.dat +kernel*.bin + +# build dirs +/build* +/.cppan +/cppan +/*.dll +/*.lib +/*.exe +/*.lnk +/win* +.vs* +.s* + +# files generated by "make check" +/tests/.dirstamp +/unittest/*.trs + +# test programs +/unittest/*_test +/unittest/primesbitvector +/unittest/primesmap +/unittest/tesseracttests + +# generated files from unlvtests +times.txt +/unlvtests/results* + +# snap packaging specific rules +/parts/ +/stage/ +/prime/ +/snap/.snapcraft/ + +/*.snap +/*_source.tar.bz2 diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..9a01451 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,9 @@ +[submodule "abseil"] + path = abseil + url = https://github.com/abseil/abseil-cpp.git +[submodule "googletest"] + path = googletest + url = https://github.com/google/googletest.git +[submodule "test"] + path = test + url = https://github.com/tesseract-ocr/test diff --git a/.lgtm.yml b/.lgtm.yml new file mode 100644 index 0000000..450dcc6 --- /dev/null +++ b/.lgtm.yml @@ -0,0 +1,15 @@ +extraction: + cpp: + prepare: + packages: + - libpango1.0-dev + configure: + command: + - ./autogen.sh + - mkdir _lgtm_build_dir + - cd _lgtm_build_dir + - ../configure + index: + build_command: + - cd _lgtm_build_dir + - make training diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..26a2dad --- /dev/null +++ b/.travis.yml @@ -0,0 +1,55 @@ +# Travis CI configuration for Tesseract + +language: cpp + +dist: trusty + +env: + - LEPT_VER=1.74.2 + +notifications: + email: false + +sudo: false + +os: + - linux + #- osx + +addons: + apt: + sources: + #- ubuntu-toolchain-r-test + packages: + #- g++-6 + +#matrix: + #include: + #- os: osx + #install: + #script: brew install tesseract --HEAD + #cache: + #directories: + #- $HOME/Library/Caches/Homebrew + #allow_failures: + #- script: brew install tesseract --HEAD + +cache: + directories: + - leptonica-$LEPT_VER + +before_install: + - if [[ $TRAVIS_OS_NAME == linux ]]; then LINUX=true; fi + - if [[ $TRAVIS_OS_NAME == osx ]]; then OSX=true; fi + +install: + #- if [[ $LINUX && "$CXX" = "g++" ]]; then export CXX="g++-6" CC="gcc-6"; fi + - if test ! -d leptonica-$LEPT_VER/src; then curl -Ls https://github.com/DanBloomberg/leptonica/archive/$LEPT_VER.tar.gz | tar -xz; fi + - if test ! -d leptonica-$LEPT_VER/usr; then cmake -Hleptonica-$LEPT_VER -Bleptonica-$LEPT_VER/build -DCMAKE_INSTALL_PREFIX=leptonica-$LEPT_VER/usr; fi + - if test ! -e leptonica-$LEPT_VER/usr/lib/libleptonica.so; then make -C leptonica-$LEPT_VER/build install; fi + +script: + - mkdir build + - cd build + - cmake .. -DLeptonica_DIR=leptonica-$LEPT_VER/build + - make diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..633bf02 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,44 @@ +Ray Smith (lead developer) +Ahmad Abdulkader +Rika Antonova +Nicholas Beato +Jeff Breidenbach +Samuel Charron +Phil Cheatle +Simon Crouch +David Eger +Sheelagh Huddleston +Dan Johnson +Rajesh Katikam +Thomas Kielbus +Dar-Shyang Lee +Zongyi (Joe) Liu +Robert Moss +Chris Newton +Michael Reimer +Marius Renn +Raquel Romano +Christy Russon +Shobhit Saxena +Mark Seaman +Faisal Shafait +Hiroshi Takenaka +Ranjith Unnikrishnan +Joern Wanke +Ping Ping Xiu +Andrew Ziem +Oscar Zuniga + +Community Contributors: +Zdenko Podobný (Maintainer) +Jim Regan (Maintainer) +James R Barlow +Amit Dovev +Martin Ettl +Shree Devi Kumar +Noah Metzger +Tom Morris +Tobias Müller +Egor Pugin +Sundar M. Vaidya +Stefan Weil diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..a5a1c88 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,401 @@ +# +# tesseract +# + +############################################################################### +# +# cmake settings +# +############################################################################### + +cmake_minimum_required(VERSION 2.8.11) + +# In-source builds are disabled. +if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) + message(FATAL_ERROR + "CMake generation is not possible within the source directory!" + "\n Remove the CMakeCache.txt file and try again from another folder, e.g.:" + "\n " + "\n rm CMakeCache.txt" + "\n mkdir build" + "\n cd build" + "\n cmake .." + ) +endif() + +set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_SOURCE_DIR}/cmake") + +set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin") +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${EXECUTABLE_OUTPUT_PATH}") + +# Use solution folders. +set_property(GLOBAL PROPERTY USE_FOLDERS ON) +set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "CMake Targets") + +############################################################################### +# +# project settings +# +############################################################################### + +project(tesseract C CXX) + +# Get version with components from VERSION file. +file(STRINGS "VERSION" VERSION_PLAIN) +string(REGEX REPLACE "^([^.]*)\\..*" "\\1" VERSION_MAJOR ${VERSION_PLAIN}) +string(REGEX REPLACE "^[^.]*\\.([^.]*)\\..*" "\\1" VERSION_MINOR ${VERSION_PLAIN}) +string(REGEX REPLACE "^[^.]*\\.[^.]*\\.([0-9]*).*" "\\1" VERSION_PATCH ${VERSION_PLAIN}) + +# Provide also same macro names as autoconf (see configure.ac). +set(GENERIC_MAJOR_VERSION ${VERSION_MAJOR}) +set(GENERIC_MINOR_VERSION ${VERSION_MINOR}) +set(GENERIC_MICRO_VERSION ${VERSION_PATCH}) + +set(MINIMUM_LEPTONICA_VERSION 1.74) + +############################################################################### +# +# compiler and linker +# +############################################################################### + +set(LIBRARY_TYPE SHARED) +if (STATIC) + set(LIBRARY_TYPE) +endif() + +if (WIN32) + if (MSVC) + add_definitions(-D_CRT_SECURE_NO_WARNINGS) + add_definitions(-DNOMINMAX) + + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /openmp /utf-8") + endif() + + set(LIB_Ws2_32 Ws2_32) +endif() + +if (CYGWIN) + add_definitions(-D__CYGWIN__) +endif() + +if (UNIX) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11") + + set(LIB_pthread pthread) +endif() + +############################################################################### +# +# packages +# +############################################################################### + +if(NOT EXISTS ${PROJECT_SOURCE_DIR}/.cppan) + if (NOT Leptonica_DIR AND NOT MSVC) + find_package(PkgConfig REQUIRED) + pkg_check_modules(Leptonica REQUIRED lept>=${MINIMUM_LEPTONICA_VERSION}) + link_directories(${Leptonica_LIBRARY_DIRS}) + else() + find_package(Leptonica ${MINIMUM_LEPTONICA_VERSION} REQUIRED CONFIG) + endif() +else() + if (STATIC) + set(CPPAN_BUILD_SHARED_LIBS 0) + else() + set(CPPAN_BUILD_SHARED_LIBS 1) + endif() + add_subdirectory(.cppan) +endif() + +find_package(OpenCL QUIET) + +option(BUILD_TRAINING_TOOLS "Build training tools" ON) +option(BUILD_TESTS "Build tests" OFF) + +############################################################################### +# +# configure +# +############################################################################### + +set(AUTOCONFIG_SRC ${CMAKE_BINARY_DIR}/config_auto.h.in) +set(AUTOCONFIG ${CMAKE_BINARY_DIR}/config_auto.h) + +include(Configure) + +configure_file(${AUTOCONFIG_SRC} ${AUTOCONFIG} @ONLY) + +set(INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include" "${CMAKE_INSTALL_PREFIX}/include/tesseract") + +configure_file( + ${CMAKE_SOURCE_DIR}/src/api/tess_version.h.in + ${CMAKE_BINARY_DIR}/api/tess_version.h @ONLY) +configure_file( + ${CMAKE_SOURCE_DIR}/src/vs2010/tesseract/tesseract.rc.in + ${CMAKE_BINARY_DIR}/vs2010/tesseract/tesseract.rc @ONLY) +configure_file( + ${CMAKE_SOURCE_DIR}/src/vs2010/tesseract/libtesseract.rc.in + ${CMAKE_BINARY_DIR}/vs2010/tesseract/libtesseract.rc @ONLY) +configure_file( + ${CMAKE_SOURCE_DIR}/cmake/templates/TesseractConfig-version.cmake.in + ${CMAKE_BINARY_DIR}/TesseractConfig-version.cmake @ONLY) +configure_file( + ${CMAKE_SOURCE_DIR}/cmake/templates/TesseractConfig.cmake.in + ${CMAKE_BINARY_DIR}/TesseractConfig.cmake @ONLY) + +############################################################################### +# +# build +# +############################################################################### + +include(BuildFunctions) +include(SourceGroups) + +add_definitions(-DHAVE_CONFIG_H) +add_definitions(-D_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS=1) +add_definitions(-DWINDLLNAME="libtesseract${VERSION_MAJOR}${VERSION_MINOR}.dll") + +include_directories(${Leptonica_INCLUDE_DIRS}) + +include_directories(${CMAKE_BINARY_DIR}) + +include_directories(src/api) +include_directories(${CMAKE_BINARY_DIR}/api) +include_directories(src/arch) +include_directories(src/ccmain) +include_directories(src/ccstruct) +include_directories(src/ccutil) +include_directories(src/classify) +include_directories(src/cutil) +include_directories(src/dict) +include_directories(src/lstm) +include_directories(src/opencl) +include_directories(src/textord) +include_directories(src/vs2010/port) +include_directories(src/viewer) +include_directories(src/wordrec) + +######################################## +# LIBRARY tesseract +######################################## + +file(GLOB tesseract_src + src/arch/*.cpp + src/ccmain/*.cpp + src/ccstruct/*.cpp + src/ccutil/*.cpp + src/classify/*.cpp + src/cutil/*.cpp + src/dict/*.cpp + src/lstm/*.cpp + src/opencl/*.cpp + src/textord/*.cpp + src/viewer/*.cpp + src/wordrec/*.cpp +) +file(GLOB tesseract_hdr + src/api/*.h + src/arch/*.h + src/ccmain/*.h + src/ccstruct/*.h + src/ccutil/*.h + src/classify/*.h + src/cutil/*.h + src/dict/*.h + src/lstm/*.h + src/opencl/*.h + src/textord/*.h + src/viewer/*.h + src/wordrec/*.h +) +if (WIN32) + file(GLOB tesseract_win32_src "src/vs2010/port/*.cpp") + file(GLOB tesseract_win32_hdr "src/vs2010/port/*.h") + set(tesseract_src ${tesseract_src} ${tesseract_win32_src}) + set(tesseract_hdr ${tesseract_hdr} ${tesseract_win32_hdr}) +endif() + +set(tesseract_src ${tesseract_src} + src/api/baseapi.cpp + src/api/capi.cpp + src/api/renderer.cpp + src/api/pdfrenderer.cpp +) + +if (WIN32) + if (MSVC) + include_directories(src/vs2010/tesseract) + set(tesseract_hdr + ${tesseract_hdr} + ${CMAKE_CURRENT_SOURCE_DIR}/src/vs2010/tesseract/resource.h) + set(tesseract_rsc ${CMAKE_BINARY_DIR}/vs2010/tesseract/libtesseract.rc) + set_source_files_properties( + ${CMAKE_CURRENT_SOURCE_DIR}/src/arch/dotproductsse.cpp + PROPERTIES COMPILE_DEFINITIONS __SSE4_1__) + set_source_files_properties( + ${CMAKE_CURRENT_SOURCE_DIR}/src/arch/intsimdmatrixsse.cpp + PROPERTIES COMPILE_DEFINITIONS __SSE4_1__) + set_source_files_properties( + ${CMAKE_CURRENT_SOURCE_DIR}/src/arch/dotproductavx.cpp + PROPERTIES COMPILE_FLAGS "/arch:AVX") + set_source_files_properties( + ${CMAKE_CURRENT_SOURCE_DIR}/src/arch/intsimdmatrixavx2.cpp + PROPERTIES COMPILE_FLAGS "/arch:AVX2") + endif() +else() + set_source_files_properties( + ${CMAKE_CURRENT_SOURCE_DIR}/src/arch/dotproductsse.cpp + PROPERTIES COMPILE_FLAGS "-msse4.1") + set_source_files_properties( + ${CMAKE_CURRENT_SOURCE_DIR}/src/arch/intsimdmatrixsse.cpp + PROPERTIES COMPILE_FLAGS "-msse4.1") + set_source_files_properties( + ${CMAKE_CURRENT_SOURCE_DIR}/src/arch/dotproductavx.cpp + PROPERTIES COMPILE_FLAGS "-mavx") + set_source_files_properties( + ${CMAKE_CURRENT_SOURCE_DIR}/src/arch/intsimdmatrixavx2.cpp + PROPERTIES COMPILE_FLAGS "-mavx2") +endif() + +add_library (libtesseract ${LIBRARY_TYPE} ${tesseract_src} ${tesseract_hdr} + ${tesseract_rsc} + ) +if (NOT STATIC) +target_compile_definitions (libtesseract + PRIVATE -DTESS_EXPORTS + INTERFACE -DTESS_IMPORTS +) +set_target_properties (libtesseract PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS True) +endif() +target_link_libraries (libtesseract ${LIB_Ws2_32} ${LIB_pthread}) +set_target_properties (libtesseract PROPERTIES VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) +set_target_properties (libtesseract PROPERTIES SOVERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) +if (WIN32) +set_target_properties (libtesseract PROPERTIES OUTPUT_NAME tesseract${VERSION_MAJOR}${VERSION_MINOR}) +set_target_properties (libtesseract PROPERTIES DEBUG_OUTPUT_NAME tesseract${VERSION_MAJOR}${VERSION_MINOR}d) +else() +set_target_properties (libtesseract PROPERTIES OUTPUT_NAME tesseract) +endif() + +if (NOT CPPAN_BUILD) + target_link_libraries (libtesseract ${Leptonica_LIBRARIES}) + export(TARGETS libtesseract FILE ${CMAKE_BINARY_DIR}/TesseractTargets.cmake) +else() + target_link_libraries (libtesseract pvt.cppan.demo.danbloomberg.leptonica) + file(WRITE ${CMAKE_BINARY_DIR}/TesseractTargets.cmake "include(${CMAKE_BINARY_DIR}/cppan.cmake)\n") + export(TARGETS libtesseract APPEND FILE ${CMAKE_BINARY_DIR}/TesseractTargets.cmake) +endif() + +######################################## +# EXECUTABLE tesseractmain +######################################## + +set(tesseractmain_src src/api/tesseractmain.cpp) +if (MSVC) + set(tesseractmain_rsc ${CMAKE_BINARY_DIR}/vs2010/tesseract/tesseract.rc) +endif() + +add_executable (tesseract ${tesseractmain_src} ${tesseractmain_rsc}) +target_link_libraries (tesseract libtesseract) + +######################################## + +if (BUILD_TESTS AND EXISTS ${PROJECT_SOURCE_DIR}/googletest/CMakeLists.txt) + add_subdirectory(googletest) + add_executable(tesseract_tests tests/tesseracttests.cpp) + target_link_libraries(tesseract_tests gtest_main) +endif() + +if (BUILD_TRAINING_TOOLS) +add_subdirectory(src/training) +endif() + +get_target_property(tesseract_NAME libtesseract NAME) +get_target_property(tesseract_VERSION libtesseract VERSION) +get_target_property(tesseract_OUTPUT_NAME libtesseract OUTPUT_NAME) +configure_file(tesseract.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/tesseract.pc @ONLY) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/tesseract.pc DESTINATION lib/pkgconfig) +install(TARGETS tesseract RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) +install(TARGETS libtesseract EXPORT TesseractTargets RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) +install(EXPORT TesseractTargets DESTINATION cmake) +install(FILES + ${CMAKE_BINARY_DIR}/TesseractConfig.cmake + ${CMAKE_BINARY_DIR}/TesseractConfig-version.cmake + DESTINATION cmake) + +install(FILES + # from api/makefile.am + src/api/apitypes.h + src/api/baseapi.h + src/api/capi.h + src/api/renderer.h + ${CMAKE_CURRENT_BINARY_DIR}/api/tess_version.h + + #from arch/makefile.am + src/arch/dotproductavx.h + src/arch/dotproductsse.h + src/arch/intsimdmatrix.h + src/arch/intsimdmatrixavx2.h + src/arch/intsimdmatrixsse.h + src/arch/simddetect.h + + #from ccmain/makefile.am + src/ccmain/thresholder.h + src/ccmain/ltrresultiterator.h + src/ccmain/pageiterator.h + src/ccmain/resultiterator.h + src/ccmain/osdetect.h + + #from ccstruct/makefile.am + src/ccstruct/publictypes.h + + #from ccutil/makefile.am + src/ccutil/basedir.h + src/ccutil/errcode.h + src/ccutil/fileerr.h + src/ccutil/genericvector.h + src/ccutil/helpers.h + src/ccutil/host.h + src/ccutil/params.h + src/ccutil/ocrclass.h + src/ccutil/platform.h + src/ccutil/serialis.h + src/ccutil/strngs.h + src/ccutil/tesscallback.h + src/ccutil/unichar.h + src/ccutil/unicharcompress.h + src/ccutil/unicharmap.h + src/ccutil/unicharset.h + + #from lstm/makefile.am + src/lstm/convolve.h + src/lstm/ctc.h + src/lstm/fullyconnected.h + src/lstm/functions.h + src/lstm/input.h + src/lstm/lstm.h + src/lstm/lstmrecognizer.h + src/lstm/lstmtrainer.h + src/lstm/maxpool.h + src/lstm/networkbuilder.h + src/lstm/network.h + src/lstm/networkio.h + src/lstm/networkscratch.h + src/lstm/parallel.h + src/lstm/plumbing.h + src/lstm/recodebeam.h + src/lstm/reconfig.h + src/lstm/reversed.h + src/lstm/series.h + src/lstm/static_shape.h + src/lstm/stridemap.h + src/lstm/tfnetwork.h + src/lstm/weightmatrix.h + + #${CMAKE_BINARY_DIR}/src/endianness.h + DESTINATION include/tesseract) + + +############################################################################### diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..d5e0c51 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,70 @@ +# Contributing + +**Please follow these rules and advice**. + +## Creating an Issue or Using the Forum + +If you think you found a bug in Tesseract, please create an issue. + +Use the [users mailing-list](https://groups.google.com/d/forum/tesseract-ocr) instead of creating an Issue if ... +* You have problems using Tesseract and need some help. +* You have problems installing the software. +* You are not satisfied with the accuracy of the OCR, and want to ask how you can improve it. Note: You should first read the [ImproveQuality](https://github.com/tesseract-ocr/tesseract/wiki/ImproveQuality) wiki page. +* You are trying to train Tesseract and you have a problem and/or want to ask a question about the training process. Note: You should first read the **official** guides [[1]](https://github.com/tesseract-ocr/tesseract/wiki) or [[2]](https://github.com/tesseract-ocr/tesseract/wiki/TrainingTesseract) found in the project wiki. +* You have a general question. + +An issue should only be reported if the platform you are using is one of these: + * Linux (but not a version that is more than 4 years old) + * Windows (Windows 7 or newer version) + * macOS (last 3 releases) + +For older versions or other operating systems, use the Tesseract forum. + +When creating an issue, please report your operating system, including its specific version: "Ubuntu 16.04", "Windows 10", "Mac OS X 10.11" etc. + +Search through open and closed issues to see if similar issue has been reported already (and sometimes also has been solved). + +Similarly, before you post your question in the forum, search through past threads to see if similar question has been asked already. + +Read the [wiki](https://github.com/tesseract-ocr/tesseract/wiki) before you report your issue or ask a question in the forum. + +Only report an issue in the latest official release. Optionally, try to check if the issue is not already solved in the latest snapshot in the git repository. + +Make sure you are able to replicate the problem with Tesseract command line program. For external programs that use Tesseract (including wrappers and your own program, if you are developer), report the issue to the developers of that software if it's possible. You can also try to find help in the Tesseract forum. + +Each version of Tesseract has its own language data you need to obtain. You **must** obtain and install trained data for English (eng) and osd. Verify that Tesseract knows about these two files (and other trained data you installed) with this command: +`tesseract --list-langs`. + +Post example files to demonstrate the problem. +BUT don't post files with private info (about yourself or others). + +When attaching a file to the issue report / forum ... + * Do not post a file larger than 20 MB. + * GitHub supports only few file name extensions like `.png` or `.txt`. If GitHub rejects your files, you can compress them using a program that can produce a zip archive and then load this zip file to GitHub. + +Do not attach programs or libraries to your issues/posts. + +For large files or for programs, add a link to a location where they can be downloaded (your site, Git repo, Google Drive, Dropbox etc.) + +Attaching a multi-page TIFF image is useful only if you have problem with multi-page functionality, otherwise attach only one or a few single page images. + +Copy the error message from the console instead of sending a screenshot of it. + +Use the toolbar above the comment edit area to format your comment. + +Add three backticks before and after a code sample or output of a command to format it (The `Insert code` button can help you doing it). + +If your comment includes a code sample or output of a command that exceeds ~25 lines, post it as attached text file (`filename.txt`). + +Use `Preview` before you send your issue. Read it again before sending. + +Note that most of the people that respond to issues and answer questions are either other 'regular' users or **volunteers** developers. Please be nice to them :-) + +The [tesseract developers](http://groups.google.com/group/tesseract-dev/) forum should be used to discuss Tesseract development: bug fixes, enhancements, add-ons for Tesseract. + +Sometimes you will not get a respond to your issue or question. We apologize in advance! Please don't take it personally. There can be many reasons for this, including: time limits, no one knows the answer (at least not the ones that are available at that time) or just that +your question has been asked (and has been answered) many times before... + +## For Developers: Creating a Pull Request + +TBD diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..be5ebae --- /dev/null +++ b/COPYING @@ -0,0 +1,21 @@ +This package contains the Tesseract Open Source OCR Engine. +Originally developed at Hewlett Packard Laboratories Bristol and +at Hewlett Packard Co, Greeley Colorado, all the code +in this distribution is now licensed under the Apache License: + +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** http://www.apache.org/licenses/LICENSE-2.0 +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. + + +Other Dependencies and Licenses: +================================ + +Tesseract uses Leptonica library (http://leptonica.com/) which essentially +uses a BSD 2-clause license. (http://leptonica.com/about-the-license.html) diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..0806fcc --- /dev/null +++ b/ChangeLog @@ -0,0 +1,270 @@ +2018-10-29 - V4.0.0 + * Added new neural network system based on LSTMs, with major accuracy gains. + * Improvements to PDF rendering. + * Fixes to trainingdata rendering. + * Added LSTM models+lang models to 101 languages. (tessdata repository) + * Improved multi-page TIFF handling. + * Fixed damage to binary images when processing PDFs. + * Fixes to training process to allow incremental training from a recognition model. + * Made LSTM the default engine, pushed cube out. + * Deleted cube code. + * Changed OEModes --oem 0 for legacy tesseract engine, --oem 1 for LSTM, --oem 2 for both, --oem 3 for default. + * Avoid use of Leptonica debug parameters or functions. + * Fixed multi-language mode. + * Removed support for VS2010. + * Added Support for VS2015 and VS2017 with CPPAN. + * Implemented invisible text only for PDF. + * Added AVX / SSE support for Windows. + * Enabled OpenMP support. + * Parameter unlv_tilde_crunching change to false. + * Miscellaneous Fixes. + * Detailed Changelog can be foud at https://github.com/tesseract-ocr/tesseract/wiki/4.0x-Changelog and https://github.com/tesseract-ocr/tesseract/wiki/ReleaseNotes#tesseract-release-notes-oct-29-2018---v400 + +2017-02-16 - V3.05.00 + * Made some fine tuning to the hOCR output. + * Added TSV as another optional output format. + * Fixed ABI break introduced in 3.04.00 with the AnalyseLayout() method. + * text2image tool - Enable all OpenType ligatures available in a font. This feature requires Pango 1.38 or newer. + * Training tools - Replaced asserts with tprintf() and exit(1). + * Fixed Cygwin compatibility. + * Improved multipage tiff processing. + * Improved the embedded pdf font (pdf.ttf). + * Enable selection of OCR engine mode from command line. + * Changed tesseract command line parameter '-psm' to '--psm'. + * Write output of tesseract --help, --version and --list-langs to stdout instead of stderr. + * Added new C API for orientation and script detection, removed the old one. + * Increased minimum autoconf version to 2.59. + * Removed dead code. + * Require Leptonica 1.74 or higher. + * Fixed many compiler warning. + * Fixed memory and resource leaks. + * Fixed some issues with the 'Cube' OCR engine. + * Fixed some openCL issues. + * Added option to build Tesseract with CMake build system. + * Implemented CPPAN support for easy Windows building. + +2016-02-17 - V3.04.01 + * Added OSD renderer for psm 0. Works for single page and multi-page images. + * Improve tesstrain.sh script. + * Simplify build and run of ScrollView. + * Improved PDF output for OS X Preview utility. + * INCOMPATIBLE fix to hOCR line height information - commit 134ebc3. + * Added option to build Tesseract without Cube OCR engine (-DNO_CUBE_BUILD). + * Enable OpenMP support. + * Many bug fixes. + +2015-07-11 - V3.04.00 + * Tesseract development is now done with Git and hosted at github.com (Previously we used Subversion as a VCS and code.google.com for hosting). + * Tesseract now requires leptonica 1.71 or a higher version. + * Removed official support for VS 2008. + * Added support for 39 additional scripts/languages, including: amh, asm, aze_cyrl, bod, bos, ceb, cym, dzo, fas, gle, guj, hat, iku, jav, kat, kat_old, kaz, khm, kir, kur, lao, lat, mar, mya, nep, ori, pan, pus, san, sin, srp_latn, syr, tgk, tir, uig, urd, uzb, uzb_cyrl, yid + * Major updates to training system as a result of extensive testing on 100 languages. + * New training data for over 100 languages + * Improved performance with PIC compilation option. + * Significant change to invisible font system in pdf output to improve correctness and compatibility with external programs, particularly ghostscript. + * Improved font identification. + * Major change to improve layout analysis for heavily diacritic languages: Thai, Vietnamese, Kannada, Telugu etc. + * Fixed problems with shifted baselines so recognition can recover from layout analysis errors. + * Major refactor to improve speed on difficult images, especially when running a heap checker. + * Moved params from global in page layout to tesseractclass. + * Improved single column layout analysis. + * Allow ocr output to multiple formats using tesseract command line executable. + * Fixed issues with mixed eng+ara scripts. + * Improved script consistency in numbers. + * Major refactor of control.cpp to enable line recognition. + * Added tesstrain.sh - a master training script. + * Added ability to text2image training tool to just list available fonts. + * Added ability to text2image to underline words. + * Improved efficiency of image processing for PDF output. + * Added parameter description for each parameter listed with 'print-parameters' command line option. + * Added font info to hOCR output. + * Enabled streaming input and output of multi-page documents. + * Many bug fixes. + +2014-02-04 - V3.03(rc1) + * Added new training tool text2image to generate box/tif file pairs from + text and truetype fonts. + * Added support for PDF output with searchable text. + * Removed entire IMAGE class and all code in image directory. + * Tesseract executable: support for output to stdout; limited support for one + page images from stdin (especially on Windows) + * Added Renderer to API to allow document-level processing and output + of document formats, like hOCR, PDF. + * Major refactor of word-level recognition, beam search, eliminating dead code. + * Refactored classifier to make it easier to add new ones. + * Generalized feature extractor to allow feature extraction from greyscale. + * Improved sub/superscript treatment. + * Improved baseline fit. + * Added set_unicharset_properties to training tools. + * Many bug fixes. + * More training source data included. + +2012-02-01 - V3.02 + * Moved ResultIterator/PageIterator to ccmain. + * Added Right-to-left/Bidi capability in the output iterators for Hebrew/Arabic. + * Added paragraph detection in layout analysis/post OCR. + * Fixed inconsistent xheight during training and over-chopping. + * Added simultaneous multi-language capability. + * Refactored top-level word recognition module. + * Added experimental equation detector. + * Improved handling of resolution from input images. + * Blamer module added for error analysis. + * Cleaned up externally used namespace by removing includes from baseapi.h. + * Removed dead memory mangagement code. + * Tidied up constraints on control parameters. + * Added support for ShapeTable in classifier and training. + * Refactored class pruner. + * Fixed training leaks and randomness. + * Major improvements to layout analysis for better image detection, diacritic detection, better textline finding, better tabstop finding. + * Improved line detection and removal. + * Added fixed pitch chopper for CJK. + * Added UNICHARSET to WERD_CHOICE to make mult-language handling easier. + * Fixed problems with internally scaled images. + * Added page and bbox to string in tr files to identify source of training data better. + * Fixes to Hindi Shiroreka splitter. + * Added word bigram correction. + * Reduced stack memory consumption and eliminated some ugly typedefs. + * Added new uniform classifier API. + * Added new training error counter. + * Fixed endian bug in dawg reader. + * Many other fixes, including the way in which the chopper finds chops and messes with the outline while it does so. + +2010-11-29 - V3.01 + * Removed old/dead serialise/deserialze methods on *LISTIZED classes. + * Total rewrite of DENORM to better encapsulate operation and make + for potential to extract features from images. + * Thread-safety! Moved all critical globals and statics to members of the appropriate class. Tesseract is now thread-safe (multiple instances can be used in parallel in multiple threads.) with the minor exception that some control parameters are still global and affect all threads. + * Added Cube, a new recognizer for Arabic. Cube can also be used in combination with normal Tesseract for other languages with an improvement in accuracy at the cost of (much) lower speed. *There is no training module for Cube yet.* + * `OcrEngineMode` in `Init` replaces `AccuracyVSpeed` to control cube. + * Greatly improved segmentation search with consequent accuracy and speed improvements, especially for Chinese. + * Added `PageIterator` and `ResultIterator` as cleaner ways to get the full results out of Tesseract, that are not currently provided by any of the `TessBaseAPI::Get*` methods. All other methods, such as the `ETEXT_STRUCT` in particular are deprecated and will be deleted in the future. + * ApplyBoxes totally rewritten to make training easier. It can now cope with touching/overlapping training characters, and a new boxfile format allows word boxes instead of character boxes, BUT to use that you have to have already boostrapped the language with character boxes. "Cyclic dependency" on traineddata. + * Auto orientation and script detection added to page layout analysis. + * Deleted *lots* of dead code. + * Fixxht module replaced with scalable data-driven module. + * Output font characteristics accuracy improved. + * Removed the double conversion at each classification. + * Upgraded oldest structs to be classes and deprecated PBLOB. + * Removed non-deterministic baseline fit. + * Added fixed length dawgs for Chinese. + * Handling of vertical text improved. + * Handling of leader dots improved. + * Table detection greatly improved. + * Fixed a couple of memory leaks. + * Fixed font labels on output text. (Not perfect, but a lot better than before.) + * Cleanup and more bug fixes + * Special treatments for Hindi. + * Support for build in VS2010 with Microsoft Windows SDK for Windows 7 (thanks to Michael Lutz) + +2010-09-21 - V3.00 + * Preparations for thread safety: + * Changed TessBaseAPI methods to be non-static + * Created a class hierarchy for the directories to hold instance data, + and began moving code into the classes. + * Moved thresholding code to a separate class. + * Added major new page layout analysis module. + * Added HOCR output (issues 221, 263: thanks to amkryukov). + * Added Leptonica as main image I/O and handling. Currently optional, + but in future releases linking with Leptonica will be mandatory. + * Ambiguity table rewritten to allow definite replacements in place + of fix_quotes. + * Added TessdataManager to combine data files into a single file. + * Some dead code deleted. + * VC++6 no longer supported. It can't cope with the use of templates. + * Many more languages added. + * Doxygenation of most of the function header comments. + * Added man pages. + * Added bash completion script (issue 247: thanks to neskiem) + * Fix integer overview in thresholding (issue 366: thanks to Cyanide.Drake) + * Add Danish Fraktur support (issues 300, 360: thanks to + dsl602230@vip.cybercity.dk) + * Fix file pointer leak (issue 359, thanks to yukihiro.nakadaira) + * Fix an error using user-words (Issue 345: thanks to max.markin) + * Fix a memory leak in tablefind.cpp (Issue 342, thanks to zdravco) + * Fix a segfault due to double fclose (Issue 320, thanks to souther) + * Fix an automake error (Issue 318, thanks to ichanjz) + * Fix a Win32 crash on fileFormatIsTiff() (Issues 304, 316, 317, 330, 347, + 349, 352: thanks to nguyenq87, max.markin, zdenop) + * Fixed a number of errors in newer (stricter) versions of VC++ (Issues + 301, among others) + +2009-06-30 - V2.04 + * Integrated bug fixes and patches and misc changes for portability. + * Integrated a patch to remove some of the "access" macros. + * Removed dependence on lua from the viewer, speeding it up + dramatically. + * Fixed the viewer so it compiles and runs properly! + * Specifically fixing issues: 1, 63, 67, 71, 76, 81, 82, 106, 111, + 112, 128, 129, 130, 133, 135, 142, 143, 145, 147, 153, 154, 160, + 165, 170, 175, 177, 187, 192, 195, 199, 201, 205, 209, 108, 169 + +2008-04-22 - V2.03 + * Fixed crash introduced in 2.02. + * Fixed lack of tessembedded.cpp in distribution. + * Added test for leptonica header files and conditional test for lib. + +2008-04-21 - V2.02 (again) + * Fixed namespace collisions with jpeg library (INT32). + * Portability fixes for Windows for new code. + * Updates to autoconf system for new code. + +2008-01-23 - V2.02 + * Improvements to clustering, training and classifier. + * Major internationalization improvements for large-character-set + * languages, eg Kannada. + * Removed some compiler warnings. + * Added multipage tiff support for training and running. + * Updated graphics output to talk to new java-based viewer. + * Added ability to save n-best lists. + * Added leptonica support for more file types. + * Improved Init/End to make them safe. + * Reduced memory use of dictionaries. + * Added some new APIs to TessBaseAPI. + +2007-08-27 - V2.01 + * Fixed UTF8 input problems with box file reader. + * Fixed various infinite loops and crashes in dawg code. + * Removed include of config_auto.h from host.h. + * Added automatic wctype encoding to unicharset_extractor. + * Fixed dawg table too full error. + * Removed svn files from tarball. + * Added new functions to tessdll. + * Increased maximum utf8 string in a classification result to 8. + +2007-07-02 - V2.00 + * Converted internal character handling to UTF8. + * Trained with 6 languages. + * Added unicharset_extractor, wordlist2dawg. + * Added boxfile creation mode. + * Added UNLV regression test capability. + * Fixed problems with copyright and registered symbols. + * Fixed extern "C" declarations problem. + +2007-05-15 - V1.04 + * Added dll exports for Windows. + * Fixed name collisions with stl etc. + * Made some preliminary changes ready for unicodeization. + * Several bug fixes discovered during unicodeization. + +2007-02-02 - V1.03 + * Added mftraining and cntraining. + * Added baseapi with adaptive thresholding for grey and color. + * Fixed many memory leaks. + * Fixed several bugs including lack of use of adaptive classifier. + * Added ifdefs to eliminate graphics code and add embedded platform support. + * Incorporated several patches, including 64-bit builds, Mac builds. + * Minor accuracy improvements. + +2006-10-04 - V1.02 + * Removed dependency on Aspirin. + * Fixed a few missing Apache license headers. + * Removed $log. + +2006-09-07 - V1.01. + * Added mfcpch.cpp and getopt.cpp for VC++. + * Fixed problem with greyscale images and no libtiff. + * Stopped debug window from being used for the usage output. + * Fixed load of inttemp for big-endian architectures. + * Fixed some Mac compilation issues. + +2006-06-16 - V1.0 of open source Tesseract checked-in. diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..867712c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +# Dockerfile for local Travis build test + +FROM ubuntu +MAINTAINER Ian Blenke + +RUN apt-get update +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y cmake curl git ruby bundler wget unzip +RUN gem install bundler travis --no-ri --no-rdoc +RUN git clone --depth 1 https://github.com/travis-ci/travis-build ~/.travis/travis-build +RUN bundle install --gemfile ~/.travis/travis-build/Gemfile + +ADD . /tesseract +WORKDIR /tesseract + +RUN travis compile | sed -e "s/--branch\\\=\\\'\\\'/--branch=master/g" | bash diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..f1bf217 --- /dev/null +++ b/INSTALL @@ -0,0 +1,229 @@ +Copyright 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software +Foundation, Inc. + + This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + + These are generic installation instructions. First you need to run +`./autogen.sh', that creates `configure' script. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. (Caching is +disabled by default to prevent problems with accidental use of stale +cache files.) + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You only need +`configure.ac' if you want to change it or regenerate `configure' using +a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes a while. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not support the `VPATH' +variable, you have to compile the package for one architecture at a +time in the source code directory. After you have installed the +package for one architecture, use `make distclean' before reconfiguring +for another architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=PATH' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, `configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the `--target=TYPE' option to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + + Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +will cause the specified gcc to be used as the C compiler (unless it is +overridden in the site shell script). + +`configure' Invocation +====================== + + `configure' recognizes the following options to control how it +operates. + +`--help' +`-h' + Print a summary of the options to `configure', and exit. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. diff --git a/INSTALL.GIT.md b/INSTALL.GIT.md new file mode 100644 index 0000000..d06104e --- /dev/null +++ b/INSTALL.GIT.md @@ -0,0 +1,86 @@ +# autotools (LINUX/UNIX , msys...) + +If you have cloned Tesseract from GitHub, you must generate +the configure script. + +If you have tesseract 4.0x installation in your system, please remove it +before new build. + +You need Leptonica 1.74.2 (minimum) for Tesseract 4.0x. + +Known dependencies for training tools (excluding leptonica): + * compiler with c++11 support + * automake + * pkg-config + * pango-devel + * cairo-devel + * icu-devel + +So, the steps for making Tesseract are: + + $ ./autogen.sh + $ ./configure + $ make + $ sudo make install + $ sudo ldconfig + $ make training + $ sudo make training-install + +You need to install at least English language and OSD traineddata files to +`TESSDATA_PREFIX` directory. + +You can retrieve single file with tools like [wget](https://www.gnu.org/software/wget/), [curl](https://curl.haxx.se/), [GithubDownloader](https://github.com/intezer/GithubDownloader) or browser. + +All language data files can be retrieved from git repository (useful only for packagers!). +(Repository is huge - more that 1.2 GB. You do NOT need to download traineddata files for +all languages). + + $ git clone https://github.com/tesseract-ocr/tessdata.git tesseract-ocr.tessdata + + +You need an Internet connection and [curl](https://curl.haxx.se/) to compile `ScrollView.jar` +because the build will automatically download +[piccolo2d-core-3.0.jar](http://search.maven.org/remotecontent?filepath=org/piccolo2d/piccolo2d-core/3.0/piccolo2d-core-3.0.jar > piccolo2d-core-3.0.jar) and +[piccolo2d-extras-3.0.jar](http://search.maven.org/remotecontent?filepath=org/piccolo2d/piccolo2d-extras/3.0/piccolo2d-extras-3.0.jar) and +[jaxb-api-2.3.1.jar](http://search.maven.org/remotecontent?filepath=javax/xml/bind/jaxb-api/2.3.1/jaxb-api-2.3.1.jar) and place them to `tesseract/java`. + +Just run: + + $ make ScrollView.jar + +and follow the instruction on [Viewer Debugging wiki](https://github.com/tesseract-ocr/tesseract/wiki/ViewerDebugging). + + +# CMAKE + +There is alternative build system based on multiplatform [cmake](https://cmake.org/) + +## LINUX + + $ mkdir build + $ cd build && cmake .. && make + $ sudo make install + + +## WINDOWS + +You need to use leptonica with cmake patch: + + git clone https://github.com/DanBloomberg/leptonica.git + cd leptonica + mkdir build + cd build + cmake .. + cmake --build . + cd ..\.. + git clone https://github.com/tesseract-ocr/tesseract.git + cd tesseract + mkdir build + cd build + cmake .. -DLeptonica_BUILD_DIR=\abs\path\to\leptonica\build + cmake --build . + + +# WINDOWS Visual Studio + +Please read http://vorba.ch/2014/tesseract-3.03-vs2013.html diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..bdbb7e8 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,64 @@ +## run autogen.sh to create Makefile.in from this file +ACLOCAL_AMFLAGS = -I m4 + +if ENABLE_TRAINING +TRAINING_SUBDIR = src/training +training: all + @$(MAKE) -C src/training +training-install: training + @$(MAKE) -C src/training install +training-uninstall: + @$(MAKE) -C src/training uninstall +clean-local: + @$(MAKE) -C src/training clean +else +training: + @echo "Need to reconfigure project, so there are no errors" +endif + +.PHONY: doc install-langs ScrollView.jar install-jars training + +SUBDIRS = src/arch src/ccutil src/viewer src/cutil src/opencl src/ccstruct +SUBDIRS += src/dict src/classify src/wordrec src/textord src/lstm +SUBDIRS += src/ccmain src/api . tessdata doc unittest + +EXTRA_DIST = README.md +EXTRA_DIST += aclocal.m4 config configure.ac autogen.sh +EXTRA_DIST += tesseract.pc.in $(TRAINING_SUBDIR) java doc langtests unlvtests +EXTRA_DIST += CMakeLists.txt tesseract.pc.cmake cmake VERSION src/vs2010 cppan.yml + +DIST_SUBDIRS = $(SUBDIRS) $(TRAINING_SUBDIR) + +uninstall-hook: + rm -rf $(DESTDIR)$(pkgincludedir) + +dist-hook: +# Need to remove .svn directories from directories +# added using EXTRA_DIST. $(distdir)/tessdata would in +# theory suffice. + rm -rf `find $(distdir) -name .deps -type d` + -rm -f $(distdir)/*/Makefile $(distdir)/*/*/Makefile + rm -f `find $(distdir) -name '*~'` + rm -rf $(find $(distdir)/src/training -executable -type f) + rm -rf $(distdir)/doc/html/* $(distdir)/doc/*.log + +ScrollView.jar: + @cd "$(top_builddir)/java" && $(MAKE) $@ + +install-jars: + @cd "$(top_builddir)/java" && $(MAKE) $@ + +doc: + -srcdir="$(top_srcdir)" builddir="$(top_builddir)" \ + version="@PACKAGE_VERSION@" name="@PACKAGE_NAME@" \ + doxygen $(top_srcdir)/doc/Doxyfile + +doc-pack: doc + -chmod a+r $(top_srcdir)/doc/html/* + @tar --create --directory=$(top_srcdir)/doc/html --verbose --file=- . | gzip -c -9 > $(top_srcdir)/@PACKAGE_NAME@-@PACKAGE_VERSION@-doc-html.tar.gz; + +doc-clean: + rm -rf $(top_srcdir)/doc/html/* + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = tesseract.pc diff --git a/README.md b/README.md new file mode 100644 index 0000000..80cd2d9 --- /dev/null +++ b/README.md @@ -0,0 +1,108 @@ +# Tesseract OCR + +[![Build Status](https://travis-ci.org/tesseract-ocr/tesseract.svg?branch=master)](https://travis-ci.org/tesseract-ocr/tesseract) +[![Build status](https://ci.appveyor.com/api/projects/status/miah0ikfsf0j3819/branch/master?svg=true)](https://ci.appveyor.com/project/zdenop/tesseract/)
+[![Coverity Scan Build Status](https://scan.coverity.com/projects/tesseract-ocr/badge.svg)](https://scan.coverity.com/projects/tesseract-ocr) +[![Code Quality: Cpp](https://img.shields.io/lgtm/grade/cpp/g/tesseract-ocr/tesseract.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/tesseract-ocr/tesseract/context:cpp) +[![Total Alerts](https://img.shields.io/lgtm/alerts/g/tesseract-ocr/tesseract.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/tesseract-ocr/tesseract/alerts)
+[![GitHub license](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://raw.githubusercontent.com/tesseract-ocr/tesseract/master/LICENSE) +[![Downloads](https://img.shields.io/badge/download-all%20releases-brightgreen.svg)](https://github.com/tesseract-ocr/tesseract/releases/) + +## About + +This package contains an **OCR engine** - `libtesseract` and a **command line program** - `tesseract`. +Tesseract 4 adds a new neural net (LSTM) based OCR engine which is focused +on line recognition, but also still supports the legacy Tesseract OCR engine of +Tesseract 3 which works by recognizing character patterns. Compatibility with +Tesseract 3 is enabled by using the Legacy OCR Engine mode (--oem 0). +It also needs traineddata files which support the legacy engine, for example +those from the tessdata repository. + +The lead developer is Ray Smith. The maintainer is Zdenko Podobny. +For a list of contributors see [AUTHORS](https://github.com/tesseract-ocr/tesseract/blob/master/AUTHORS) +and GitHub's log of [contributors](https://github.com/tesseract-ocr/tesseract/graphs/contributors). + +Tesseract has **unicode (UTF-8) support**, and can **recognize more than 100 languages** "out of the box". + +Tesseract supports **various output formats**: plain-text, hocr(html), pdf, tsv, invisible-text-only pdf. + +You should note that in many cases, in order to get better OCR results, you'll need to **[improve the quality](https://github.com/tesseract-ocr/tesseract/wiki/ImproveQuality) of the image** you are giving Tesseract. + +This project **does not include a GUI application**. If you need one, please see the [3rdParty](https://github.com/tesseract-ocr/tesseract/wiki/User-Projects-%E2%80%93-3rdParty) wiki page. + +Tesseract **can be trained to recognize other languages**. See [Tesseract Training](https://github.com/tesseract-ocr/tesseract/wiki/TrainingTesseract) for more information. + +## Brief history + +Tesseract was originally developed at Hewlett-Packard Laboratories Bristol and +at Hewlett-Packard Co, Greeley Colorado between 1985 and 1994, with some +more changes made in 1996 to port to Windows, and some C++izing in 1998. +In 2005 Tesseract was open sourced by HP. Since 2006 it is developed by Google. + +The latest stable version is **[4.0.0](https://github.com/tesseract-ocr/tesseract/releases/tag/4.0.0)**, released on October 29, 2018. Latest source code for 4.0 is available from [master branch on GitHub](https://github.com/tesseract-ocr/tesseract/tree/master). Open issues can be found in [issue tracker](https://github.com/tesseract-ocr/tesseract/issues), and [Planning wiki](https://github.com/tesseract-ocr/tesseract/wiki/Planning#400). + +The latest 3.5 version is **[3.05.02](https://github.com/tesseract-ocr/tesseract/releases/tag/3.05.02)**, released on June 19, 2018. Latest source code for 3.05 is available from [3.05 branch on GitHub](https://github.com/tesseract-ocr/tesseract/tree/3.05). There is no development for this version, but it can be used for special cases (e.g. see [Regression of features from 3.0x](https://github.com/tesseract-ocr/tesseract/wiki/Planning#regression-of-features-from-30x)). + +Source code for the new **[LSTM based 4.0 version](https://github.com/tesseract-ocr/tesseract)** is available from the master branch on GitHub. Please note this branch is under active development. + +See **[Release Notes](https://github.com/tesseract-ocr/tesseract/wiki/ReleaseNotes)** and **[Change Log](https://github.com/tesseract-ocr/tesseract/blob/master/ChangeLog)** for more details of the releases. + +## Installing Tesseract + +You can either [Install Tesseract via pre-built binary package](https://github.com/tesseract-ocr/tesseract/wiki) or [build it from source](https://github.com/tesseract-ocr/tesseract/wiki/Compiling). + +Supported Compilers are: + +* GCC 4.8 and above +* Clang 3.4 and above +* MSVC 2015, 2017 + +Other compilers might work, but are not officially supported. + +## Running Tesseract + +Basic **[command line usage](https://github.com/tesseract-ocr/tesseract/wiki/Command-Line-Usage)**: + + tesseract imagename outputbase [-l lang] [--oem ocrenginemode] [--psm pagesegmode] [configfiles...] + +For more information about the various command line options use `tesseract --help` or `man tesseract`. + +## For developers + +Developers can use `libtesseract` [C](https://github.com/tesseract-ocr/tesseract/blob/master/src/api/capi.h) or [C++](https://github.com/tesseract-ocr/tesseract/blob/master/src/api/baseapi.h) API to build their own application. If you need bindings to `libtesseract` for other programming languages, please see the [wrapper](https://github.com/tesseract-ocr/tesseract/wiki/AddOns#tesseract-wrappers) section on AddOns wiki page. + +Documentation of Tesseract generated from source code by doxygen can be found on [tesseract-ocr.github.io](http://tesseract-ocr.github.io/). + +## Support + +Before you submit an issue, please review **[the guidelines for this repository](https://github.com/tesseract-ocr/tesseract/blob/master/CONTRIBUTING.md)**. + +For support, first read the [Wiki](https://github.com/tesseract-ocr/tesseract/wiki), particularly the [FAQ](https://github.com/tesseract-ocr/tesseract/wiki/FAQ) to see if your problem is addressed there. If not, search the [Tesseract user forum](https://groups.google.com/d/forum/tesseract-ocr), the [Tesseract developer forum](https://groups.google.com/d/forum/tesseract-dev) and [past issues](https://github.com/tesseract-ocr/tesseract/issues), and if you still can't find what you need, ask for support in the mailing-lists. + +Mailing-lists: +* [tesseract-ocr](https://groups.google.com/d/forum/tesseract-ocr) - For tesseract users. +* [tesseract-dev](https://groups.google.com/d/forum/tesseract-dev) - For tesseract developers. + +Please report an issue only for a **bug**, not for asking questions. + +## License + + The code in this repository is licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +**NOTE**: This software depends on other packages that may be licensed under different open source licenses. + +## Latest Version of README + +For the latest online version of the README.md see: + +https://github.com/tesseract-ocr/tesseract/blob/master/README.md diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..fcdb2e1 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +4.0.0 diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml new file mode 100644 index 0000000..0a53a93 --- /dev/null +++ b/android/AndroidManifest.xml @@ -0,0 +1,4 @@ + diff --git a/android/Makefile.am b/android/Makefile.am new file mode 100644 index 0000000..9b822f6 --- /dev/null +++ b/android/Makefile.am @@ -0,0 +1 @@ +EXTRA_DIST = AndroidManifest.xml jni/Android.mk jni/Application.mk diff --git a/android/jni/Android.mk b/android/jni/Android.mk new file mode 100644 index 0000000..170bb51 --- /dev/null +++ b/android/jni/Android.mk @@ -0,0 +1,49 @@ +LOCAL_PATH := $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_MODULE := tesseract-$(APP_ABI) + +LOCAL_STATIC_LIBRARIES := \ + base \ + leptonica-$(APP_ABI) + +LOCAL_C_INCLUDES := $(APP_C_INCLUDES) + +LOCAL_C_INCLUDES += \ + $(LOCAL_PATH)/../../api \ + $(LOCAL_PATH)/../../ccmain\ + $(LOCAL_PATH)/../../ccstruct\ + $(LOCAL_PATH)/../../ccutil\ + $(LOCAL_PATH)/../../classify\ + $(LOCAL_PATH)/../../cutil\ + $(LOCAL_PATH)/../../dict\ + $(LOCAL_PATH)/../../image\ + $(LOCAL_PATH)/../../textord\ + $(LOCAL_PATH)/../../third_party\ + $(LOCAL_PATH)/../../wordrec\ + $(LOCAL_PATH)/../../opencl\ + $(LOCAL_PATH)/../../viewer\ + $(LOCAL_PATH)/../../../leptonica/include + +$(info local c includes=$(LOCAL_C_INCLUDES)) +$(info local path=$(LOCAL_PATH)) +LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/../../api/*.cpp $(LOCAL_PATH)/../../ccmain/*.cpp $(LOCAL_PATH)/../../ccstruct/*.cpp $(LOCAL_PATH)/../../ccutil/*.cpp $(LOCAL_PATH)/../../classify/*.cpp $(LOCAL_PATH)/../../cutil/*.cpp $(LOCAL_PATH)/../../dict/*.cpp $(LOCAL_PATH)/../../image/*.cpp $(LOCAL_PATH)/../../textord/*.cpp $(LOCAL_PATH)/../../viewer/*.cpp $(LOCAL_PATH)/../../wordrec/*.cpp) + +EXPLICIT_SRC_EXCLUDES := \ + $(LOCAL_PATH)/../../api/pdfrenderer.cpp \ + $(LOCAL_PATH)/../../api/tesseractmain.cpp \ + +LOCAL_SRC_FILES := $(filter-out $(EXPLICIT_SRC_EXCLUDES), $(LOCAL_SRC_FILES)) + +LOCAL_SRC_FILES := $(LOCAL_SRC_FILES:$(LOCAL_PATH)/%=%) + +$(info local src files = $(LOCAL_SRC_FILES)) + +LOCAL_LDLIBS := -ldl -llog -ljnigraphics +LOCAL_CFLAGS := -DANDROID_BUILD -DGRAPHICS_DISABLED + +include $(BUILD_SHARED_LIBRARY) + +$(call import-module,base/port) +$(call import-module,mobile/util/hash) +$(call import-module,third_party/leptonica/android/jni) diff --git a/android/jni/Application.mk b/android/jni/Application.mk new file mode 100644 index 0000000..2a81173 --- /dev/null +++ b/android/jni/Application.mk @@ -0,0 +1,13 @@ +# Include common.mk for building google3 native code. +DEPOT_PATH := $(firstword $(subst /google3, ,$(abspath $(call my-dir)))) +ifneq ($(wildcard $(DEPOT_PATH)/google3/mobile/build/common.mk),) + include $(DEPOT_PATH)/google3/mobile/build/common.mk +else + include $(DEPOT_PATH)/READONLY/google3/mobile/build/common.mk +endif + +# Specify the hash namespace that we're using, based on the APP_STL we're using. +APP_CFLAGS += -Werror -DHASH_NAMESPACE=__gnu_cxx +APP_PLATFORM := android-16 +APP_STL := gnustl_static +NDK_TOOLCHAIN_VERSION := clang diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..caad5f8 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,45 @@ +environment: + matrix: + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 + vs_ver: 14 2015 + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + vs_ver: 15 2017 + vs_platform: " Win64" + +configuration: + - Release + +cache: + - c:/Users/appveyor/.cppan/storage + +# for curl +install: + - set PATH=C:\Program Files\Git\mingw64\bin;%PATH% + +before_build: + - curl -fsS -L -o cppan.zip https://cppan.org/client/cppan-master-Windows-client.zip + - 7z x cppan.zip + - set PATH=%PATH%;%cd% + + - cppan # dummy run to create %USERPROFILE%\.cppan\cppan.yml + - ps: 'Add-Content $env:USERPROFILE\.cppan\cppan.yml "`n`nbuild_warning_level: 0`n"' + - ps: 'Add-Content $env:USERPROFILE\.cppan\cppan.yml "`n`nbuild_system_verbose: false`n"' + - ps: 'Add-Content $env:USERPROFILE\.cppan\cppan.yml "`n`nvar_check_jobs: 1`n"' + +build_script: + - mkdir build + - mkdir build\bin + - mkdir build\bin\%CONFIGURATION% + - cd build + #- cmd: 'echo local_settings: > cppan.yml' + #- cmd: 'echo generator: %generator% >> cppan.yml' + #- cmd: 'echo use_shared_libs: true >> cppan.yml' + #- cppan --build .. + - cmake .. -G "Visual Studio %vs_ver%%vs_platform%" + #- cmake --build . --config %CONFIGURATION% > build\bin\%CONFIGURATION%\log.txt 2>&1 + - cmake --build . --config %CONFIGURATION% + +artifacts: + - path: build\bin\%CONFIGURATION% + #- path: build + name: tesseract-$(APPVEYOR_BUILD_VERSION) diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..2faf72e --- /dev/null +++ b/autogen.sh @@ -0,0 +1,127 @@ +#!/bin/sh +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This is a simple script which is meant to help developers +# better deal with the GNU autotools, specifically: +# +# aclocal +# autoheader +# autoconf +# automake +# +# The whole thing is quite complex... +# +# The idea is to run this collection of tools on a single platform, +# typically the main development platform, running a recent version of +# autoconf. In theory, if we had these tools on each platform where we +# ever expected to port the software, we would never need to checkin +# more than a few autotools configuration files. However, the whole +# idea is to generate a configure script and associated files in a way +# that is portable across platforms, so we *have* to check in a whole +# bunch of files generated by all these tools. + +# The real source files are: +# +# acinclude.m4 (used by aclocal) +# configure.ac (main autoconf file) +# Makefile.am, */Makefile.am (automake config files) +# +# All the rest is auto-generated. + +if [ "$1" = "clean" ]; then + echo "Cleaning..." + rm configure aclocal.m4 + rm m4/* + rmdir m4 + rm config/* + rmdir config + find . -iname "Makefile.in" -type f -exec rm '{}' + +fi + +# Prevent any errors that might result from failing to properly invoke +# `libtoolize` or `glibtoolize,` whichever is present on your system, +# from occurring by testing for its existence and capturing the absolute path to +# its location for caching purposes prior to using it later on in 'Step 2:' +if command -v libtoolize >/dev/null 2>&1; then + LIBTOOLIZE="$(command -v libtoolize)" +elif command -v glibtoolize >/dev/null 2>&1; then + LIBTOOLIZE="$(command -v glibtoolize)" +else + echo "Unable to find a valid copy of libtoolize or glibtoolize in your PATH!" + bail_out +fi + +# create m4 directory if it does not exist +if [ ! -d m4 ]; then + mkdir m4 +fi + +bail_out() +{ + echo + echo " Something went wrong, bailing out!" + echo + exit 1 +} + +# --- Step 1: Generate aclocal.m4 from: +# . acinclude.m4 +# . config/*.m4 (these files are referenced in acinclude.m4) + +mkdir -p config + +echo "Running aclocal" +aclocal -I config || bail_out + +# --- Step 2: + +echo "Running $LIBTOOLIZE" +$LIBTOOLIZE -f -c || bail_out +$LIBTOOLIZE --automake || bail_out + +# --- Step 3: Generate config.h.in from: +# . configure.ac (look for AM_CONFIG_HEADER tag or AC_CONFIG_HEADER tag) + +echo "Running autoheader" +autoheader -f || bail_out + +# --- Step 4: Generate Makefile.in, src/Makefile.in, and a whole bunch of +# files in config (config.guess, config.sub, depcomp, +# install-sh, missing, mkinstalldirs) plus COPYING and +# INSTALL from: +# . Makefile.am +# . src/Makefile.am +# +# Using --add-missing --copy makes sure that, if these files are missing, +# they are copied from the system so they can be used in a distribution. + +echo "Running automake --add-missing --copy" +automake --add-missing --copy --warnings=all || bail_out + +# --- Step 5: Generate configure and include/miaconfig.h from: +# . configure.ac +# + +echo "Running autoconf" +autoconf || bail_out + +if grep -q PKG_CHECK_MODULES configure; then + # The generated configure is invalid because pkg-config is unavailable. + rm configure + echo "Missing pkg-config. Check the build requirements." + bail_out +fi + +echo "" +echo "All done." +echo "To build the software now, do something like:" +echo "" +echo "$ ./configure [--enable-debug] [...other options]" diff --git a/cmake/BuildFunctions.cmake b/cmake/BuildFunctions.cmake new file mode 100644 index 0000000..39fd6d7 --- /dev/null +++ b/cmake/BuildFunctions.cmake @@ -0,0 +1,23 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +################################################################################ +# +# macros and functions +# +################################################################################ + +######################################## +# FUNCTION project_group +######################################## +function(project_group target name) + set_target_properties(${target} PROPERTIES FOLDER ${name}) +endfunction(project_group) + +################################################################################ diff --git a/cmake/Configure.cmake b/cmake/Configure.cmake new file mode 100644 index 0000000..134c4a3 --- /dev/null +++ b/cmake/Configure.cmake @@ -0,0 +1,138 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +################################################################################ +# +# configure +# +################################################################################ + +######################################## +# FUNCTION check_includes +######################################## +function(check_includes files) + foreach(F ${${files}}) + set(name ${F}) + string(REPLACE "-" "_" name ${name}) + string(REPLACE "." "_" name ${name}) + string(REPLACE "/" "_" name ${name}) + string(TOUPPER ${name} name) + check_include_files(${F} HAVE_${name}) + file(APPEND ${AUTOCONFIG_SRC} "/* Define to 1 if you have the <${F}> header file. */\n") + file(APPEND ${AUTOCONFIG_SRC} "#cmakedefine HAVE_${name} 1\n") + file(APPEND ${AUTOCONFIG_SRC} "\n") + endforeach() +endfunction(check_includes) + +######################################## +# FUNCTION check_functions +######################################## +function(check_functions functions) + foreach(F ${${functions}}) + set(name ${F}) + string(TOUPPER ${name} name) + check_function_exists(${F} HAVE_${name}) + file(APPEND ${AUTOCONFIG_SRC} "/* Define to 1 if you have the `${F}' function. */\n") + file(APPEND ${AUTOCONFIG_SRC} "#cmakedefine HAVE_${name} 1\n") + file(APPEND ${AUTOCONFIG_SRC} "\n") + endforeach() +endfunction(check_functions) + +######################################## +# FUNCTION check_types +######################################## +function(check_types types) + foreach(T ${${types}}) + set(name ${T}) + string(REPLACE " " "_" name ${name}) + string(REPLACE "-" "_" name ${name}) + string(REPLACE "." "_" name ${name}) + string(REPLACE "/" "_" name ${name}) + string(TOUPPER ${name} name) + check_type_size(${T} HAVE_${name}) + file(APPEND ${AUTOCONFIG_SRC} "/* Define to 1 if the system has the type `${T}'. */\n") + file(APPEND ${AUTOCONFIG_SRC} "#cmakedefine HAVE_${name} 1\n") + file(APPEND ${AUTOCONFIG_SRC} "\n") + endforeach() +endfunction(check_types) + +######################################## + +file(WRITE ${AUTOCONFIG_SRC}) + +include(CheckCSourceCompiles) +include(CheckCSourceRuns) +include(CheckCXXSourceCompiles) +include(CheckCXXSourceRuns) +include(CheckFunctionExists) +include(CheckIncludeFiles) +include(CheckLibraryExists) +include(CheckPrototypeDefinition) +include(CheckStructHasMember) +include(CheckSymbolExists) +include(CheckTypeSize) +include(TestBigEndian) + +set(include_files_list + dlfcn.h + inttypes.h + limits.h + malloc.h + memory.h + stdbool.h + stdint.h + stdlib.h + string.h + sys/ipc.h + sys/shm.h + sys/stat.h + sys/types.h + sys/wait.h + unistd.h + + cairo/cairo-version.h + CL/cl.h + OpenCL/cl.h + pango-1.0/pango/pango-features.h + tiffio.h + unicode/uchar.h +) +check_includes(include_files_list) + +set(functions_list + snprintf +) +check_functions(functions_list) + +set(types_list + "long long int" + off_t + mbstate_t + wchar_t + _Bool +) +check_types(types_list) + +set(PACKAGE_VERSION "${VERSION_PLAIN}") +file(APPEND ${AUTOCONFIG_SRC} " +/* Version number */ +#cmakedefine PACKAGE_VERSION \"${VERSION_PLAIN}\" +") + +test_big_endian(WORDS_BIGENDIAN) + +file(APPEND ${AUTOCONFIG_SRC} " +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#cmakedefine WORDS_BIGENDIAN 1 +") + +######################################## + +################################################################################ diff --git a/cmake/FindICU.cmake b/cmake/FindICU.cmake new file mode 100644 index 0000000..8381c2e --- /dev/null +++ b/cmake/FindICU.cmake @@ -0,0 +1,323 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# This module can find the International Components for Unicode (ICU) Library +# +# Requirements: +# - CMake >= 2.8.3 (for new version of find_package_handle_standard_args) +# +# The following variables will be defined for your use: +# - ICU_FOUND : were all of your specified components found (include dependencies)? +# - ICU_INCLUDE_DIRS : ICU include directory +# - ICU_LIBRARIES : ICU libraries +# - ICU_VERSION : complete version of ICU (x.y.z) +# - ICU_MAJOR_VERSION : major version of ICU +# - ICU_MINOR_VERSION : minor version of ICU +# - ICU_PATCH_VERSION : patch version of ICU +# - ICU__FOUND : were found? (FALSE for non specified component if it is not a dependency) +# +# For windows or non standard installation, define ICU_ROOT variable to point to the root installation of ICU. Two ways: +# - run cmake with -DICU_ROOT= +# - define an environment variable with the same name before running cmake +# With cmake-gui, before pressing "Configure": +# 1) Press "Add Entry" button +# 2) Add a new entry defined as: +# - Name: ICU_ROOT +# - Type: choose PATH in the selection list +# - Press "..." button and select the root installation of ICU +# +# Example Usage: +# +# 1. Copy this file in the root of your project source directory +# 2. Then, tell CMake to search this non-standard module in your project directory by adding to your CMakeLists.txt: +# set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}) +# 3. Finally call find_package() once, here are some examples to pick from +# +# Require ICU 4.4 or later +# find_package(ICU 4.4 REQUIRED) +# +# if(ICU_FOUND) +# include_directories(${ICU_INCLUDE_DIRS}) +# add_executable(myapp myapp.c) +# target_link_libraries(myapp ${ICU_LIBRARIES}) +# endif(ICU_FOUND) + +#============================================================================= +# Copyright (c) 2011-2013, julp +# +# Distributed under the OSI-approved BSD License +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +#============================================================================= + +find_package(PkgConfig QUIET) + +########## Private ########## +if(NOT DEFINED ICU_PUBLIC_VAR_NS) + set(ICU_PUBLIC_VAR_NS "ICU") # Prefix for all ICU relative public variables +endif(NOT DEFINED ICU_PUBLIC_VAR_NS) +if(NOT DEFINED ICU_PRIVATE_VAR_NS) + set(ICU_PRIVATE_VAR_NS "_${ICU_PUBLIC_VAR_NS}") # Prefix for all ICU relative internal variables +endif(NOT DEFINED ICU_PRIVATE_VAR_NS) +if(NOT DEFINED PC_ICU_PRIVATE_VAR_NS) + set(PC_ICU_PRIVATE_VAR_NS "_PC${ICU_PRIVATE_VAR_NS}") # Prefix for all pkg-config relative internal variables +endif(NOT DEFINED PC_ICU_PRIVATE_VAR_NS) + +function(icudebug _VARNAME) + if(${ICU_PUBLIC_VAR_NS}_DEBUG) + if(DEFINED ${ICU_PUBLIC_VAR_NS}_${_VARNAME}) + message("${ICU_PUBLIC_VAR_NS}_${_VARNAME} = ${${ICU_PUBLIC_VAR_NS}_${_VARNAME}}") + else(DEFINED ${ICU_PUBLIC_VAR_NS}_${_VARNAME}) + message("${ICU_PUBLIC_VAR_NS}_${_VARNAME} = ") + endif(DEFINED ${ICU_PUBLIC_VAR_NS}_${_VARNAME}) + endif(${ICU_PUBLIC_VAR_NS}_DEBUG) +endfunction(icudebug) + +set(${ICU_PRIVATE_VAR_NS}_ROOT "") +if(DEFINED ENV{ICU_ROOT}) + set(${ICU_PRIVATE_VAR_NS}_ROOT "$ENV{ICU_ROOT}") +endif(DEFINED ENV{ICU_ROOT}) +if (DEFINED ICU_ROOT) + set(${ICU_PRIVATE_VAR_NS}_ROOT "${ICU_ROOT}") +endif(DEFINED ICU_ROOT) + +set(${ICU_PRIVATE_VAR_NS}_BIN_SUFFIXES ) +set(${ICU_PRIVATE_VAR_NS}_LIB_SUFFIXES ) +if(CMAKE_SIZEOF_VOID_P EQUAL 8) + list(APPEND ${ICU_PRIVATE_VAR_NS}_BIN_SUFFIXES "bin64") + list(APPEND ${ICU_PRIVATE_VAR_NS}_LIB_SUFFIXES "lib64") +endif(CMAKE_SIZEOF_VOID_P EQUAL 8) +list(APPEND ${ICU_PRIVATE_VAR_NS}_BIN_SUFFIXES "bin") +list(APPEND ${ICU_PRIVATE_VAR_NS}_LIB_SUFFIXES "lib") + +set(${ICU_PRIVATE_VAR_NS}_COMPONENTS ) +# ... +macro(icu_declare_component _NAME) + list(APPEND ${ICU_PRIVATE_VAR_NS}_COMPONENTS ${_NAME}) + set("${ICU_PRIVATE_VAR_NS}_COMPONENTS_${_NAME}" ${ARGN}) +endmacro(icu_declare_component) + +icu_declare_component(data icudata) +icu_declare_component(uc icuuc) # Common and Data libraries +icu_declare_component(i18n icui18n icuin) # Internationalization library +icu_declare_component(io icuio ustdio) # Stream and I/O Library +icu_declare_component(le icule) # Layout library +icu_declare_component(lx iculx) # Paragraph Layout library + +########## Public ########## +set(${ICU_PUBLIC_VAR_NS}_FOUND TRUE) +set(${ICU_PUBLIC_VAR_NS}_LIBRARIES ) +set(${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS ) +set(${ICU_PUBLIC_VAR_NS}_C_FLAGS "") +set(${ICU_PUBLIC_VAR_NS}_CXX_FLAGS "") +set(${ICU_PUBLIC_VAR_NS}_CPP_FLAGS "") +set(${ICU_PUBLIC_VAR_NS}_C_SHARED_FLAGS "") +set(${ICU_PUBLIC_VAR_NS}_CXX_SHARED_FLAGS "") +set(${ICU_PUBLIC_VAR_NS}_CPP_SHARED_FLAGS "") +foreach(${ICU_PRIVATE_VAR_NS}_COMPONENT ${${ICU_PRIVATE_VAR_NS}_COMPONENTS}) + string(TOUPPER "${${ICU_PRIVATE_VAR_NS}_COMPONENT}" ${ICU_PRIVATE_VAR_NS}_UPPER_COMPONENT) + set("${ICU_PUBLIC_VAR_NS}_${${ICU_PRIVATE_VAR_NS}_UPPER_COMPONENT}_FOUND" FALSE) # may be done in the icu_declare_component macro +endforeach(${ICU_PRIVATE_VAR_NS}_COMPONENT) + +# Check components +if(NOT ${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS) # uc required at least + set(${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS uc) +else(NOT ${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS) + list(APPEND ${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS uc) + list(REMOVE_DUPLICATES ${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS) + foreach(${ICU_PRIVATE_VAR_NS}_COMPONENT ${${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS}) + if(NOT DEFINED ${ICU_PRIVATE_VAR_NS}_COMPONENTS_${${ICU_PRIVATE_VAR_NS}_COMPONENT}) + message(FATAL_ERROR "Unknown ICU component: ${${ICU_PRIVATE_VAR_NS}_COMPONENT}") + endif(NOT DEFINED ${ICU_PRIVATE_VAR_NS}_COMPONENTS_${${ICU_PRIVATE_VAR_NS}_COMPONENT}) + endforeach(${ICU_PRIVATE_VAR_NS}_COMPONENT) +endif(NOT ${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS) + +# Includes +find_path( + ${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS + NAMES unicode/utypes.h utypes.h + HINTS ${${ICU_PRIVATE_VAR_NS}_ROOT} + PATH_SUFFIXES "include" + DOC "Include directories for ICU" +) + +if(${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS) + ########## ########## + if(EXISTS "${${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS}/unicode/uvernum.h") # ICU >= 4 + file(READ "${${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS}/unicode/uvernum.h" ${ICU_PRIVATE_VAR_NS}_VERSION_HEADER_CONTENTS) + elseif(EXISTS "${${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS}/unicode/uversion.h") # ICU [2;4[ + file(READ "${${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS}/unicode/uversion.h" ${ICU_PRIVATE_VAR_NS}_VERSION_HEADER_CONTENTS) + elseif(EXISTS "${${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS}/unicode/utypes.h") # ICU [1.4;2[ + file(READ "${${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS}/unicode/utypes.h" ${ICU_PRIVATE_VAR_NS}_VERSION_HEADER_CONTENTS) + elseif(EXISTS "${${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS}/utypes.h") # ICU 1.3 + file(READ "${${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS}/utypes.h" ${ICU_PRIVATE_VAR_NS}_VERSION_HEADER_CONTENTS) + else() + message(FATAL_ERROR "ICU version header not found") + endif() + + if(${ICU_PRIVATE_VAR_NS}_VERSION_HEADER_CONTENTS MATCHES ".*# *define *ICU_VERSION *\"([0-9]+)\".*") # ICU 1.3 + # [1.3;1.4[ as #define ICU_VERSION "3" (no patch version, ie all 1.3.X versions will be detected as 1.3.0) + set(${ICU_PUBLIC_VAR_NS}_MAJOR_VERSION "1") + set(${ICU_PUBLIC_VAR_NS}_MINOR_VERSION "${CMAKE_MATCH_1}") + set(${ICU_PUBLIC_VAR_NS}_PATCH_VERSION "0") + elseif(${ICU_PRIVATE_VAR_NS}_VERSION_HEADER_CONTENTS MATCHES ".*# *define *U_ICU_VERSION_MAJOR_NUM *([0-9]+).*") + # + # Since version 4.9.1, ICU release version numbering was totaly changed, see: + # - http://site.icu-project.org/download/49 + # - http://userguide.icu-project.org/design#TOC-Version-Numbers-in-ICU + # + set(${ICU_PUBLIC_VAR_NS}_MAJOR_VERSION "${CMAKE_MATCH_1}") + string(REGEX REPLACE ".*# *define *U_ICU_VERSION_MINOR_NUM *([0-9]+).*" "\\1" ${ICU_PUBLIC_VAR_NS}_MINOR_VERSION "${${ICU_PRIVATE_VAR_NS}_VERSION_HEADER_CONTENTS}") + string(REGEX REPLACE ".*# *define *U_ICU_VERSION_PATCHLEVEL_NUM *([0-9]+).*" "\\1" ${ICU_PUBLIC_VAR_NS}_PATCH_VERSION "${${ICU_PRIVATE_VAR_NS}_VERSION_HEADER_CONTENTS}") + elseif(${ICU_PRIVATE_VAR_NS}_VERSION_HEADER_CONTENTS MATCHES ".*# *define *U_ICU_VERSION *\"(([0-9]+)(\\.[0-9]+)*)\".*") # ICU [1.4;1.8[ + # [1.4;1.8[ as #define U_ICU_VERSION "1.4.1.2" but it seems that some 1.4.1(?:\.\d)? have releasing error and appears as 1.4.0 + set(${ICU_PRIVATE_VAR_NS}_FULL_VERSION "${CMAKE_MATCH_1}") # copy CMAKE_MATCH_1, no longer valid on the following if + if(${ICU_PRIVATE_VAR_NS}_FULL_VERSION MATCHES "^([0-9]+)\\.([0-9]+)$") + set(${ICU_PUBLIC_VAR_NS}_MAJOR_VERSION "${CMAKE_MATCH_1}") + set(${ICU_PUBLIC_VAR_NS}_MINOR_VERSION "${CMAKE_MATCH_2}") + set(${ICU_PUBLIC_VAR_NS}_PATCH_VERSION "0") + elseif(${ICU_PRIVATE_VAR_NS}_FULL_VERSION MATCHES "^([0-9]+)\\.([0-9]+)\\.([0-9]+)") + set(${ICU_PUBLIC_VAR_NS}_MAJOR_VERSION "${CMAKE_MATCH_1}") + set(${ICU_PUBLIC_VAR_NS}_MINOR_VERSION "${CMAKE_MATCH_2}") + set(${ICU_PUBLIC_VAR_NS}_PATCH_VERSION "${CMAKE_MATCH_3}") + endif() + else() + message(FATAL_ERROR "failed to detect ICU version") + endif() + set(${ICU_PUBLIC_VAR_NS}_VERSION "${${ICU_PUBLIC_VAR_NS}_MAJOR_VERSION}.${${ICU_PUBLIC_VAR_NS}_MINOR_VERSION}.${${ICU_PUBLIC_VAR_NS}_PATCH_VERSION}") + ########## ########## + + # Check dependencies (implies pkg-config) + if(PKG_CONFIG_FOUND) + set(${ICU_PRIVATE_VAR_NS}_COMPONENTS_DUP ${${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS}) + foreach(${ICU_PRIVATE_VAR_NS}_COMPONENT ${${ICU_PRIVATE_VAR_NS}_COMPONENTS_DUP}) + pkg_check_modules(PC_ICU_PRIVATE_VAR_NS "icu-${${ICU_PRIVATE_VAR_NS}_COMPONENT}" QUIET) + + if(${PC_ICU_PRIVATE_VAR_NS}_FOUND) + foreach(${PC_ICU_PRIVATE_VAR_NS}_LIBRARY ${PC_ICU_LIBRARIES}) + string(REGEX REPLACE "^icu" "" ${PC_ICU_PRIVATE_VAR_NS}_STRIPPED_LIBRARY ${${PC_ICU_PRIVATE_VAR_NS}_LIBRARY}) + list(APPEND ${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS ${${PC_ICU_PRIVATE_VAR_NS}_STRIPPED_LIBRARY}) + endforeach(${PC_ICU_PRIVATE_VAR_NS}_LIBRARY) + endif(${PC_ICU_PRIVATE_VAR_NS}_FOUND) + endforeach(${ICU_PRIVATE_VAR_NS}_COMPONENT) + list(REMOVE_DUPLICATES ${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS) + endif(PKG_CONFIG_FOUND) + + # Check libraries + foreach(${ICU_PRIVATE_VAR_NS}_COMPONENT ${${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS}) + set(${ICU_PRIVATE_VAR_NS}_POSSIBLE_RELEASE_NAMES ) + set(${ICU_PRIVATE_VAR_NS}_POSSIBLE_DEBUG_NAMES ) + foreach(${ICU_PRIVATE_VAR_NS}_BASE_NAME ${${ICU_PRIVATE_VAR_NS}_COMPONENTS_${${ICU_PRIVATE_VAR_NS}_COMPONENT}}) + list(APPEND ${ICU_PRIVATE_VAR_NS}_POSSIBLE_RELEASE_NAMES "${${ICU_PRIVATE_VAR_NS}_BASE_NAME}") + list(APPEND ${ICU_PRIVATE_VAR_NS}_POSSIBLE_DEBUG_NAMES "${${ICU_PRIVATE_VAR_NS}_BASE_NAME}d") + list(APPEND ${ICU_PRIVATE_VAR_NS}_POSSIBLE_RELEASE_NAMES "${${ICU_PRIVATE_VAR_NS}_BASE_NAME}${ICU_MAJOR_VERSION}${ICU_MINOR_VERSION}") + list(APPEND ${ICU_PRIVATE_VAR_NS}_POSSIBLE_DEBUG_NAMES "${${ICU_PRIVATE_VAR_NS}_BASE_NAME}${ICU_MAJOR_VERSION}${ICU_MINOR_VERSION}d") + endforeach(${ICU_PRIVATE_VAR_NS}_BASE_NAME) + + find_library( + ${ICU_PRIVATE_VAR_NS}_LIB_RELEASE_${${ICU_PRIVATE_VAR_NS}_COMPONENT} + NAMES ${${ICU_PRIVATE_VAR_NS}_POSSIBLE_RELEASE_NAMES} + HINTS ${${ICU_PRIVATE_VAR_NS}_ROOT} + PATH_SUFFIXES ${_ICU_LIB_SUFFIXES} + DOC "Release libraries for ICU" + ) + find_library( + ${ICU_PRIVATE_VAR_NS}_LIB_DEBUG_${${ICU_PRIVATE_VAR_NS}_COMPONENT} + NAMES ${${ICU_PRIVATE_VAR_NS}_POSSIBLE_DEBUG_NAMES} + HINTS ${${ICU_PRIVATE_VAR_NS}_ROOT} + PATH_SUFFIXES ${_ICU_LIB_SUFFIXES} + DOC "Debug libraries for ICU" + ) + + string(TOUPPER "${${ICU_PRIVATE_VAR_NS}_COMPONENT}" ${ICU_PRIVATE_VAR_NS}_UPPER_COMPONENT) + if(NOT ${ICU_PRIVATE_VAR_NS}_LIB_RELEASE_${${ICU_PRIVATE_VAR_NS}_COMPONENT} AND NOT ${ICU_PRIVATE_VAR_NS}_LIB_DEBUG_${${ICU_PRIVATE_VAR_NS}_COMPONENT}) # both not found + set("${ICU_PUBLIC_VAR_NS}_${${ICU_PRIVATE_VAR_NS}_UPPER_COMPONENT}_FOUND" FALSE) + set("${ICU_PUBLIC_VAR_NS}_FOUND" FALSE) + else(NOT ${ICU_PRIVATE_VAR_NS}_LIB_RELEASE_${${ICU_PRIVATE_VAR_NS}_COMPONENT} AND NOT ${ICU_PRIVATE_VAR_NS}_LIB_DEBUG_${${ICU_PRIVATE_VAR_NS}_COMPONENT}) # one or both found + set("${ICU_PUBLIC_VAR_NS}_${${ICU_PRIVATE_VAR_NS}_UPPER_COMPONENT}_FOUND" TRUE) + if(NOT ${ICU_PRIVATE_VAR_NS}_LIB_RELEASE_${${ICU_PRIVATE_VAR_NS}_COMPONENT}) # release not found => we are in debug + set(${ICU_PRIVATE_VAR_NS}_LIB_${${ICU_PRIVATE_VAR_NS}_COMPONENT} "${${ICU_PRIVATE_VAR_NS}_LIB_DEBUG_${${ICU_PRIVATE_VAR_NS}_COMPONENT}}") + elseif(NOT ${ICU_PRIVATE_VAR_NS}_LIB_DEBUG_${${ICU_PRIVATE_VAR_NS}_COMPONENT}) # debug not found => we are in release + set(${ICU_PRIVATE_VAR_NS}_LIB_${${ICU_PRIVATE_VAR_NS}_COMPONENT} "${${ICU_PRIVATE_VAR_NS}_LIB_RELEASE_${${ICU_PRIVATE_VAR_NS}_COMPONENT}}") + else() # both found + set( + ${ICU_PRIVATE_VAR_NS}_LIB_${${ICU_PRIVATE_VAR_NS}_COMPONENT} + optimized ${${ICU_PRIVATE_VAR_NS}_LIB_RELEASE_${${ICU_PRIVATE_VAR_NS}_COMPONENT}} + debug ${${ICU_PRIVATE_VAR_NS}_LIB_DEBUG_${${ICU_PRIVATE_VAR_NS}_COMPONENT}} + ) + endif() + list(APPEND ${ICU_PUBLIC_VAR_NS}_LIBRARIES ${${ICU_PRIVATE_VAR_NS}_LIB_${${ICU_PRIVATE_VAR_NS}_COMPONENT}}) + endif(NOT ${ICU_PRIVATE_VAR_NS}_LIB_RELEASE_${${ICU_PRIVATE_VAR_NS}_COMPONENT} AND NOT ${ICU_PRIVATE_VAR_NS}_LIB_DEBUG_${${ICU_PRIVATE_VAR_NS}_COMPONENT}) + endforeach(${ICU_PRIVATE_VAR_NS}_COMPONENT) + + # Try to find out compiler flags + find_program(${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE icu-config HINTS ${${ICU_PRIVATE_VAR_NS}_ROOT}) + if(${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE) + execute_process(COMMAND ${${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE} --cflags OUTPUT_VARIABLE ${ICU_PUBLIC_VAR_NS}_C_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND ${${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE} --cxxflags OUTPUT_VARIABLE ${ICU_PUBLIC_VAR_NS}_CXX_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND ${${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE} --cppflags OUTPUT_VARIABLE ${ICU_PUBLIC_VAR_NS}_CPP_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE) + + execute_process(COMMAND ${${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE} --cflags-dynamic OUTPUT_VARIABLE ${ICU_PUBLIC_VAR_NS}_C_SHARED_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND ${${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE} --cxxflags-dynamic OUTPUT_VARIABLE ${ICU_PUBLIC_VAR_NS}_CXX_SHARED_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND ${${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE} --cppflags-dynamic OUTPUT_VARIABLE ${ICU_PUBLIC_VAR_NS}_CPP_SHARED_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE) + endif(${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE) + + # Check find_package arguments + include(FindPackageHandleStandardArgs) + if(${ICU_PUBLIC_VAR_NS}_FIND_REQUIRED AND NOT ${ICU_PUBLIC_VAR_NS}_FIND_QUIETLY) + find_package_handle_standard_args( + ${ICU_PUBLIC_VAR_NS} + REQUIRED_VARS ${ICU_PUBLIC_VAR_NS}_LIBRARIES ${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS + VERSION_VAR ${ICU_PUBLIC_VAR_NS}_VERSION + ) + else(${ICU_PUBLIC_VAR_NS}_FIND_REQUIRED AND NOT ${ICU_PUBLIC_VAR_NS}_FIND_QUIETLY) + find_package_handle_standard_args(${ICU_PUBLIC_VAR_NS} "ICU not found" ${ICU_PUBLIC_VAR_NS}_LIBRARIES ${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS) + endif(${ICU_PUBLIC_VAR_NS}_FIND_REQUIRED AND NOT ${ICU_PUBLIC_VAR_NS}_FIND_QUIETLY) +else(${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS) + set("${ICU_PUBLIC_VAR_NS}_FOUND" FALSE) + if(${ICU_PUBLIC_VAR_NS}_FIND_REQUIRED AND NOT ${ICU_PUBLIC_VAR_NS}_FIND_QUIETLY) + message(FATAL_ERROR "Could not find ICU include directory") + endif(${ICU_PUBLIC_VAR_NS}_FIND_REQUIRED AND NOT ${ICU_PUBLIC_VAR_NS}_FIND_QUIETLY) +endif(${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS) + +mark_as_advanced( + ${ICU_PUBLIC_VAR_NS}_INCLUDE_DIRS + ${ICU_PUBLIC_VAR_NS}_LIBRARIES +) + +# IN (args) +icudebug("FIND_COMPONENTS") +icudebug("FIND_REQUIRED") +icudebug("FIND_QUIETLY") +icudebug("FIND_VERSION") +# OUT +# Found +icudebug("FOUND") +icudebug("UC_FOUND") +icudebug("I18N_FOUND") +icudebug("IO_FOUND") +icudebug("LE_FOUND") +icudebug("LX_FOUND") +icudebug("DATA_FOUND") +# Flags +icudebug("C_FLAGS") +icudebug("CPP_FLAGS") +icudebug("CXX_FLAGS") +icudebug("C_SHARED_FLAGS") +icudebug("CPP_SHARED_FLAGS") +icudebug("CXX_SHARED_FLAGS") +# Linking +icudebug("INCLUDE_DIRS") +icudebug("LIBRARIES") +# Version +icudebug("MAJOR_VERSION") +icudebug("MINOR_VERSION") +icudebug("PATCH_VERSION") +icudebug("VERSION") diff --git a/cmake/SourceGroups.cmake b/cmake/SourceGroups.cmake new file mode 100644 index 0000000..4bc6e3f --- /dev/null +++ b/cmake/SourceGroups.cmake @@ -0,0 +1,38 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#include(SourceGroups) + +set(SSRC ${CMAKE_SOURCE_DIR}) +set(BSRC ${CMAKE_BINARY_DIR}) + +set(_CPP ".*\\.cpp") +set(CPP "${_CPP}$") + +set(_H ".*\\.h") +set(H "${_H}$") + +set(H_CPP "(${H}|${CPP})") + +source_group("Resource files" ".*\\.(rc|ico)") + +source_group("api" "${SSRC}/api/${H_CPP}") +source_group("arch" "${SSRC}/arch/${H_CPP}") +source_group("ccmain" "${SSRC}/ccmain/${H_CPP}") +source_group("ccstruct" "${SSRC}/ccstruct/${H_CPP}") +source_group("ccutil" "${SSRC}/ccutil/${H_CPP}") +source_group("classify" "${SSRC}/classify/${H_CPP}") +source_group("cutil" "${SSRC}/cutil/${H_CPP}") +source_group("dict" "${SSRC}/dict/${H_CPP}") +source_group("lstm" "${SSRC}/lstm/${H_CPP}") +source_group("opencl" "${SSRC}/opencl/${H_CPP}") +source_group("textord" "${SSRC}/textord/${H_CPP}") +source_group("viewer" "${SSRC}/viewer/${H_CPP}") +source_group("port" "${SSRC}/vs2010/port/${H_CPP}") +source_group("wordrec" "${SSRC}/wordrec/${H_CPP}") diff --git a/cmake/templates/TesseractConfig-version.cmake.in b/cmake/templates/TesseractConfig-version.cmake.in new file mode 100644 index 0000000..d3f85df --- /dev/null +++ b/cmake/templates/TesseractConfig-version.cmake.in @@ -0,0 +1,14 @@ +set(Tesseract_VERSION @VERSION_PLAIN@) +set(PACKAGE_VERSION ${Tesseract_VERSION}) + +set(PACKAGE_VERSION_EXACT False) +set(PACKAGE_VERSION_COMPATIBLE False) + +if(PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION) + set(PACKAGE_VERSION_EXACT True) + set(PACKAGE_VERSION_COMPATIBLE True) +endif() + +if(PACKAGE_FIND_VERSION VERSION_LESS PACKAGE_VERSION) + set(PACKAGE_VERSION_COMPATIBLE True) +endif() diff --git a/cmake/templates/TesseractConfig.cmake.in b/cmake/templates/TesseractConfig.cmake.in new file mode 100644 index 0000000..1383836 --- /dev/null +++ b/cmake/templates/TesseractConfig.cmake.in @@ -0,0 +1,43 @@ +# =================================================================================== +# The Tesseract CMake configuration file +# +# ** File generated automatically, do not modify ** +# +# Usage from an external project: +# In your CMakeLists.txt, add these lines: +# +# find_package(Tesseract REQUIRED) +# include_directories(${Tesseract_INCLUDE_DIRS}) +# target_link_libraries(MY_TARGET_NAME ${Tesseract_LIBRARIES}) +# +# This file will define the following variables: +# - Tesseract_LIBRARIES : The list of all imported targets for OpenCV modules. +# - Tesseract_INCLUDE_DIRS : The Tesseract include directories. +# - Tesseract_VERSION : The version of this Tesseract build: "@VERSION_PLAIN@" +# - Tesseract_VERSION_MAJOR : Major version part of Tesseract_VERSION: "@VERSION_MAJOR@" +# - Tesseract_VERSION_MINOR : Minor version part of Tesseract_VERSION: "@VERSION_MINOR@" +# +# =================================================================================== + +include(${CMAKE_CURRENT_LIST_DIR}/TesseractTargets.cmake) + +# ====================================================== +# Version variables: +# ====================================================== + +SET(Tesseract_VERSION @VERSION_PLAIN@) +SET(Tesseract_VERSION_MAJOR @VERSION_MAJOR@) +SET(Tesseract_VERSION_MINOR @VERSION_MINOR@) + +# ====================================================== +# Include directories to add to the user project: +# ====================================================== + +# Provide the include directories to the caller +set(Tesseract_INCLUDE_DIRS @INCLUDE_DIR@) + +# ==================================================================== +# Link libraries: +# ==================================================================== + +set(Tesseract_LIBRARIES libtesseract) diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..2825806 --- /dev/null +++ b/configure.ac @@ -0,0 +1,557 @@ +# -*-Shell-script-*- +# +# Copyright (c) Luc Vincent + +# ---------------------------------------- +# Initialization +# ---------------------------------------- +AC_PREREQ([2.63]) +AC_INIT([tesseract], + [m4_esyscmd_s([test -d .git && git describe --abbrev=4 || cat VERSION])], + [https://github.com/tesseract-ocr/tesseract/issues],, + [https://github.com/tesseract-ocr/tesseract/]) +AC_PROG_CXX([g++ clang++]) +AC_LANG([C++]) +AC_LANG_COMPILER_REQUIRE +CXXFLAGS=${CXXFLAGS:-""} +AC_CONFIG_MACRO_DIR([m4]) +AC_CONFIG_AUX_DIR([config]) +AC_CONFIG_SRCDIR([src/api/tesseractmain.cpp]) +AC_PREFIX_DEFAULT([/usr/local]) + +# Automake configuration. Do not require README file (we use README.md). +AM_INIT_AUTOMAKE([foreign subdir-objects]) + +# Define date of package, etc. Could be useful in auto-generated +# documentation. +PACKAGE_YEAR=2018 +PACKAGE_DATE="10/29" + +abs_top_srcdir=`AS_DIRNAME([$0])` + +AC_DEFINE_UNQUOTED([PACKAGE_NAME], ["${PACKAGE_NAME}"], [Name of package]) +AC_DEFINE_UNQUOTED([PACKAGE_VERSION], ["${PACKAGE_VERSION}"], [Version number]) +AC_DEFINE_UNQUOTED([PACKAGE_YEAR], ["$PACKAGE_YEAR"], [Official year for this release]) +AC_DEFINE_UNQUOTED([PACKAGE_DATE], ["$PACKAGE_DATE"], [Official date of release]) + +AC_SUBST([PACKAGE_NAME]) +AC_SUBST([PACKAGE_VERSION]) +AC_SUBST([PACKAGE_YEAR]) +AC_SUBST([PACKAGE_DATE]) + +GENERIC_LIBRARY_NAME=tesseract + +# Release versioning. Get versions from PACKAGE_VERSION. +AX_SPLIT_VERSION +GENERIC_MAJOR_VERSION=$(echo "$AX_MAJOR_VERSION" | $SED 's/^[[^0-9]]*//') +GENERIC_MINOR_VERSION=$AX_MINOR_VERSION +GENERIC_MICRO_VERSION=`echo "$AX_POINT_VERSION" | $SED 's/^\([[0-9]][[0-9]]*\).*/\1/'` + +# API version (often = GENERIC_MAJOR_VERSION.GENERIC_MINOR_VERSION) +GENERIC_API_VERSION=$GENERIC_MAJOR_VERSION.$GENERIC_MINOR_VERSION +GENERIC_LIBRARY_VERSION=$GENERIC_MAJOR_VERSION:$GENERIC_MINOR_VERSION +AC_SUBST([GENERIC_API_VERSION]) +AC_SUBST([GENERIC_MAJOR_VERSION]) +AC_SUBST([GENERIC_MINOR_VERSION]) +AC_SUBST([GENERIC_MICRO_VERSION]) + +AC_SUBST([GENERIC_LIBRARY_VERSION]) +PACKAGE=$GENERIC_LIBRARY_NAME +AC_SUBST([GENERIC_LIBRARY_NAME]) + +GENERIC_VERSION=$GENERIC_MAJOR_VERSION.$GENERIC_MINOR_VERSION.$GENERIC_MICRO_VERSION +GENERIC_RELEASE=$GENERIC_MAJOR_VERSION.$GENERIC_MINOR_VERSION +AC_SUBST([GENERIC_RELEASE]) +AC_SUBST([GENERIC_VERSION]) + +AC_CONFIG_HEADERS([config_auto.h:config/config.h.in]) + +# default conditional +AM_CONDITIONAL([T_WIN], false) +AM_CONDITIONAL([OSX], false) +AM_CONDITIONAL([GRAPHICS_DISABLED], false) +AC_SUBST([AM_CPPFLAGS]) + +OPENCL_INC="/opt/AMDAPP/include" +OPENCL_LIBS="-lOpenCL" +############################# +# +# Platform specific setup +# +############################# +AC_CANONICAL_HOST +case "${host_os}" in + mingw*) + AM_CONDITIONAL([T_WIN], true) + AM_CONDITIONAL([ADD_RT], false) + AC_SUBST([AM_LDFLAGS], ['-Wl,-no-undefined -Wl,--as-needed']) + ;; + cygwin*) + AM_CONDITIONAL([ADD_RT], false) + AC_SUBST([NOUNDEFINED], ['-no-undefined']) + ;; + solaris*) + LIBS="-lsocket -lnsl -lrt -lxnet" + AM_CONDITIONAL([ADD_RT], true) + ;; + *darwin*) + OPENCL_LIBS="" + OPENCL_INC="" + AM_CONDITIONAL([ADD_RT], false) + ;; + powerpc-*-darwin*) + OPENCL_LIBS="" + ;; + *) + # default + AM_CONDITIONAL([ADD_RT], true) + ;; +esac + +## Checks for supported compiler options. +AM_CONDITIONAL([AVX_OPT], false) +AM_CONDITIONAL([AVX2_OPT], false) +AM_CONDITIONAL([SSE41_OPT], false) + +AX_CHECK_COMPILE_FLAG([-mavx], [avx=true], [avx=false]) +if $avx; then + AM_CONDITIONAL([AVX_OPT], true) +fi + +AX_CHECK_COMPILE_FLAG([-mavx2], [avx2=true], [avx2=false]) +if $avx2; then + AM_CONDITIONAL([AVX2_OPT], true) +fi + +AX_CHECK_COMPILE_FLAG([-msse4.1], [sse41=true], [sse41=false]) +if $sse41; then + AM_CONDITIONAL([SSE41_OPT], true) +fi + +AC_ARG_WITH([extra-includes], + [AS_HELP_STRING([--with-extra-includes=DIR], + [Define an additional directory for include files])], + [if test -d "$withval" ; then + CFLAGS="$CFLAGS -I$withval" + else + AC_MSG_ERROR([Cannot stat directory $withval]) + fi]) + +AC_ARG_WITH([extra-libraries], + [AS_HELP_STRING([--with-extra-libraries=DIR], + [Define an additional directory for library files])], + [if test -d "$withval" ; then + LDFLAGS="$LDFLAGS -L$withval" + else + AC_MSG_ERROR([Cannot stat directory $withval]) + fi]) + +AC_MSG_CHECKING([--enable-graphics argument]) +AC_ARG_ENABLE([graphics], + AS_HELP_STRING([--disable-graphics], [disable graphics (ScrollView)])) +AC_MSG_RESULT([$enable_graphics]) +if test "$enable_graphics" = "no"; then + AC_DEFINE([GRAPHICS_DISABLED], [], [Disable graphics]) + AM_CONDITIONAL([GRAPHICS_DISABLED], true) +fi + +AC_MSG_CHECKING([--enable-legacy argument]) +AC_ARG_ENABLE([legacy], + AS_HELP_STRING([--disable-legacy], [disable the legacy OCR engine])) +AC_MSG_RESULT([$enable_legacy]) +AM_CONDITIONAL([DISABLED_LEGACY_ENGINE], test "$enable_legacy" = "no") + +# check whether to build embedded version +AC_MSG_CHECKING([--enable-embedded argument]) +AC_ARG_ENABLE([embedded], + AS_HELP_STRING([--enable-embedded], [enable embedded build [default=no]])) +AC_MSG_RESULT([$enable_embedded]) +AM_CONDITIONAL([EMBEDDED], [test "$enable_embedded" = "yes"]) +if test "$enable_embedded" = "yes"; then + AM_CPPFLAGS="-DEMBEDDED $AM_CPPFLAGS" +fi + +# check whether to build OpenMP support +AC_OPENMP + +have_tiff=false +# Note that the first usage of AC_CHECK_HEADERS must be unconditional. +AC_CHECK_HEADERS([tiffio.h], [have_tiff=true], [have_tiff=false]) + +# check whether to build opencl version +AC_MSG_CHECKING([--enable-opencl argument]) +AC_ARG_ENABLE([opencl], + AS_HELP_STRING([--enable-opencl], [enable opencl build [default=no]])) +AC_MSG_RESULT([$enable_opencl]) +# check for opencl header +have_opencl=false +if test "$enable_opencl" = "yes"; then + AC_CHECK_HEADERS([CL/cl.h], [have_opencl=true], [ + AC_CHECK_HEADERS(OpenCL/cl.h, [have_opencl=true], [have_opencl=false]) + ]) +fi + +# https://lists.apple.com/archives/unix-porting/2009/Jan/msg00026.html +m4_define([MY_CHECK_FRAMEWORK], + [AC_CACHE_CHECK([if -framework $1 works],[my_cv_framework_$1], + [save_LIBS="$LIBS" + LIBS="$LIBS -framework $1" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [my_cv_framework_$1=yes], + [my_cv_framework_$1=no]) + LIBS="$save_LIBS" + ]) + if test "$my_cv_framework_$1"="yes"; then + AC_DEFINE(AS_TR_CPP([HAVE_FRAMEWORK_$1]), 1, + [Define if you have the $1 framework]) + AS_TR_CPP([FRAMEWORK_$1])="-framework $1" + AC_SUBST(AS_TR_CPP([FRAMEWORK_$1])) + fi] +) + +have_opencl_lib=false +OPENCL_CPPFLAGS='' +OPENCL_LDFLAGS='' +case "${host_os}" in + *darwin* | *-macos10*) + echo "checking for OpenCL framework" + MY_CHECK_FRAMEWORK([OpenCL]) + if test $my_cv_framework_OpenCL = yes; then + have_opencl_lib=true + fi + if test "$enable_opencl" = "yes"; then + if !($have_opencl_lib); then + AC_MSG_ERROR([Required OpenCL library not found!]) + fi + AM_CPPFLAGS="-DUSE_OPENCL $AM_CPPFLAGS" + OPENCL_CPPFLAGS="" + OPENCL_LDFLAGS="-framework OpenCL" + fi + ;; + *) + # default + if test "$enable_opencl" = "yes"; then + AC_CHECK_LIB([OpenCL], [clGetPlatformIDs], + [have_opencl_lib=true], [have_opencl_lib=false]) + if !($have_opencl); then + AC_MSG_ERROR([Required OpenCL headers not found!]) + fi + if !($have_opencl_lib); then + AC_MSG_ERROR([Required OpenCL library not found!]) + fi + AM_CPPFLAGS="-DUSE_OPENCL $AM_CPPFLAGS" + OPENCL_CPPFLAGS="-I${OPENCL_INC}" + OPENCL_LDFLAGS="${OPENCL_LIBS}" + fi + ;; +esac +AM_CONDITIONAL([USE_OPENCL], [test "$enable_opencl" = "yes"]) +AC_SUBST([OPENCL_CPPFLAGS]) +AC_SUBST([OPENCL_LDFLAGS]) + +# check whether to build tesseract with -fvisibility=hidden -fvisibility-inlines-hidden +# http://gcc.gnu.org/wiki/Visibility +# http://groups.google.com/group/tesseract-dev/browse_thread/thread/976645ae98189127 +AC_MSG_CHECKING([--enable-visibility argument]) +AC_ARG_ENABLE([visibility], + AS_HELP_STRING([--enable-visibility], + [enable experimental build with -fvisibility [default=no]])) +AC_MSG_RESULT([$enable_visibility]) +AM_CONDITIONAL([VISIBILITY], [test "$enable_visibility" = "yes"]) + +# Check if tessdata-prefix is disabled +AC_MSG_CHECKING([whether to use tessdata-prefix]) +AC_ARG_ENABLE([tessdata-prefix], + [AS_HELP_STRING([--disable-tessdata-prefix], + [don't set TESSDATA-PREFIX during compile])], + [tessdata_prefix="no"], [tessdata_prefix="yes"]) +AC_MSG_RESULT([$tessdata_prefix]) +AM_CONDITIONAL([NO_TESSDATA_PREFIX], [test "$tessdata_prefix" = "no"]) + +# Check whether to enable debugging +AC_MSG_CHECKING([whether to enable debugging]) +AC_ARG_ENABLE([debug], + AS_HELP_STRING([--enable-debug], [turn on debugging [default=no]])) +AC_MSG_RESULT([$enable_debug]) +if test x"$enable_debug" = x"yes"; then + AM_CXXFLAGS="$AM_CXXFLAGS -g -Wall -O0 -DDEBUG" + AM_CPPFLAGS="$AM_CPPFLAGS -g -Wall -DDEBUG" +else + AM_CXXFLAGS="$AM_CXXFLAGS -O2 -DNDEBUG" + AM_CPPFLAGS="$AM_CPPFLAGS -DNDEBUG" +fi + +#localedir='${prefix}/share/locale' + +# Always look into a "gnu" directory. +curwd=`pwd` +if test -d $curwd/gnu/include ; then + CPPFLAGS="$CPPFLAGS -I$curwd/gnu/include" +fi +if test -d $curwd/gnu/lib ; then + LDFLAGS="$LDFLAGS -L$curwd/gnu/lib" +fi + +# ---------------------------------------- +# Additional checking of compiler characteristics +# ---------------------------------------- + +# Check Endianness. If Big Endian, this will define WORDS_BIGENDIAN +AC_C_BIGENDIAN + + +# ---------------------------------------- +# Init libtool +# ---------------------------------------- + +LT_INIT + + +# ---------------------------------------- +# C++ related options +# ---------------------------------------- + +AC_MSG_CHECKING([if compiling with clang]) +AC_COMPILE_IFELSE( +[AC_LANG_PROGRAM([], [[ +#ifndef __clang__ + not clang +#endif +]])], +[CLANG=yes], [CLANG=no]) + +AC_MSG_RESULT([$CLANG]) + +dnl ******************** +dnl turn on c++11 +dnl ******************** + +OLD_CXXFLAGS=$CXXFLAGS +AC_MSG_CHECKING([whether compiler supports C++11]) +CXXFLAGS="$CXXFLAGS -std=c++11" +snprintfworks=no +AC_COMPILE_IFELSE( +[ + AC_LANG_SOURCE([[ + #if (__cplusplus < 201103L) + #error C++ 11 is unsupported + #endif + ]]) +], [ + AC_MSG_RESULT(yes) + ], + [ + AC_MSG_RESULT(no) + AC_MSG_ERROR([Your compiler does not have the necessary c++11 support! Cannot proceed.]) + ]) +AC_CHECK_FUNCS([snprintf],, [snprintfworks=yes]) +CXXFLAGS="$OLD_CXXFLAGS" + + +# set c++11 support based on platform/compiler +case "${host_os}" in + cygwin*) + CXXFLAGS="$CXXFLAGS -std=gnu++11" + ;; + *-darwin* | *-macos10*) + if test "x$CLANG" = "xyes"; then + CXXFLAGS="$CXXFLAGS -std=c++11 " + LDFLAGS="$LDFLAGS -stdlib=libc++" + else + CXXFLAGS="$CXXFLAGS -std=c++11" + fi + ;; + *) + # default + CXXFLAGS="$CXXFLAGS -std=c++11" + ;; +esac + + +# ---------------------------------------- +# Check for libraries +# ---------------------------------------- + +AC_SEARCH_LIBS([sem_init], [pthread rt]) + + +# ---------------------------------------- +# Checks for header files. +# ---------------------------------------- + +AC_HEADER_STDC +AC_HEADER_TIME +AC_HEADER_SYS_WAIT +AC_CHECK_HEADERS([sys/ipc.h sys/shm.h]) +AC_CHECK_HEADERS([limits.h malloc.h]) +# Enable use of system-defined bool type if available: +AC_HEADER_STDBOOL + +# ---------------------------------------- +# Check for programs needed to build documentation. +# ---------------------------------------- + +AC_CHECK_PROG([have_asciidoc], asciidoc, true, false) +if $have_asciidoc; then + AM_CONDITIONAL([ASCIIDOC], true) +else + AM_CONDITIONAL([ASCIIDOC], false) +fi + +# ---------------------------------------- +# Checks for typedefs, structures, and compiler characteristics. +# ---------------------------------------- + +AC_CHECK_TYPES([wchar_t],,, [#include "wchar.h"]) +AC_CHECK_TYPES([long long int]) +AC_CHECK_TYPES([off_t],,, [#include "sys/types.h"]) +AC_CHECK_TYPES([mbstate_t],,, [#include "wchar.h"]) + +# ---------------------------------------- +# Test auxiliary packages +# ---------------------------------------- + +PKG_CHECK_MODULES([LEPTONICA], [lept >= 1.74], [have_lept=true], [have_lept=false]) +if $have_lept; then + CPPFLAGS="$CPPFLAGS $LEPTONICA_CFLAGS" +else + AC_MSG_ERROR([Leptonica 1.74 or higher is required. Try to install libleptonica-dev package.]) +fi + +AM_CONDITIONAL([ENABLE_TRAINING], true) + +# Check location of icu headers +PKG_CHECK_MODULES([ICU_UC], [icu-uc >= 52.1], [have_icu_uc=true], [have_icu_uc=false]) +PKG_CHECK_MODULES([ICU_I18N], [icu-i18n >= 52.1], [have_icu_i18n=true], [have_icu_i18n=false]) +if !($have_icu_uc && $have_icu_i18n); then + AC_CHECK_HEADERS([unicode/uchar.h], [have_icu=true], [have_icu=false]) + if !($have_icu); then + AC_MSG_WARN([icu 52.1 or higher is required, but was not found.]) + AC_MSG_WARN([Training tools WILL NOT be built.]) + AC_MSG_WARN([Try to install libicu-devel package.]) + AM_CONDITIONAL([ENABLE_TRAINING], false) + else + ICU_UC_LIBS="-licui18n -licuuc" + fi +fi + +# Check location of pango headers +PKG_CHECK_MODULES([pango], [pango >= 1.22.0], [have_pango=true], [have_pango=false]) +if !($have_pango); then + AC_MSG_WARN([pango 1.22.0 or higher is required, but was not found.]) + AC_MSG_WARN([Training tools WILL NOT be built.]) + AC_MSG_WARN([Try to install libpango1.0-dev package.]) + AM_CONDITIONAL([ENABLE_TRAINING], false) +else + CPPFLAGS="$CPPFLAGS $pango_CFLAGS" +fi + +# Check location of cairo headers +PKG_CHECK_MODULES([cairo], [cairo], [have_cairo=true], [have_cairo=false]) +if !($have_cairo); then + AC_MSG_WARN([Training tools WILL NOT be built because of missing cairo library.]) + AC_MSG_WARN([Try to install libcairo-dev?? package.]) + AM_CONDITIONAL([ENABLE_TRAINING], false) +else + CPPFLAGS="$CPPFLAGS $cairo_CFLAGS" +fi + + +# ---------------------------------------- +# Final Tasks and Output +# ---------------------------------------- + +# Output files +AC_CONFIG_FILES([Makefile tesseract.pc]) +AC_CONFIG_FILES([langtests/Makefile]) +AC_CONFIG_FILES([src/api/Makefile]) +AC_CONFIG_FILES([src/api/tess_version.h]) +AC_CONFIG_FILES([src/arch/Makefile]) +AC_CONFIG_FILES([src/ccmain/Makefile]) +AC_CONFIG_FILES([src/opencl/Makefile]) +AC_CONFIG_FILES([src/ccstruct/Makefile]) +AC_CONFIG_FILES([src/ccutil/Makefile]) +AC_CONFIG_FILES([src/classify/Makefile]) +AC_CONFIG_FILES([src/cutil/Makefile]) +AC_CONFIG_FILES([src/dict/Makefile]) +AC_CONFIG_FILES([src/lstm/Makefile]) +AC_CONFIG_FILES([src/textord/Makefile]) +AC_CONFIG_FILES([src/viewer/Makefile]) +AC_CONFIG_FILES([src/wordrec/Makefile]) +AC_CONFIG_FILES([tessdata/Makefile]) +AC_CONFIG_FILES([tessdata/configs/Makefile]) +AC_CONFIG_FILES([tessdata/tessconfigs/Makefile]) +AC_CONFIG_FILES([unlvtests/Makefile]) +AC_CONFIG_FILES([unittest/Makefile]) +AC_CONFIG_FILES([java/Makefile]) +AC_CONFIG_FILES([java/com/Makefile]) +AC_CONFIG_FILES([java/com/google/Makefile]) +AC_CONFIG_FILES([java/com/google/scrollview/Makefile]) +AC_CONFIG_FILES([java/com/google/scrollview/events/Makefile]) +AC_CONFIG_FILES([java/com/google/scrollview/ui/Makefile]) +AC_CONFIG_FILES([doc/Makefile]) +AM_COND_IF([ENABLE_TRAINING], [AC_CONFIG_FILES(src/training/Makefile)]) +AC_OUTPUT + +# Final message +echo "" +echo "Configuration is done." +echo "You can now build and install $PACKAGE_NAME by running:" +echo "" +echo "$ make" +echo "$ sudo make install" +echo "$ sudo ldconfig" +echo "" + +AM_COND_IF([ASCIIDOC], + [ + echo "This will also build the documentation." + ], [ + echo "Documentation will not be built because asciidoc is missing." + ] +) + +# echo "$ sudo make install LANGS=\"eng ara deu\"" +# echo " Or:" +# echo "$ sudo make install-langs" +echo "" + +AM_COND_IF([ENABLE_TRAINING], + [ + echo "Training tools can be built and installed with:" + echo "" + echo "$ make training" + echo "$ sudo make training-install" + echo ""], + [ + echo "You can not build training tools because of missing dependency." + echo "Check configure output for details." + echo ""] +) + +# ---------------------------------------- +# CONFIG Template +# ---------------------------------------- + +# Fence added in configuration file +AH_TOP([ +#ifndef CONFIG_AUTO_H +#define CONFIG_AUTO_H +/* config_auto.h: begin */ +]) + +# Stuff added at bottom of file +AH_BOTTOM([ + +/* Miscellaneous defines */ +#define AUTOCONF 1 + +/* Not used yet +#ifndef NO_GETTEXT +#define USING_GETTEXT +#endif +*/ + +/* config_auto.h: end */ +#endif +]) diff --git a/cppan.yml b/cppan.yml new file mode 100644 index 0000000..37a9a42 --- /dev/null +++ b/cppan.yml @@ -0,0 +1,280 @@ +local_settings: + #use_shared_libs: true + #short_local_names: true + #use_cache: false + #generator: Visual Studio 14 2015 Win64 + silent: false + #copy_import_libs: true + #build: + #c_flags: /W0 + #cxx_flags: /W0 + builds: + vs2017: + generator: Visual Studio 15 2017 + vs2017_64: + generator: Visual Studio 15 2017 Win64 + + dependencies: + pvt.cppan.demo.danbloomberg.leptonica: 1 + pvt.cppan.demo.unicode.icu.i18n: "*" + +root_project: pvt.cppan.demo.google.tesseract + +common_settings: + c++: 11 + + options: + any: + compile_options: + msvc: + private: + - /openmp + +projects: + libtesseract: + type: lib + export_all_symbols: true + files: + - src/api/tess_version.h.in + - src/api/.*\.cpp + - src/arch/.*\.cpp + - src/ccmain/.*\.cpp + - src/ccstruct/.*\.cpp + - src/ccutil/.*\.cpp + - src/classify/.*\.cpp + - src/cutil/.*\.cpp + - src/dict/.*\.cpp + - src/lstm/.*\.cpp + - src/opencl/.*\.cpp + - src/textord/.*\.cpp + - src/viewer/.*\.cpp + - src/wordrec/.*\.cpp + + - src/api/.*\.h + - src/arch/.*\.h + - src/ccmain/.*\.h + - src/ccstruct/.*\.h + - src/ccutil/.*\.h + - src/classify/.*\.h + - src/cutil/.*\.h + - src/dict/.*\.h + - src/lstm/.*\.h + - src/opencl/.*\.h + - src/textord/.*\.h + - src/viewer/.*\.h + - src/wordrec/.*\.h + + - src/vs2010/port/.* + + exclude_from_build: + - src/api/tesseractmain.cpp + - src/viewer/svpaint.cpp + + include_directories: + public: + #private: + - src/arch + - src/classify + - src/cutil + - src/ccutil + - src/dict + - src/lstm + - src/opencl + - src/textord + - src/vs2010/port + - src/viewer + - src/wordrec + #public: + - src/api + - src/ccmain + - src/ccstruct + - src/ccutil + + check_symbol_exists: + snprintf: stdio.h + + check_include_exists: + - dlfcn.h + - inttypes.h + - limits.h + - malloc.h + - memory.h + - stdbool.h + - stdint.h + - stdlib.h + - string.h + - sys/ipc.h + - sys/shm.h + - sys/stat.h + - sys/types.h + - sys/wait.h + - tiffio.h + - unistd.h + + check_type_size: + - long long int + - off_t + - mbstate_t + - wchar_t + - _Bool + + pre_sources: | + file_write_once(${BDIR}/config_auto.h "") + + post_sources: | + configure_file( + ${SDIR}/src/api/tess_version.h.in + ${BDIR}/tess_version.h @ONLY) + if (WIN32) + if (MSVC) + set_source_files_properties( + ${SDIR}/src/arch/dotproductsse.cpp + PROPERTIES COMPILE_DEFINITIONS __SSE4_1__) + set_source_files_properties( + ${SDIR}/src/arch/intsimdmatrixsse.cpp + PROPERTIES COMPILE_DEFINITIONS __SSE4_1__) + set_source_files_properties( + ${SDIR}/src/arch/dotproductavx.cpp + PROPERTIES COMPILE_FLAGS "/arch:AVX") + set_source_files_properties( + ${SDIR}/src/arch/intsimdmatrixavx2.cpp + PROPERTIES COMPILE_FLAGS "/arch:AVX2") + endif() + else() + remove_src_dir(src/vs2010/port/*) + endif() + + options: + any: + definitions: + public: + - HAVE_CONFIG_H + - _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS=1 + - WINDLLNAME="tesseract" + shared: + definitions: + private: + - TESS_EXPORTS + interface: + - TESS_IMPORTS + + dependencies: + pvt.cppan.demo.danbloomberg.leptonica: 1 + + tesseract: + files: src/api/tesseractmain.cpp + dependencies: + - libtesseract + + tessopt: + type: lib + static_only: true + files: src/training/tessopt.* + include_directories: training + dependencies: libtesseract + + common_training: + type: lib + static_only: true + files: + - src/training/commandlineflags.cpp + - src/training/commandlineflags.h + - src/training/commontraining.cpp + - src/training/commontraining.h + include_directories: training + dependencies: + - tessopt + + ambiguous_words: + files: src/training/ambiguous_words.cpp + dependencies: + - libtesseract + + classifier_tester: + files: src/training/classifier_tester.cpp + dependencies: common_training + + combine_lang_model: + files: src/training/combine_lang_model.cpp + dependencies: unicharset_training + + combine_tessdata: + files: src/training/combine_tessdata.cpp + dependencies: libtesseract + + cntraining: + files: src/training/cntraining.cpp + dependencies: common_training + + dawg2wordlist: + files: src/training/dawg2wordlist.cpp + dependencies: libtesseract + + mftraining: + files: + - src/training/mftraining.cpp + - src/training/mergenf.* + dependencies: common_training + + shapeclustering: + files: src/training/shapeclustering.cpp + dependencies: common_training + + unicharset_extractor: + files: src/training/unicharset_extractor.cpp + dependencies: unicharset_training + + wordlist2dawg: + files: src/training/wordlist2dawg.cpp + dependencies: libtesseract + + unicharset_training: + type: lib + static_only: true + files: + - src/training/fileio.* + - src/training/icuerrorcode.* + - src/training/lang_model_helpers.* + - src/training/lstmtester.* + - src/training/normstrngs.* + - src/training/unicharset_training_utils.* + - src/training/validat.* + include_directories: training + dependencies: + - common_training + - pvt.cppan.demo.unicode.icu.i18n + + lstmeval: + files: src/training/lstmeval.cpp + dependencies: unicharset_training + + lstmtraining: + files: src/training/lstmtraining.cpp + dependencies: unicharset_training + + set_unicharset_properties: + files: src/training/set_unicharset_properties.cpp + dependencies: unicharset_training + + text2image: + files: + - src/training/text2image.cpp + - src/training/boxchar.cpp + - src/training/boxchar.h + - src/training/degradeimage.cpp + - src/training/degradeimage.h + - src/training/ligature_table.cpp + - src/training/ligature_table.h + - src/training/normstrngs.cpp + - src/training/normstrngs.h + - src/training/pango_font_info.cpp + - src/training/pango_font_info.h + - src/training/stringrenderer.cpp + - src/training/stringrenderer.h + - src/training/tlog.cpp + - src/training/tlog.h + - src/training/util.h + + dependencies: + - unicharset_training + - pvt.cppan.demo.gnome.pango.pangocairo: 1 diff --git a/doc/Doxyfile b/doc/Doxyfile new file mode 100644 index 0000000..1eb12c0 --- /dev/null +++ b/doc/Doxyfile @@ -0,0 +1,2378 @@ +# Doxyfile 1.8.8 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = $(name) + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = $(version) + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify an logo or icon that is included in +# the documentation. The maximum height of the logo should not exceed 55 pixels +# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo +# to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = doc/ + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = YES + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = $(builddir) + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = YES + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a +# new page for each member. If set to NO, the documentation of a member will be +# part of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: +# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: +# Fortran. In the later case the parser tries to guess whether the code is fixed +# or free formatted code, this is the default for Fortran type files), VHDL. For +# instance to make doxygen treat .inc files as Fortran files (default is PHP), +# and .f files as C (default is Fortran), use: inc=Fortran f=C. +# +# Note For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by by putting a % sign in front of the word +# or globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = YES + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO these classes will be included in the various overviews. This option has +# no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO these declarations will be +# included in the documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. +# The default value is: system dependent. + +CASE_SENSE_NAMES = NO + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = YES + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the +# todo list. This list is created by putting \todo commands in the +# documentation. +# The default value is: YES. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the +# test list. This list is created by putting \test commands in the +# documentation. +# The default value is: YES. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES the list +# will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. See also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO doxygen will only warn about wrong or incomplete parameter +# documentation, but not about the absence of documentation. +# The default value is: NO. + +WARN_NO_PARAMDOC = YES + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). + +WARN_LOGFILE = $(builddir)/doc/DoxyWarn.log + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. +# Note: If this tag is empty the current directory is searched. + +INPUT = $(srcdir)/src + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank the +# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, +# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, +# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, +# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, +# *.qsf, *.as and *.js. + +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cpp \ + *.c++ \ + *.d \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.idl \ + *.odl \ + *.cs \ + *.php \ + *.php3 \ + *.inc \ + *.m \ + *.mm \ + *.dox \ + *.py \ + *.f90 \ + *.f \ + *.vhd \ + *.vhdl + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = ../src/vs2010 + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = */.svn/* + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER ) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = YES + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# function all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES, then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see http://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = NO + +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# cascading style sheets that are included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefor more robust against future updates. +# Doxygen will copy the style sheet files to the output directory. +# Note: The order of the extra stylesheet files is of importance (e.g. the last +# stylesheet in the list overrules the setting of the previous ones in the +# list). For an example see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the stylesheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to NO can help when comparing the output of multiple runs. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler ( hhc.exe). If non-empty +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated ( +# YES) or that it should be included in the master .chm file ( NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated ( +# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = YES + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# http://www.mathjax.org) which uses client side Javascript for the rendering +# instead of using prerendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = http://www.mathjax.org/mathjax + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /