Showing preview only (8,282K chars total). Download the full file or copy to clipboard to get everything.
Repository: tesseract-ocr/tesseract
Branch: main
Commit: eee0109c1148
Files: 725
Total size: 7.8 MB
Directory structure:
gitextract_b4jzl2xw/
├── .clang-format
├── .gitattributes
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── issue-bug.yml
│ │ └── issue-feature-request.yml
│ ├── copilot-instructions.md
│ ├── dependabot.yml
│ └── workflows/
│ ├── autotools-macos.yml
│ ├── autotools-openmp.yml
│ ├── autotools.yml
│ ├── cifuzz.yml
│ ├── cmake-win64.yml
│ ├── cmake.yml
│ ├── codeql-analysis.yml
│ ├── installer-for-windows.yml
│ ├── msys2.yml
│ ├── sw.yml
│ ├── unittest-disablelegacy.yml
│ ├── unittest-macos.yml
│ ├── unittest.yml
│ └── vcpkg.yml
├── .gitignore
├── .gitmodules
├── .mailmap
├── AUTHORS
├── CITATIONS.bib
├── CMakeLists.txt
├── CONTRIBUTING.md
├── ChangeLog
├── INSTALL
├── INSTALL.GIT.md
├── LICENSE
├── Makefile.am
├── README.md
├── VERSION
├── appveyor.yml
├── autogen.sh
├── cmake/
│ ├── BuildFunctions.cmake
│ ├── BuildOptimizations.cmake
│ ├── CheckFunctions.cmake
│ ├── Configure.cmake
│ ├── SourceGroups.cmake
│ ├── SourceLists.cmake
│ └── templates/
│ ├── TesseractConfig.cmake.in
│ └── cmake_uninstall.cmake.in
├── configure.ac
├── doc/
│ ├── Doxyfile
│ ├── ambiguous_words.1.asc
│ ├── classifier_tester.1.asc
│ ├── cntraining.1.asc
│ ├── combine_lang_model.1.asc
│ ├── combine_tessdata.1.asc
│ ├── dawg2wordlist.1.asc
│ ├── generate_manpages.sh
│ ├── lstmeval.1.asc
│ ├── lstmtraining.1.asc
│ ├── merge_unicharsets.1.asc
│ ├── mftraining.1.asc
│ ├── set_unicharset_properties.1.asc
│ ├── shapeclustering.1.asc
│ ├── tesseract.1.asc
│ ├── tesseract.natvis
│ ├── text2image.1.asc
│ ├── unicharambigs.5.asc
│ ├── unicharset.5.asc
│ ├── unicharset_extractor.1.asc
│ └── wordlist2dawg.1.asc
├── include/
│ └── tesseract/
│ ├── baseapi.h
│ ├── capi.h
│ ├── export.h
│ ├── ltrresultiterator.h
│ ├── ocrclass.h
│ ├── osdetect.h
│ ├── pageiterator.h
│ ├── publictypes.h
│ ├── renderer.h
│ ├── resultiterator.h
│ ├── unichar.h
│ └── version.h.in
├── java/
│ ├── Makefile.am
│ ├── Manifest.txt
│ └── com/
│ ├── Makefile.am
│ └── google/
│ ├── Makefile.am
│ └── scrollview/
│ ├── Makefile.am
│ ├── ScrollView.java
│ ├── events/
│ │ ├── Makefile.am
│ │ ├── SVEvent.java
│ │ ├── SVEventHandler.java
│ │ └── SVEventType.java
│ └── ui/
│ ├── Makefile.am
│ ├── SVAbstractMenuItem.java
│ ├── SVCheckboxMenuItem.java
│ ├── SVEmptyMenuItem.java
│ ├── SVImageHandler.java
│ ├── SVMenuBar.java
│ ├── SVMenuItem.java
│ ├── SVPopupMenu.java
│ ├── SVSubMenuItem.java
│ └── SVWindow.java
├── nsis/
│ ├── Makefile.am
│ ├── build.sh
│ ├── find_deps.py
│ ├── include/
│ │ └── EnvVarUpdate.nsh
│ ├── tesseract.nsi
│ └── winpath.cpp
├── snap/
│ └── snapcraft.yaml
├── src/
│ ├── api/
│ │ ├── altorenderer.cpp
│ │ ├── baseapi.cpp
│ │ ├── capi.cpp
│ │ ├── hocrrenderer.cpp
│ │ ├── lstmboxrenderer.cpp
│ │ ├── pagerenderer.cpp
│ │ ├── pdf_ttf.h
│ │ ├── pdfrenderer.cpp
│ │ ├── renderer.cpp
│ │ └── wordstrboxrenderer.cpp
│ ├── arch/
│ │ ├── dotproduct.cpp
│ │ ├── dotproduct.h
│ │ ├── dotproductavx.cpp
│ │ ├── dotproductavx512.cpp
│ │ ├── dotproductfma.cpp
│ │ ├── dotproductneon.cpp
│ │ ├── dotproductsse.cpp
│ │ ├── intsimdmatrix.cpp
│ │ ├── intsimdmatrix.h
│ │ ├── intsimdmatrixavx2.cpp
│ │ ├── intsimdmatrixneon.cpp
│ │ ├── intsimdmatrixrvv.cpp
│ │ ├── intsimdmatrixsse.cpp
│ │ ├── simddetect.cpp
│ │ └── simddetect.h
│ ├── ccmain/
│ │ ├── adaptions.cpp
│ │ ├── applybox.cpp
│ │ ├── control.cpp
│ │ ├── control.h
│ │ ├── docqual.cpp
│ │ ├── docqual.h
│ │ ├── equationdetect.cpp
│ │ ├── equationdetect.h
│ │ ├── fixspace.cpp
│ │ ├── fixspace.h
│ │ ├── fixxht.cpp
│ │ ├── linerec.cpp
│ │ ├── ltrresultiterator.cpp
│ │ ├── mutableiterator.cpp
│ │ ├── mutableiterator.h
│ │ ├── osdetect.cpp
│ │ ├── output.cpp
│ │ ├── output.h
│ │ ├── pageiterator.cpp
│ │ ├── pagesegmain.cpp
│ │ ├── pagewalk.cpp
│ │ ├── par_control.cpp
│ │ ├── paragraphs.cpp
│ │ ├── paragraphs.h
│ │ ├── paragraphs_internal.h
│ │ ├── paramsd.cpp
│ │ ├── paramsd.h
│ │ ├── pgedit.cpp
│ │ ├── pgedit.h
│ │ ├── recogtraining.cpp
│ │ ├── reject.cpp
│ │ ├── reject.h
│ │ ├── resultiterator.cpp
│ │ ├── superscript.cpp
│ │ ├── tessbox.cpp
│ │ ├── tessedit.cpp
│ │ ├── tesseractclass.cpp
│ │ ├── tesseractclass.h
│ │ ├── tessvars.cpp
│ │ ├── tessvars.h
│ │ ├── tfacepp.cpp
│ │ ├── thresholder.cpp
│ │ ├── thresholder.h
│ │ ├── werdit.cpp
│ │ └── werdit.h
│ ├── ccstruct/
│ │ ├── blamer.cpp
│ │ ├── blamer.h
│ │ ├── blobbox.cpp
│ │ ├── blobbox.h
│ │ ├── blobs.cpp
│ │ ├── blobs.h
│ │ ├── blread.cpp
│ │ ├── blread.h
│ │ ├── boxread.cpp
│ │ ├── boxread.h
│ │ ├── boxword.cpp
│ │ ├── boxword.h
│ │ ├── ccstruct.cpp
│ │ ├── ccstruct.h
│ │ ├── coutln.cpp
│ │ ├── coutln.h
│ │ ├── crakedge.h
│ │ ├── debugpixa.h
│ │ ├── detlinefit.cpp
│ │ ├── detlinefit.h
│ │ ├── dppoint.cpp
│ │ ├── dppoint.h
│ │ ├── fontinfo.cpp
│ │ ├── fontinfo.h
│ │ ├── image.cpp
│ │ ├── image.h
│ │ ├── imagedata.cpp
│ │ ├── imagedata.h
│ │ ├── linlsq.cpp
│ │ ├── linlsq.h
│ │ ├── matrix.cpp
│ │ ├── matrix.h
│ │ ├── mod128.cpp
│ │ ├── mod128.h
│ │ ├── normalis.cpp
│ │ ├── normalis.h
│ │ ├── ocrblock.cpp
│ │ ├── ocrblock.h
│ │ ├── ocrpara.cpp
│ │ ├── ocrpara.h
│ │ ├── ocrrow.cpp
│ │ ├── ocrrow.h
│ │ ├── otsuthr.cpp
│ │ ├── otsuthr.h
│ │ ├── pageres.cpp
│ │ ├── pageres.h
│ │ ├── params_training_featdef.cpp
│ │ ├── params_training_featdef.h
│ │ ├── pdblock.cpp
│ │ ├── pdblock.h
│ │ ├── points.cpp
│ │ ├── points.h
│ │ ├── polyaprx.cpp
│ │ ├── polyaprx.h
│ │ ├── polyblk.cpp
│ │ ├── polyblk.h
│ │ ├── quadlsq.cpp
│ │ ├── quadlsq.h
│ │ ├── quadratc.h
│ │ ├── quspline.cpp
│ │ ├── quspline.h
│ │ ├── ratngs.cpp
│ │ ├── ratngs.h
│ │ ├── rect.cpp
│ │ ├── rect.h
│ │ ├── rejctmap.cpp
│ │ ├── rejctmap.h
│ │ ├── seam.cpp
│ │ ├── seam.h
│ │ ├── split.cpp
│ │ ├── split.h
│ │ ├── statistc.cpp
│ │ ├── statistc.h
│ │ ├── stepblob.cpp
│ │ ├── stepblob.h
│ │ ├── werd.cpp
│ │ └── werd.h
│ ├── ccutil/
│ │ ├── ambigs.cpp
│ │ ├── ambigs.h
│ │ ├── bitvector.cpp
│ │ ├── bitvector.h
│ │ ├── ccutil.cpp
│ │ ├── ccutil.h
│ │ ├── clst.h
│ │ ├── elst.h
│ │ ├── elst2.h
│ │ ├── errcode.cpp
│ │ ├── errcode.h
│ │ ├── fileerr.h
│ │ ├── genericheap.h
│ │ ├── genericvector.h
│ │ ├── helpers.h
│ │ ├── host.h
│ │ ├── indexmapbidi.cpp
│ │ ├── indexmapbidi.h
│ │ ├── kdpair.h
│ │ ├── lsterr.h
│ │ ├── object_cache.h
│ │ ├── params.cpp
│ │ ├── params.h
│ │ ├── qrsequence.h
│ │ ├── scanutils.cpp
│ │ ├── scanutils.h
│ │ ├── serialis.cpp
│ │ ├── serialis.h
│ │ ├── sorthelper.h
│ │ ├── tessdatamanager.cpp
│ │ ├── tessdatamanager.h
│ │ ├── tesserrstream.h
│ │ ├── tesstypes.h
│ │ ├── tprintf.cpp
│ │ ├── tprintf.h
│ │ ├── unichar.cpp
│ │ ├── unicharcompress.cpp
│ │ ├── unicharcompress.h
│ │ ├── unicharmap.cpp
│ │ ├── unicharmap.h
│ │ ├── unicharset.cpp
│ │ ├── unicharset.h
│ │ ├── unicity_table.h
│ │ └── universalambigs.h
│ ├── classify/
│ │ ├── adaptive.cpp
│ │ ├── adaptive.h
│ │ ├── adaptmatch.cpp
│ │ ├── blobclass.cpp
│ │ ├── classify.cpp
│ │ ├── classify.h
│ │ ├── cluster.cpp
│ │ ├── cluster.h
│ │ ├── clusttool.cpp
│ │ ├── clusttool.h
│ │ ├── cutoffs.cpp
│ │ ├── featdefs.cpp
│ │ ├── featdefs.h
│ │ ├── float2int.cpp
│ │ ├── float2int.h
│ │ ├── fpoint.cpp
│ │ ├── fpoint.h
│ │ ├── intfeaturespace.cpp
│ │ ├── intfeaturespace.h
│ │ ├── intfx.cpp
│ │ ├── intfx.h
│ │ ├── intmatcher.cpp
│ │ ├── intmatcher.h
│ │ ├── intproto.cpp
│ │ ├── intproto.h
│ │ ├── kdtree.cpp
│ │ ├── kdtree.h
│ │ ├── mf.cpp
│ │ ├── mf.h
│ │ ├── mfdefs.h
│ │ ├── mfoutline.cpp
│ │ ├── mfoutline.h
│ │ ├── mfx.cpp
│ │ ├── mfx.h
│ │ ├── normfeat.cpp
│ │ ├── normfeat.h
│ │ ├── normmatch.cpp
│ │ ├── normmatch.h
│ │ ├── ocrfeatures.cpp
│ │ ├── ocrfeatures.h
│ │ ├── outfeat.cpp
│ │ ├── outfeat.h
│ │ ├── picofeat.cpp
│ │ ├── picofeat.h
│ │ ├── protos.cpp
│ │ ├── protos.h
│ │ ├── shapeclassifier.cpp
│ │ ├── shapeclassifier.h
│ │ ├── shapetable.cpp
│ │ ├── shapetable.h
│ │ ├── tessclassifier.cpp
│ │ ├── tessclassifier.h
│ │ ├── trainingsample.cpp
│ │ └── trainingsample.h
│ ├── cutil/
│ │ ├── bitvec.h
│ │ ├── oldlist.cpp
│ │ └── oldlist.h
│ ├── dict/
│ │ ├── context.cpp
│ │ ├── dawg.cpp
│ │ ├── dawg.h
│ │ ├── dawg_cache.cpp
│ │ ├── dawg_cache.h
│ │ ├── dict.cpp
│ │ ├── dict.h
│ │ ├── hyphen.cpp
│ │ ├── matchdefs.h
│ │ ├── permdawg.cpp
│ │ ├── stopper.cpp
│ │ ├── stopper.h
│ │ ├── trie.cpp
│ │ └── trie.h
│ ├── lstm/
│ │ ├── convolve.cpp
│ │ ├── convolve.h
│ │ ├── fullyconnected.cpp
│ │ ├── fullyconnected.h
│ │ ├── functions.cpp
│ │ ├── functions.h
│ │ ├── generate_lut.py
│ │ ├── input.cpp
│ │ ├── input.h
│ │ ├── lstm.cpp
│ │ ├── lstm.h
│ │ ├── lstmrecognizer.cpp
│ │ ├── lstmrecognizer.h
│ │ ├── maxpool.cpp
│ │ ├── maxpool.h
│ │ ├── network.cpp
│ │ ├── network.h
│ │ ├── networkio.cpp
│ │ ├── networkio.h
│ │ ├── networkscratch.h
│ │ ├── parallel.cpp
│ │ ├── parallel.h
│ │ ├── plumbing.cpp
│ │ ├── plumbing.h
│ │ ├── recodebeam.cpp
│ │ ├── recodebeam.h
│ │ ├── reconfig.cpp
│ │ ├── reconfig.h
│ │ ├── reversed.cpp
│ │ ├── reversed.h
│ │ ├── series.cpp
│ │ ├── series.h
│ │ ├── static_shape.h
│ │ ├── stridemap.cpp
│ │ ├── stridemap.h
│ │ ├── weightmatrix.cpp
│ │ └── weightmatrix.h
│ ├── svpaint.cpp
│ ├── tesseract.cpp
│ ├── textord/
│ │ ├── alignedblob.cpp
│ │ ├── alignedblob.h
│ │ ├── baselinedetect.cpp
│ │ ├── baselinedetect.h
│ │ ├── bbgrid.cpp
│ │ ├── bbgrid.h
│ │ ├── blkocc.cpp
│ │ ├── blkocc.h
│ │ ├── blobgrid.cpp
│ │ ├── blobgrid.h
│ │ ├── ccnontextdetect.cpp
│ │ ├── ccnontextdetect.h
│ │ ├── cjkpitch.cpp
│ │ ├── cjkpitch.h
│ │ ├── colfind.cpp
│ │ ├── colfind.h
│ │ ├── colpartition.cpp
│ │ ├── colpartition.h
│ │ ├── colpartitiongrid.cpp
│ │ ├── colpartitiongrid.h
│ │ ├── colpartitionset.cpp
│ │ ├── colpartitionset.h
│ │ ├── devanagari_processing.cpp
│ │ ├── devanagari_processing.h
│ │ ├── drawtord.cpp
│ │ ├── drawtord.h
│ │ ├── edgblob.cpp
│ │ ├── edgblob.h
│ │ ├── edgloop.cpp
│ │ ├── edgloop.h
│ │ ├── equationdetectbase.cpp
│ │ ├── equationdetectbase.h
│ │ ├── fpchop.cpp
│ │ ├── fpchop.h
│ │ ├── gap_map.cpp
│ │ ├── gap_map.h
│ │ ├── imagefind.cpp
│ │ ├── imagefind.h
│ │ ├── linefind.cpp
│ │ ├── linefind.h
│ │ ├── makerow.cpp
│ │ ├── makerow.h
│ │ ├── oldbasel.cpp
│ │ ├── oldbasel.h
│ │ ├── pithsync.cpp
│ │ ├── pithsync.h
│ │ ├── pitsync1.cpp
│ │ ├── pitsync1.h
│ │ ├── scanedg.cpp
│ │ ├── scanedg.h
│ │ ├── sortflts.cpp
│ │ ├── sortflts.h
│ │ ├── strokewidth.cpp
│ │ ├── strokewidth.h
│ │ ├── tabfind.cpp
│ │ ├── tabfind.h
│ │ ├── tablefind.cpp
│ │ ├── tablefind.h
│ │ ├── tablerecog.cpp
│ │ ├── tablerecog.h
│ │ ├── tabvector.cpp
│ │ ├── tabvector.h
│ │ ├── textlineprojection.cpp
│ │ ├── textlineprojection.h
│ │ ├── textord.cpp
│ │ ├── textord.h
│ │ ├── topitch.cpp
│ │ ├── topitch.h
│ │ ├── tordmain.cpp
│ │ ├── tordmain.h
│ │ ├── tospace.cpp
│ │ ├── tovars.cpp
│ │ ├── tovars.h
│ │ ├── underlin.cpp
│ │ ├── underlin.h
│ │ ├── wordseg.cpp
│ │ ├── wordseg.h
│ │ ├── workingpartset.cpp
│ │ └── workingpartset.h
│ ├── training/
│ │ ├── CMakeLists.txt
│ │ ├── ambiguous_words.cpp
│ │ ├── classifier_tester.cpp
│ │ ├── cntraining.cpp
│ │ ├── combine_lang_model.cpp
│ │ ├── combine_tessdata.cpp
│ │ ├── common/
│ │ │ ├── commandlineflags.cpp
│ │ │ ├── commandlineflags.h
│ │ │ ├── commontraining.cpp
│ │ │ ├── commontraining.h
│ │ │ ├── ctc.cpp
│ │ │ ├── ctc.h
│ │ │ ├── errorcounter.cpp
│ │ │ ├── errorcounter.h
│ │ │ ├── export.h
│ │ │ ├── intfeaturedist.cpp
│ │ │ ├── intfeaturedist.h
│ │ │ ├── intfeaturemap.cpp
│ │ │ ├── intfeaturemap.h
│ │ │ ├── mastertrainer.cpp
│ │ │ ├── mastertrainer.h
│ │ │ ├── networkbuilder.cpp
│ │ │ ├── networkbuilder.h
│ │ │ ├── sampleiterator.cpp
│ │ │ ├── sampleiterator.h
│ │ │ ├── trainingsampleset.cpp
│ │ │ └── trainingsampleset.h
│ │ ├── dawg2wordlist.cpp
│ │ ├── degradeimage.cpp
│ │ ├── degradeimage.h
│ │ ├── lstmeval.cpp
│ │ ├── lstmtraining.cpp
│ │ ├── merge_unicharsets.cpp
│ │ ├── mergenf.cpp
│ │ ├── mergenf.h
│ │ ├── mftraining.cpp
│ │ ├── pango/
│ │ │ ├── boxchar.cpp
│ │ │ ├── boxchar.h
│ │ │ ├── export.h
│ │ │ ├── ligature_table.cpp
│ │ │ ├── ligature_table.h
│ │ │ ├── pango_font_info.cpp
│ │ │ ├── pango_font_info.h
│ │ │ ├── stringrenderer.cpp
│ │ │ ├── stringrenderer.h
│ │ │ ├── tlog.cpp
│ │ │ └── tlog.h
│ │ ├── set_unicharset_properties.cpp
│ │ ├── shapeclustering.cpp
│ │ ├── text2image.cpp
│ │ ├── unicharset/
│ │ │ ├── export.h
│ │ │ ├── fileio.cpp
│ │ │ ├── fileio.h
│ │ │ ├── icuerrorcode.cpp
│ │ │ ├── icuerrorcode.h
│ │ │ ├── lang_model_helpers.cpp
│ │ │ ├── lang_model_helpers.h
│ │ │ ├── lstmtester.cpp
│ │ │ ├── lstmtester.h
│ │ │ ├── lstmtrainer.cpp
│ │ │ ├── lstmtrainer.h
│ │ │ ├── normstrngs.cpp
│ │ │ ├── normstrngs.h
│ │ │ ├── unicharset_training_utils.cpp
│ │ │ ├── unicharset_training_utils.h
│ │ │ ├── validate_grapheme.cpp
│ │ │ ├── validate_grapheme.h
│ │ │ ├── validate_indic.cpp
│ │ │ ├── validate_indic.h
│ │ │ ├── validate_javanese.cpp
│ │ │ ├── validate_javanese.h
│ │ │ ├── validate_khmer.cpp
│ │ │ ├── validate_khmer.h
│ │ │ ├── validate_myanmar.cpp
│ │ │ ├── validate_myanmar.h
│ │ │ ├── validator.cpp
│ │ │ └── validator.h
│ │ ├── unicharset_extractor.cpp
│ │ └── wordlist2dawg.cpp
│ ├── viewer/
│ │ ├── scrollview.cpp
│ │ ├── scrollview.h
│ │ ├── svmnode.cpp
│ │ ├── svmnode.h
│ │ ├── svutil.cpp
│ │ └── svutil.h
│ └── wordrec/
│ ├── associate.cpp
│ ├── associate.h
│ ├── chop.cpp
│ ├── chop.h
│ ├── chopper.cpp
│ ├── drawfx.cpp
│ ├── drawfx.h
│ ├── findseam.cpp
│ ├── findseam.h
│ ├── gradechop.cpp
│ ├── language_model.cpp
│ ├── language_model.h
│ ├── lm_consistency.cpp
│ ├── lm_consistency.h
│ ├── lm_pain_points.cpp
│ ├── lm_pain_points.h
│ ├── lm_state.cpp
│ ├── lm_state.h
│ ├── outlines.cpp
│ ├── outlines.h
│ ├── params_model.cpp
│ ├── params_model.h
│ ├── pieces.cpp
│ ├── plotedges.cpp
│ ├── plotedges.h
│ ├── render.cpp
│ ├── render.h
│ ├── segsearch.cpp
│ ├── tface.cpp
│ ├── wordclass.cpp
│ ├── wordrec.cpp
│ └── wordrec.h
├── sw.cpp
├── tessdata/
│ ├── Makefile.am
│ ├── configs/
│ │ ├── Makefile.am
│ │ ├── alto
│ │ ├── ambigs.train
│ │ ├── api_config
│ │ ├── bazaar
│ │ ├── bigram
│ │ ├── box.train
│ │ ├── box.train.stderr
│ │ ├── digits
│ │ ├── get.images
│ │ ├── hocr
│ │ ├── inter
│ │ ├── kannada
│ │ ├── linebox
│ │ ├── logfile
│ │ ├── lstm.train
│ │ ├── lstmbox
│ │ ├── lstmdebug
│ │ ├── makebox
│ │ ├── page
│ │ ├── pdf
│ │ ├── quiet
│ │ ├── rebox
│ │ ├── strokewidth
│ │ ├── tsv
│ │ ├── txt
│ │ ├── unlv
│ │ └── wordstrbox
│ ├── eng.user-patterns
│ ├── eng.user-words
│ └── tessconfigs/
│ ├── Makefile.am
│ ├── batch
│ ├── batch.nochop
│ ├── matdemo
│ ├── msdemo
│ ├── nobatch
│ └── segdemo
├── tesseract.pc.cmake
├── tesseract.pc.in
└── unittest/
├── CMakeLists.txt
├── README.md
├── apiexample_test.cc
├── applybox_test.cc
├── baseapi_test.cc
├── baseapi_thread_test.cc
├── bitvector_test.cc
├── capiexample_c_test.c
├── capiexample_test.cc
├── cleanapi_test.cc
├── colpartition_test.cc
├── commandlineflags_test.cc
├── cycletimer.h
├── dawg_test.cc
├── denorm_test.cc
├── doubleptr.h
├── equationdetect_test.cc
├── fileio_test.cc
├── fuzzers/
│ ├── fuzzer-api.cpp
│ └── oss-fuzz-build.sh
├── heap_test.cc
├── imagedata_test.cc
├── include_gunit.h
├── indexmapbidi_test.cc
├── intfeaturemap_test.cc
├── intsimdmatrix_test.cc
├── lang_model_test.cc
├── layout_test.cc
├── ligature_table_test.cc
├── linlsq_test.cc
├── list_test.cc
├── loadlang_test.cc
├── log.h
├── lstm_recode_test.cc
├── lstm_squashed_test.cc
├── lstm_test.cc
├── lstm_test.h
├── lstmtrainer_test.cc
├── mastertrainer_test.cc
├── matrix_test.cc
├── networkio_test.cc
├── normstrngs_test.cc
├── normstrngs_test.h
├── nthitem_test.cc
├── osd_test.cc
├── pagesegmode_test.cc
├── pango_font_info_test.cc
├── paragraphs_test.cc
├── params_model_test.cc
├── progress_test.cc
├── qrsequence_test.cc
├── recodebeam_test.cc
├── rect_test.cc
├── resultiterator_test.cc
├── scanutils_test.cc
├── shapetable_test.cc
├── stats_test.cc
├── stridemap_test.cc
├── stringrenderer_test.cc
├── syntaxnet/
│ └── base.h
├── tablefind_test.cc
├── tablerecog_test.cc
├── tabvector_test.cc
├── tatweel_test.cc
├── tesseract_leaksanitizer.supp
├── textlineprojection_test.cc
├── tfile_test.cc
├── third_party/
│ └── utf/
│ ├── rune.c
│ └── utf.h
├── unichar_test.cc
├── unicharcompress_test.cc
├── unicharset_test.cc
├── util/
│ └── utf8/
│ ├── unicodetext.cc
│ ├── unicodetext.h
│ ├── unilib.cc
│ ├── unilib.h
│ └── unilib_utf8_utils.h
├── validate_grapheme_test.cc
├── validate_indic_test.cc
├── validate_khmer_test.cc
├── validate_myanmar_test.cc
└── validator_test.cc
================================================
FILE CONTENTS
================================================
================================================
FILE: .clang-format
================================================
BasedOnStyle: Google
# Modifications for Tesseract.
# Only merge empty functions.
AllowShortFunctionsOnASingleLine: Empty
# Do not allow short if statements.
AllowShortIfStatementsOnASingleLine: false
IndentPPDirectives: AfterHash
# Default style for some settings.
AccessModifierOffset: -2
AllowShortLoopsOnASingleLine: false
# Enforce always the same pointer alignment.
DerivePointerAlignment: false
IncludeBlocks: Preserve
PointerAlignment: Right
SpacesBeforeTrailingComments: 1
================================================
FILE: .gitattributes
================================================
* text=auto
================================================
FILE: .github/ISSUE_TEMPLATE/issue-bug.yml
================================================
name: Bug Report
description: File a bug report
body:
- type: markdown
attributes:
value: |
### Attention
Before you submit an issue, please review [the guidelines for this repository](https://github.com/tesseract-ocr/tesseract/blob/main/CONTRIBUTING.md).
Have a question? Need help?
Please use [our forum](https://groups.google.com/g/tesseract-ocr).
Please follow these rules:
* Check that your Operating Systems is [supported](https://tesseract-ocr.github.io/tessdoc/supported-operating-systems.html).
* Don't open an issue for [Tesseract version which was released more than a year ago](https://tesseract-ocr.github.io/tessdoc/ReleaseNotes.html).
* Don't open an issue which involves 3rd party tools that use Tesseract as a library. Only report about an issue with the Tesseract command line tool or the C/C++ API.
* Please provide the input image.
* Also provide output files (txt and/or tsv, hocr, pdf). You can make a zip archive that will contain these files, so GitHub will let you upload them.
* Don't attach a screenshot of the command line and output. Instead, copy the text and paste it in your bug report.
- type: textarea
attributes:
label: Current Behavior
- type: textarea
attributes:
label: Expected Behavior
- type: textarea
attributes:
label: Suggested Fix
- type: textarea
attributes:
label: tesseract -v
description: Version info, compiled libraries, SIMD, OpenMP
placeholder: "Please paste the output of the command: tesseract -v"
- type: dropdown
id: os-linux
attributes:
label: Operating System
description: Choose the OS where the bug occurs
multiple: true
options:
- Windows 11
- Windows 10
- macOS 26 Tahoe
- macOS 15 Sequoia
- macOS 14 Sonoma
- Ubuntu 24.04 Noble
- Ubuntu 22.04 Jammy
- Debian 13 Trixie
- Debian 12 Bookworm
- RHEL 10
- RHEL 9
- type: textarea
attributes:
label: Other Operating System
placeholder: Enter the name and version of the OS
- type: textarea
attributes:
label: uname -a
placeholder: "Paste the output of the command: uname -a (if available in your system)."
- type: textarea
attributes:
label: Compiler
placeholder: "Enter compiler name and version (Examples: MSVC 2019 16.11, Clang 13.0.1, GCC 11.2, Xcode 14.1)"
- type: textarea
attributes:
label: CPU
placeholder: "Enter your CPU vendor name and model (Examples: Intel Core i7-11700K, AMD Ryzen 7 5800X, Apple Silicon M1)"
- type: textarea
attributes:
label: Virtualization / Containers
placeholder: "Enter the name and version of the VM / container which you use (Examples: Oracle VM VirtualBox 7.0.4,VMware Workstation 17.0, Hyper-V, Docker 20.10.22)"
- type: textarea
attributes:
label: Other Information
placeholder: Add more details here.
================================================
FILE: .github/ISSUE_TEMPLATE/issue-feature-request.yml
================================================
name: Feature Request
description: File a feature request
body:
- type: textarea
attributes:
label: Your Feature Request
description: Please look first at the [open issues labeled as 'feature request'](https://github.com/tesseract-ocr/tesseract/labels/feature%20request).
================================================
FILE: .github/copilot-instructions.md
================================================
# Tesseract OCR - GitHub Copilot Instructions
## Repository Overview
Tesseract is an open-source **OCR (Optical Character Recognition) engine** that recognizes text from images. This repository contains:
- **libtesseract**: C++ OCR library with C API wrapper
- **tesseract**: Command-line OCR program
- **Training tools**: For creating custom language models
**Key Facts:**
- Primary language: **C++17** (requires C++17-compliant compiler)
- Size: Large (~100MB+ with submodules)
- License: Apache 2.0
- Maintained by: Stefan Weil (lead), Zdenko Podobny (maintainer)
## Build Systems
Tesseract supports **two build systems**. Both are actively maintained and tested in CI.
### 1. Autotools (Traditional, POSIX Systems)
**When to use:** Linux, macOS (command-line), MSYS2 on Windows
**Build sequence:**
```bash
./autogen.sh # Generate configure script (only needed after git clone)
./configure # Configure build (creates Makefiles)
make # Build library and CLI
sudo make install # Install to system
sudo ldconfig # Update library cache (Linux only)
make training # Build training tools (optional)
sudo make training-install # Install training tools
```
**Important:**
- ALWAYS run `./autogen.sh` first if building from git clone
- Use `make -j N` for parallel builds (N = number of CPU cores)
- Check `configure --help` for build options
- To clean: `make clean` or `make distclean` (complete cleanup)
### 2. CMake (Modern, Cross-platform)
**When to use:** Windows (MSVC, MinGW), cross-platform, modern development
**Build sequence:**
```bash
mkdir build # MUST use out-of-source build
cd build
cmake .. # Configure (add options here)
make # Or: cmake --build .
sudo make install # Install to system
```
**Important CMake options:**
- `BUILD_TRAINING_TOOLS=ON` - Enable training tools build
- `CMAKE_BUILD_TYPE=Release` - Release build (default is RelWithDebInfo)
- `GRAPHICS_DISABLED=ON` - Disable ScrollView (GUI debugger)
- `ENABLE_NATIVE=OFF` - Disable CPU-specific optimizations (for portability)
**CMake enforces out-of-source builds** - you cannot build in the source directory. If you get an error about this, remove `CMakeCache.txt` and build in a separate directory.
## Dependencies
### Core Required Dependencies
- **Leptonica 1.74.2+** (REQUIRED) - Image I/O library
- Without this, build will fail
- Usually installed via package manager: `libleptonica-dev` (Ubuntu) or `leptonica` (Homebrew)
- **C++17 compiler:**
- GCC 7+, Clang 5+, MSVC 2017+
- Verified compilers: gcc-11, gcc-12, gcc-14, clang-15, clang++
### Training Tools Dependencies
Only needed if building training tools (`make training` or `-DBUILD_TRAINING_TOOLS=ON`):
- pango-devel / libpango1.0-dev
- cairo-devel
- icu-devel
### Optional Dependencies
- **libarchive-dev**, **libcurl4-openssl-dev** - For advanced features
- **OpenMP** - For parallel processing (enabled by default if available)
- **cabextract** - For testing with CAB archives
### Traineddata Files
Tesseract requires **traineddata files** to function. Minimum required:
- `eng.traineddata` (English)
- `osd.traineddata` (Orientation and Script Detection)
**Installation:**
```bash
# Download individual files (to /usr/local/share/tessdata/ or your TESSDATA_PREFIX path)
cd /usr/local/share/tessdata/ # Or wherever you want to install
wget https://github.com/tesseract-ocr/tessdata/raw/main/eng.traineddata
wget https://github.com/tesseract-ocr/tessdata/raw/main/osd.traineddata
# Or clone all languages (WARNING: 1.2+ GB)
git clone https://github.com/tesseract-ocr/tessdata.git
```
**Set environment variable:**
```bash
export TESSDATA_PREFIX=/usr/local/share/tessdata/
```
Verify with: `tesseract --list-langs`
## Testing
### Running Unit Tests
**With autotools:**
```bash
./autogen.sh
./configure
make
make check # Runs all unit tests
```
**With CMake:**
```bash
mkdir build && cd build
cmake ..
make
ctest # Or: cmake --build . --target test
```
**Important:**
- Tests require `googletest` submodule: `git submodule update --init --recursive`
- Tests require tessdata files (eng, osd minimum)
- Test results in `test-suite.log` (autotools) or CTest output (CMake)
### Running Tesseract CLI
Basic test commands:
```bash
# After installation:
tesseract --version
tesseract --list-langs
tesseract input.png output # OCR image, creates output.txt
tesseract input.png output pdf # Create searchable PDF
```
Test files available in `test/testing/` (requires test submodule):
- `phototest.tif` - English test image
- `devatest.png` - Hindi/Devanagari test image (different format intentional)
## Project Structure
### Source Code Layout
```
src/
├── api/ # Public C/C++ API (baseapi.h, capi.h)
├── ccmain/ # Main OCR control logic
├── lstm/ # LSTM neural network engine (Tesseract 4+)
├── ccutil/, cutil/ # Core utilities, data structures
├── classify/ # Character classifier
├── dict/ # Dictionary and language model
├── textord/ # Text line and word detection
├── wordrec/ # Word recognition
├── training/ # Training tools (lstmtraining, text2image, etc.)
└── tesseract.cpp # CLI main() entry point
include/tesseract/ # Public header files
unittest/ # Unit tests (requires googletest)
test/testing/ # Test images and data
tessdata/ # Default location for traineddata files
doc/ # Documentation
```
### Key Files
- **src/api/baseapi.h** - Main C++ API class (`TessBaseAPI`)
- **src/api/capi.h** - C wrapper API
- **src/tesseract.cpp** - Command-line tool
- **CMakeLists.txt**, **configure.ac**, **Makefile.am** - Build configuration
- **VERSION** - Current version string
### Configuration Files
- **.clang-format** - Code formatting rules (LLVM style)
- **tesseract.pc.in** - pkg-config template
- **.github/workflows/** - CI/CD definitions
## CI/CD Workflows
### Active Workflows
1. **cmake.yml** - CMake builds on Ubuntu/macOS, 6 configurations
2. **autotools.yml** - Autotools builds, comprehensive testing
3. **unittest.yml** - Unit tests with sanitizers (ASAN, UBSAN)
4. **codeql-analysis.yml** - Security static analysis
5. **vcpkg.yml**, **msys2.yml**, **cmake-win64.yml** - Windows builds
### Validation Requirements
All PRs trigger:
- **Build tests** on multiple platforms (Ubuntu 22.04, 24.04, macOS 14, 15)
- **Compiler tests** (GCC 11-14, Clang 15)
- **Unit tests** with sanitizers
- **CodeQL** security scan
**Expect ~10-30 minutes** for full CI validation.
### Common CI Failures
- **Missing dependencies:** Check workflow files for required packages
- **Test failures:** Often due to missing tessdata files
- **Sanitizer errors:** Memory leaks, undefined behavior
- **CodeQL alerts:** Security vulnerabilities in code
## Common Build Issues & Workarounds
### Issue: "configure: error: Leptonica not found"
**Solution:** Install leptonica development package
```bash
# Ubuntu/Debian:
sudo apt-get install libleptonica-dev
# macOS:
brew install leptonica
```
### Issue: "CMake Error: cannot build in source directory"
**Solution:** CMake requires out-of-source builds
```bash
rm -f CMakeCache.txt
mkdir build && cd build && cmake ..
```
### Issue: "make check" fails with "cannot find tessdata"
**Solution:** Set TESSDATA_PREFIX or download files
```bash
export TESSDATA_PREFIX=/usr/local/share/tessdata/
# Or copy files to /usr/local/share/tessdata/
```
### Issue: Submodule errors (googletest, test)
**Solution:** Initialize submodules
```bash
git submodule update --init --recursive
```
### Issue: Old Tesseract version conflicts
**Solution:** Remove previous installation before building
```bash
# Find installed files:
which tesseract
pkg-config --modversion tesseract
# Uninstall old version, then rebuild
```
### Issue: Training tools not building
**Solution:** Install pango, cairo, icu dependencies
```bash
sudo apt-get install libpango1.0-dev libcairo2-dev libicu-dev
```
## Validation Steps for Code Changes
When making code changes, follow these steps:
1. **Build the project** (choose one):
```bash
# Autotools:
./autogen.sh && ./configure && make
# CMake:
mkdir build && cd build && cmake .. && make
```
2. **Run unit tests**:
```bash
# Autotools:
make check
# CMake:
ctest
```
3. **Test CLI manually**:
```bash
tesseract test/testing/phototest.tif output
cat output.txt # Verify OCR output
```
4. **Check for memory issues** (if modifying C++ code):
```bash
# Build with sanitizers:
CXXFLAGS="-g -O2 -fsanitize=address,undefined" ./configure
make && make check
```
5. **Run CodeQL** (security check):
- Will run automatically in CI
- Or use GitHub Code Scanning locally
6. **Verify documentation** (if API changes):
- Update header comments in `include/tesseract/`
- Update relevant docs in `doc/`
## Code Style & Conventions
- **Formatting:** Use clang-format with `.clang-format` config (LLVM style)
- **Naming:**
- Classes: `CamelCase` (e.g., `TessBaseAPI`)
- Functions: `CamelCase` (e.g., `ProcessPage`)
- Variables: `snake_case` or `lower_case`
- **Headers:** Use include guards, document public APIs
- **Comments:** Focus on "why", not "what"
- **Commits:** Use meaningful messages, reference issue numbers
## Important Notes for AI Coding Agents
1. **Always use out-of-source builds with CMake** - in-source builds are blocked
2. **Check for Leptonica** before building - it's a hard requirement
3. **Initialize git submodules** before running tests
4. **Set TESSDATA_PREFIX** or tests will fail
5. **Building takes time** - allow 2-5 minutes for full build
6. **Testing takes time** - `make check` can take 5-10 minutes
7. **Don't remove existing tests** - they're critical for preventing regressions
8. **Check CI workflows** for platform-specific requirements
9. **Sanitizer builds are slower** - 2-3x slower than normal builds
10. **Training tools are optional** - only build if needed for the task
## Useful Commands Reference
```bash
# Quick build and test (autotools):
./autogen.sh && ./configure && make -j8 && make check
# Quick build and test (CMake):
mkdir build && cd build && cmake .. && make -j8 && ctest
# Format code:
find src -name '*.cpp' -o -name '*.h' | xargs clang-format -i
# Check test results:
cat test-suite.log # autotools
ctest --output-on-failure # CMake
# Install only library (no training):
make install # After ./configure && make
# Clean builds:
make clean # Partial clean
make distclean # Complete clean (autotools)
rm -rf build # Complete clean (CMake)
# Check installed version:
tesseract --version
pkg-config --modversion tesseract
# Debug OCR on specific image:
tesseract input.png output -l eng --psm 6 -c debug_file=/dev/null
```
---
**Trust these instructions.** Only search for additional information if these instructions are incomplete, outdated, or if you encounter an error not covered here. The workflows and build procedures are tested daily in CI and represent current best practices for this repository.
================================================
FILE: .github/dependabot.yml
================================================
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
================================================
FILE: .github/workflows/autotools-macos.yml
================================================
name: autotools-macos
# autotools build of tesseract and training tools on macos homebrew and macports.
# run command line tests, basicapitest and unittests. '--disable-openmp'
on:
#push:
schedule:
- cron: 0 20 * * *
workflow_dispatch:
jobs:
brew:
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- { name: macos-latest-clang-autotools, os: macos-latest, cxx: clang++ }
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Get fonts, tessdata and langdata required for unit tests
run: |
git clone https://github.com/egorpugin/tessdata tessdata_unittest
cp tessdata_unittest/fonts/* test/testing/
mv tessdata_unittest/* ../
- name: Install dependencies
run: |
brew install autoconf automake cabextract libtool
brew install leptonica libarchive pango
if ! brew list icu4c &>/dev/null; then
brew install icu4c
fi
if ! brew list curl &>/dev/null; then
brew install curl
fi
- name: Setup Tesseract
run: |
./autogen.sh
- name: Configure Tesseract
run: |
./configure '--disable-shared' '--disable-openmp' '--disable-doc' '--with-pic' 'CXX=${{ matrix.config.cxx }}' 'CXXFLAGS=-g -O2'
- name: Make and Install Tesseract
run: |
make -j 8
sudo make install install
- name: Make and Install Training Tools
run: |
make training -j 8
sudo make install training-install
- name: Make and run Unit Tests (clang)
if: startsWith(matrix.config.cxx, 'clang')
run: |
make check
- name: Make and run Unit Tests (unset LANG needed for g++-8, g++-9, g++-10 on macOS)
if: startsWith(matrix.config.cxx, 'g')
shell: bash
run: |
unset LANG LC_ALL LC_CTYPE
locale
make check
- name: Display Version for tesseract, lstmtraining, text2image
run: |
tesseract -v
lstmtraining -v
text2image -v
if: success() || failure()
- name: List languages in different test tessdata-dir
run: |
tesseract --list-langs --tessdata-dir ../tessdata
tesseract --list-langs --tessdata-dir ../tessdata_best
tesseract --list-langs --tessdata-dir ../tessdata_fast
- name: Run Tesseract on test images in different languages
run: |
tesseract test/testing/phototest.tif - --oem 1 --tessdata-dir ../tessdata
tesseract test/testing/raaj.tif - -l hin --oem 1 --tessdata-dir ../tessdata
tesseract test/testing/viet.tif - -l vie --oem 1 --tessdata-dir ../tessdata
tesseract test/testing/hebrew.png - -l heb --oem 1 --tessdata-dir ../tessdata
tesseract test/testing/eurotext.tif - -l fra --oem 1 --tessdata-dir ../tessdata_best
tesseract test/testing/arabic.tif - -l ara --oem 1 --psm 6 --tessdata-dir ../tessdata
- name: Run Tesseract basicapitest
run: |
export "PKG_CONFIG_PATH=/usr/local/lib/pkgconfig"
cd test
${{ matrix.config.cxx }} -o basicapitest testing/basicapitest.cpp $(pkg-config --cflags --libs tesseract lept) -pthread -std=c++17 -framework accelerate
./basicapitest
- name: Display Compiler Version
run: |
${{ matrix.config.cxx }} --version
git log -3 --pretty=format:'%h %ad %s | %an'
if: always()
- name: Display Unit Tests Report
run: |
cat test-suite.log
if: always()
# ============================================================================================
ports:
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- { name: macos-latest-clang-autotools, os: macos-latest, cxx: clang++ }
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Get fonts, tessdata and langdata required for tests
run: |
git clone https://github.com/egorpugin/tessdata tessdata_unittest
cp tessdata_unittest/fonts/* test/testing/
mv tessdata_unittest/* ../
- name: Install Macports
run: |
curl -sSLO https://raw.githubusercontent.com/GiovanniBussi/macports-ci/master/macports-ci; source ./macports-ci install
# --remove-brew does not remove the Homebrew entries in bin,
# so remove them now.
rm -v $(brew --prefix)/bin/*
- name: Install Dependencies
run: |
sudo port install autoconf automake libtool pkgconfig
sudo port install leptonica
sudo port install cairo pango
sudo port install icu +devel
sudo port install cabextract libarchive curl
- name: Setup Tesseract
run: |
./autogen.sh
- name: Configure Tesseract
run: |
./configure '--disable-shared' '--disable-openmp' '--disable-doc' '--with-pic' 'CXX=${{ matrix.config.cxx }}' 'CXXFLAGS=-g -O2'
- name: Make and Install Tesseract
run: |
make -j 8
sudo make install install
- name: Make and Install Training Tools
run: |
make training -j 8
sudo make install training-install
- name: Make and run Unit Tests (clang)
if: startsWith(matrix.config.cxx, 'clang')
run: |
make check
- name: Display Version for tesseract, lstmtraining, text2image
run: |
tesseract -v
lstmtraining -v
text2image -v
if: success() || failure()
- name: List languages in different test tessdata-dir
run: |
tesseract --list-langs --tessdata-dir ../tessdata
tesseract --list-langs --tessdata-dir ../tessdata_best
tesseract --list-langs --tessdata-dir ../tessdata_fast
- name: Run Tesseract on test images in different languages
run: |
tesseract test/testing/phototest.tif - --oem 1 --tessdata-dir ../tessdata
tesseract test/testing/raaj.tif - -l hin --oem 1 --tessdata-dir ../tessdata
tesseract test/testing/viet.tif - -l vie --oem 1 --tessdata-dir ../tessdata
tesseract test/testing/hebrew.png - -l heb --oem 1 --tessdata-dir ../tessdata
tesseract test/testing/eurotext.tif - -l fra --oem 1 --tessdata-dir ../tessdata_best
tesseract test/testing/arabic.tif - -l ara --oem 1 --psm 6 --tessdata-dir ../tessdata
- name: Run Tesseract basicapitest
run: |
export "PKG_CONFIG_PATH=/usr/local/lib/pkgconfig"
cd test
${{ matrix.config.cxx }} -o basicapitest testing/basicapitest.cpp -I/opt/local/include -L/opt/local/lib $(pkg-config --cflags --libs tesseract lept) -pthread -std=c++17 -framework Accelerate
./basicapitest
- name: Display Compiler Version
run: |
${{ matrix.config.cxx }} --version
git log -3 --pretty=format:'%h %ad %s | %an'
if: always()
- name: Display Unit Tests Report
run: |
cat test-suite.log
if: always()
================================================
FILE: .github/workflows/autotools-openmp.yml
================================================
name: autotools-openmp
# autotools on Ubuntu - run benchmark test. '--enable-openmp' no training tools
on:
#push:
#schedule:
# - cron: 0 20 * * *
workflow_dispatch:
jobs:
linux:
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- { name: 24.04-openmp, os: ubuntu-24.04 }
- { name: 22.04-openmp, os: ubuntu-22.04 }
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Download fonts, tessdata and langdata required for tests
run: |
git clone https://github.com/egorpugin/tessdata tessdata_unittest
cp tessdata_unittest/fonts/* test/testing/
mv tessdata_unittest/* ../
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install autoconf libleptonica-dev -y
sudo apt-get install libpango1.0-dev -y
sudo apt-get install cabextract libarchive-dev -y
sudo apt-get install libcurl4-openssl-dev libcurl4 curl -y
- name: Setup Tesseract
run: |
./autogen.sh
- name: Configure Tesseract
run: |
./configure '--disable-shared' '--enable-openmp' '--disable-doc' 'CXX=g++' 'CXXFLAGS=-g -O2'
grep -i OpenMP config.log
- name: Make and Install Tesseract
run: |
make
sudo make install
- name: Setup for Tesseract benchmark using image from issue 263 fifteen times in a list file
run: |
wget -O i263_speed.jpg https://cloud.githubusercontent.com/assets/9968625/13674495/ac261db4-e6ab-11e5-9b4a-ad91d5b4ff87.jpg
printf 'i263_speed.jpg\n%.0s' {1..15} > benchmarks.list
- name: Run Tesseract using image from issue 263 with tessdata_fast
run: |
lscpu
free
g++ --version
tesseract -v
time tesseract benchmarks.list - --tessdata-dir ../tessdata_fast > /dev/null 2>&1
echo "tessdata_fast"
- name: Run Tesseract using image from issue 263 with tessdata_fast and OpenMP Thread Limit
run: |
for lmt in {1..3}; do
time OMP_THREAD_LIMIT=$lmt tesseract benchmarks.list - --tessdata-dir ../tessdata_fast > /dev/null 2>&1 && echo "OMP_THREAD_LIMIT=" $lmt "tessdata_fast"
done
- name: Run Tesseract using image from issue 263 with tessdata_best and OpenMP Thread Limit
run: |
for lmt in {1..3}; do
time OMP_THREAD_LIMIT=$lmt tesseract benchmarks.list - --tessdata-dir ../tessdata_best > /dev/null 2>&1 && echo "OMP_THREAD_LIMIT=" $lmt "tessdata_best"
done
- name: Run Tesseract using image from issue 263 with tessdata and OpenMP Thread Limit
run: |
for lmt in {1..3}; do
time OMP_THREAD_LIMIT=$lmt tesseract benchmarks.list - --tessdata-dir ../tessdata > /dev/null 2>&1 && echo "OMP_THREAD_LIMIT=" $lmt "tessdata"
done
================================================
FILE: .github/workflows/autotools.yml
================================================
name: autotools
# autotools build of tesseract and training tools on Ubuntu.
# run command line tests, basicapitest and unittests. '--disable-openmp'
on:
#push:
schedule:
- cron: 0 20 * * *
jobs:
linux:
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- { name: ubuntu-22.04-clang-15-autotools, os: ubuntu-22.04, cxx: clang++-15 } #installed
- { name: ubuntu-24.04-gcc-14-autotools, os: ubuntu-24.04, cxx: g++-14 } #installed
- { name: ubuntu-22.04-gcc-12-autotools, os: ubuntu-22.04, cxx: g++-12 } #installed
- { name: ubuntu-22.04-gcc-11-autotools, os: ubuntu-22.04, cxx: g++-11 } #installed
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Download fonts, tessdata and langdata required for tests
run: |
git clone https://github.com/egorpugin/tessdata tessdata_unittest
cp tessdata_unittest/fonts/* test/testing/
mv tessdata_unittest/* ../
- name: Install Compiler
run: |
sudo apt-get update
sudo apt-get install -y ${{ matrix.config.cxx }}
- name: Install dependencies
run: |
sudo apt-get install autoconf libleptonica-dev -y
sudo apt-get install libpango1.0-dev -y
sudo apt-get install cabextract libarchive-dev -y
sudo apt-get install libcurl4-openssl-dev libcurl4 curl -y
- name: Setup Tesseract
run: |
./autogen.sh
- name: Configure Tesseract
run: |
./configure '--disable-shared' '--disable-openmp' '--disable-doc' 'CXX=${{ matrix.config.cxx }}' 'CXXFLAGS=-g -O2'
- name: Make and Install Tesseract
run: |
make -j 8
sudo make install install
- name: Make and Install Training Tools
run: |
make training -j 8
sudo make install training-install
- name: Make and run Unit Tests
run: |
make check
- name: Display Version for tesseract, lstmtraining, text2image
run: |
tesseract -v
lstmtraining -v
text2image -v
if: success() || failure()
- name: List languages in different test tessdata-dir
run: |
tesseract --list-langs --tessdata-dir ../tessdata
tesseract --list-langs --tessdata-dir ../tessdata_best
tesseract --list-langs --tessdata-dir ../tessdata_fast
- name: Run Tesseract on test images in different languages
run: |
tesseract test/testing/phototest.tif - --oem 1 --tessdata-dir ../tessdata
tesseract test/testing/raaj.tif - -l hin --oem 1 --tessdata-dir ../tessdata
tesseract test/testing/viet.tif - -l vie --oem 1 --tessdata-dir ../tessdata
tesseract test/testing/hebrew.png - -l heb --oem 1 --tessdata-dir ../tessdata
tesseract test/testing/eurotext.tif - -l fra --oem 1 --tessdata-dir ../tessdata_best
tesseract test/testing/arabic.tif - -l ara --oem 1 --psm 6 --tessdata-dir ../tessdata
- name: Run Tesseract basicapitest
run: |
export "PKG_CONFIG_PATH=/usr/local/lib/pkgconfig"
cd test
${{ matrix.config.cxx }} -o basicapitest testing/basicapitest.cpp -I/usr/local/include -L/usr/local/lib `pkg-config --cflags --libs tesseract lept ` -pthread -std=c++17
./basicapitest
- name: Setup for Tesseract benchmark using image from issue 263 fifteen times in a list file
run: |
wget -O i263_speed.jpg https://cloud.githubusercontent.com/assets/9968625/13674495/ac261db4-e6ab-11e5-9b4a-ad91d5b4ff87.jpg
printf 'i263_speed.jpg\n%.0s' {1..15} > benchmarks.list
lscpu
free
tesseract -v
- name: Run Tesseract using image from issue 263 with tessdata_fast
run: |
time tesseract benchmarks.list - --tessdata-dir ../tessdata_fast > /dev/null 2>&1
echo "tessdata_fast - disable-openmp"
- name: Run Tesseract using image from issue 263 with tessdata_best
run: |
time tesseract benchmarks.list - --tessdata-dir ../tessdata_best > /dev/null 2>&1
echo "tessdata_best - disable-openmp"
- name: Run Tesseract using image from issue 263 with tessdata_fast
run: |
time tesseract benchmarks.list - --tessdata-dir ../tessdata > /dev/null 2>&1
echo "tessdata - disable-openmp"
- name: Display Compiler Version
run: |
${{ matrix.config.cxx }} --version
git log -3 --pretty=format:'%h %ad %s | %an'
if: always()
- name: Display Unit Tests Report
run: |
cat test-suite.log
if: always()
================================================
FILE: .github/workflows/cifuzz.yml
================================================
name: CIFuzz
# OSS-Fuzz CI
# See https://google.github.io/oss-fuzz/getting-started/continuous-integration/
on:
pull_request:
branches:
- main
paths:
- '**.cpp'
- '**.h'
jobs:
Fuzzing:
runs-on: ubuntu-latest
steps:
- name: Build Fuzzers
id: build
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with:
oss-fuzz-project-name: 'tesseract-ocr'
language: c++
dry-run: false
- name: Run Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
with:
oss-fuzz-project-name: 'tesseract-ocr'
fuzz-seconds: 600
dry-run: false
- name: Upload Crash
uses: actions/upload-artifact@v7
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts
path: ./out/artifacts
================================================
FILE: .github/workflows/cmake-win64.yml
================================================
# Based on https://github.com/zdenop/tesserocr/actions/runs/691257659/workflow
# Build Tesseract on Windows using cmake. No Training Tools.
name: cmake-win64
on:
push:
paths:
- cmake/**
- '**/CMakeLists.txt'
pull_request:
types: [opened, reopened, synchronize]
paths:
- cmake/**
- '**/CMakeLists.txt'
schedule:
- cron: 0 5 * * *
workflow_dispatch:
env:
ILOC: d:/a/local
png_ver: 1651
jobs:
build:
name: cmake-win64
runs-on: windows-latest
steps:
- uses: ilammy/setup-nasm@v1
- uses: microsoft/setup-msbuild@v2
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v6
with:
submodules: recursive
- run: git fetch --prune --unshallow --tags
- name: Get the version
id: get_version
continue-on-error: true
run: |
$git_info=$(git describe --tags HEAD)
$stamp=$(date +'%Y-%m-%d_%H%M%S')
echo "version=${git_info}" >> $env:GITHUB_OUTPUT
echo "stamp=${stamp}" >> $env:GITHUB_OUTPUT
- name: Setup Installation Location
run: |
mkdir ${{env.ILOC}}
#- name: Uninstall Perl
# run: |
# choco uninstall strawberryperl
- name: Build and Install zlib-ng
shell: cmd
run: |
git clone --depth 1 https://github.com/zlib-ng/zlib-ng.git
cd zlib-ng
cmake -Bbuild -DCMAKE_PREFIX_PATH=${{env.ILOC}} -DCMAKE_INSTALL_PREFIX=${{env.ILOC}} -DBUILD_SHARED_LIBS=OFF -DZLIB_COMPAT=ON -DZLIB_ENABLE_TESTS=OFF -DINSTALL_UTILS=OFF
cmake --build build --target install
cd ..
- name: Build and Install libpng
shell: cmd
run: |
curl -sSL -o lpng${{env.png_ver}}.zip https://download.sourceforge.net/libpng/lpng${{env.png_ver}}.zip
unzip.exe -qq lpng${{env.png_ver}}.zip
cd lpng${{env.png_ver}}
cmake -Bbuild -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_PREFIX_PATH=${{env.ILOC}} -DCMAKE_INSTALL_PREFIX=${{env.ILOC}} -DPNG_TESTS=OFF -DPNG_SHARED=OFF
cmake --build build --target install
cd ..
- name: Build and Install libjpeg
shell: cmd
run: |
git clone --depth 1 https://github.com/libjpeg-turbo/libjpeg-turbo.git
cd libjpeg-turbo
cmake -Bbuild -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_PREFIX_PATH=${{env.ILOC}} -DCMAKE_INSTALL_PREFIX=${{env.ILOC}} -DWITH_TURBOJPEG=OFF -DENABLE_SHARED=OFF
cmake --build build --target install
cd ..
- name: Build and Install jbigkit
shell: cmd
run: |
git clone --depth 1 https://github.com/zdenop/jbigkit.git
cd jbigkit
cmake -Bbuild -DCMAKE_PREFIX_PATH=${{env.ILOC}} -DCMAKE_INSTALL_PREFIX=${{env.ILOC}} -DBUILD_PROGRAMS=OFF -DBUILD_TOOLS=OFF -DCMAKE_WARN_DEPRECATED=OFF
cmake --build build --target install
cd ..
- name: Build and Install libtiff
shell: cmd
run: |
git clone -c advice.detachedHead=false -b "v4.7.1" --depth 1 https://gitlab.com/libtiff/libtiff.git
cd libtiff
cmake -Bbuild -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_PREFIX_PATH=${{env.ILOC}} -DCMAKE_INSTALL_PREFIX=${{env.ILOC}} -Dtiff-tools=OFF -Dtiff-tests=OFF -Dtiff-contrib=OFF -Dtiff-docs=OFF
cmake --build build --target install
cd ..
- name: Build and Install leptonica
shell: cmd
run: |
echo "Building leptonica..."
git clone --depth 1 https://github.com/DanBloomberg/leptonica.git
cd leptonica
cmake -Bbuild -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_PREFIX_PATH=${{env.ILOC}} -DCMAKE_INSTALL_PREFIX=${{env.ILOC}} -DSW_BUILD=OFF -DBUILD_PROG=OFF -DBUILD_SHARED_LIBS=ON
cmake --build build --target install
- name: Remove not needed tools Before building tesseract
shell: cmd
run: >
rm -Rf ${{env.ILOC}}/bin/*.exe
- name: Build and Install tesseract
shell: cmd
run: |
cmake -Bbuild -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_PREFIX_PATH=${{env.ILOC}} -DCMAKE_INSTALL_PREFIX=${{env.ILOC}} -DSW_BUILD=OFF -DBUILD_SHARED_LIBS=ON -DENABLE_LTO=ON -DBUILD_TRAINING_TOOLS=OFF -DFAST_FLOAT=ON -DGRAPHICS_DISABLED=ON -DOPENMP_BUILD=OFF
cmake --build build --target install
- name: Upload Build Results
uses: actions/upload-artifact@v7
with:
name: tesseract-${{ steps.get_version.outputs.version }}-${{steps.get_version.outputs.stamp}}-VS2019_win64
path: ${{env.ILOC}}
retention-days: 5
- name: Display Tesseract Version and Test Command Line Usage
shell: cmd
run: |
curl -sSL https://github.com/tesseract-ocr/tessdata/raw/main/eng.traineddata --output ${{env.ILOC}}/share/tessdata/eng.traineddata
curl -sSL https://github.com/tesseract-ocr/tessdata/raw/main/osd.traineddata --output ${{env.ILOC}}/share/tessdata/osd.traineddata
echo "Setting TESSDATA_PREFIX..."
set TESSDATA_PREFIX=${{env.ILOC}}/share/tessdata
echo "Setting PATH..."
set PATH=${{env.ILOC}}/bin;%PATH%
echo "Checking installed tesseract version..."
tesseract -v
echo "Checking installed langs"
tesseract --list-langs
echo "Checking OCR process"
tesseract test/testing/phototest.tif -
================================================
FILE: .github/workflows/cmake.yml
================================================
name: cmake
# cmake build of tesseract and training tools on ubuntu and macOS homebrew using Ninja.
# test command line version of tesseract. run basicapitest.
on:
push:
paths:
- cmake/**
- '**/CMakeLists.txt'
pull_request:
paths:
- cmake/**
- '**/CMakeLists.txt'
schedule:
- cron: 0 21 * * *
workflow_dispatch:
jobs:
basictests:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- { name: macos-14-clang-15-cmake, os: macos-14, cxx: clang++ } # default
- { name: macos-15-gcc-14-cmake, os: macos-15, cxx: g++ } #installed
- { name: macos-15-clang-cmake, os: macos-15, cxx: clang++ } # default
- { name: ubuntu-22.04-clang-15-cmake, os: ubuntu-22.04, cxx: clang++-15 } #installed
- { name: ubuntu-24.04-gcc-12-cmake, os: ubuntu-24.04, cxx: g++-14 } #installed
- { name: ubuntu-22.04-gcc-12-cmake, os: ubuntu-22.04, cxx: g++-12 } #installed
steps:
- name: Install compilers on Linux
run: |
sudo apt-get update
sudo apt-get install ${{ matrix.config.cxx }} -y
if: runner.os == 'Linux'
- name: Install dependencies on Linux
run: |
sudo apt-get install autoconf libleptonica-dev -y
sudo apt-get install libarchive-dev libcurl4-openssl-dev -y
sudo apt-get install libpango1.0-dev -y
sudo apt-get install cabextract -y
sudo apt-get install ninja-build -y
cmake --version
if: runner.os == 'Linux'
- name: Install dependencies on macOS
run: |
brew install autoconf automake
brew install leptonica
# if ! brew list libarchive &>/dev/null; then
# brew install libarchive
# fi
brew install pango
if ! brew list icu4c &>/dev/null; then
brew install icu4c
fi
if ! brew list curl &>/dev/null; then
brew install curl
fi
brew install cabextract
ninja --version
cmake --version
clang++ --version
g++ --version
if: runner.os == 'macOS'
- name: Checkout Source
uses: actions/checkout@v6
with:
submodules: recursive
- name: Configure Tesseract (Linux)
run: |
mkdir build
mkdir inst
cmake \
-S . \
-B build \
-G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DOPENMP_BUILD=OFF \
-DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
-DCMAKE_INSTALL_PREFIX:PATH=inst
if: runner.os == 'Linux'
- name: Configure Tesseract (macOS)
shell: bash
run: |
set -e
mkdir build
mkdir inst
cmake \
-S . \
-B build \
-G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DOPENMP_BUILD=OFF \
-DENABLE_UNITY_BUILD=ON \
-DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
-DCMAKE_INSTALL_PREFIX:PATH=inst
if: runner.os == 'macOS'
- name: Build Tesseract
run: |
cmake --build build --config Release --target install
- name: Display Tesseract Version
run: |
build/inst/bin/tesseract -v
- name: Display Training Tools Version
run: |
build/inst/bin/lstmtraining -v
build/inst/bin/text2image -v
- name: Download fonts, tessdata and langdata required for tests
run: |
git clone https://github.com/egorpugin/tessdata tessdata_unittest
cp tessdata_unittest/fonts/* test/testing/
mv tessdata_unittest/* ../
- name: List languages in different tessdata-dir
run: |
build/inst/bin/tesseract --list-langs --tessdata-dir ../tessdata
build/inst/bin/tesseract --list-langs --tessdata-dir ../tessdata_best
build/inst/bin/tesseract --list-langs --tessdata-dir ../tessdata_fast
- name: Run Tesseract on test images in different languages
run: |
build/inst/bin/tesseract test/testing/phototest.tif - --oem 1 --tessdata-dir ../tessdata
build/inst/bin/tesseract test/testing/raaj.tif - -l hin --oem 1 --tessdata-dir ../tessdata
build/inst/bin/tesseract test/testing/viet.tif - -l vie --oem 1 --tessdata-dir ../tessdata
build/inst/bin/tesseract test/testing/hebrew.png - -l heb --oem 1 --tessdata-dir ../tessdata
build/inst/bin/tesseract test/testing/eurotext.tif - -l fra --oem 1 --tessdata-dir ../tessdata_best
build/inst/bin/tesseract test/testing/arabic.tif - -l ara --oem 1 --psm 6 --tessdata-dir ../tessdata
- name: Build and run basicapitest (Linux)
run: |
export "PKG_CONFIG_PATH=$GITHUB_WORKSPACE/build/inst/lib/pkgconfig/:$PKG_CONFIG_PATH"
cd test
${{ matrix.config.cxx }} -o basicapitest testing/basicapitest.cpp "-I$GITHUB_WORKSPACE/build/inst/include" "-L$GITHUB_WORKSPACE/build/inst/lib" $(pkg-config --cflags --libs tesseract lept libarchive libcurl) -pthread -std=c++17
./basicapitest
if: runner.os == 'Linux'
- name: Build and run basicapitest (macOS)
run: |
export "PKG_CONFIG_PATH=$GITHUB_WORKSPACE/build/inst/lib/pkgconfig/:$(brew --prefix)/opt/libarchive/lib/pkgconfig:$(brew --prefix)/Library/Homebrew/os/mac/pkgconfig/11:$PKG_CONFIG_PATH"
cd test
${{ matrix.config.cxx }} -o basicapitest testing/basicapitest.cpp "-I$GITHUB_WORKSPACE/build/inst/include" "-L$GITHUB_WORKSPACE/build/inst/lib" $(pkg-config --cflags --libs tesseract lept libcurl) -pthread -std=c++17
./basicapitest
if: runner.os == 'macOS'
- name: Display Compiler Version
run: |
${{ matrix.config.cxx }} --version
pwd
ls -la
# git log -3 --pretty=format:'%h %ad %s | %an'
if: always()
================================================
FILE: .github/workflows/codeql-analysis.yml
================================================
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ main ]
paths:
- '**.cpp'
- '**.h'
- '**/codeql-analysis.yml'
- 'm4/*.m4'
- 'Makefile.am'
- 'autogen.sh'
- 'configure.ac'
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
paths:
- '**.cpp'
- '**.h'
- '**/codeql-analysis.yml'
- 'm4/*.m4'
- 'Makefile.am'
- 'autogen.sh'
- 'configure.ac'
schedule:
- cron: '34 23 * * 2'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install autoconf libleptonica-dev -y
sudo apt-get install libpango1.0-dev -y
sudo apt-get install cabextract libarchive-dev -y
sudo apt-get install libcurl4-openssl-dev libcurl4 curl -y
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
- name: Build
run: |
./autogen.sh
./configure
make all training
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
================================================
FILE: .github/workflows/installer-for-windows.yml
================================================
# GitHub actions - Create Tesseract installer for Windows
name: Cross build for Windows
on:
# Trigger workflow in GitHub web frontend or from API.
workflow_dispatch:
inputs:
targets:
description: 'Target operating system'
required: true
default: 'Windows (64 bit)'
type: choice
options:
- 'Windows (64 bit)'
jobs:
build64:
runs-on: [ubuntu-24.04]
steps:
- uses: actions/checkout@v6
- name: Build Tesseract installer (64 bit)
run: nsis/build.sh x86_64
- uses: actions/upload-artifact@v7
with:
name: Tesseract Installer for Windows (64 bit)
path: dist
================================================
FILE: .github/workflows/msys2.yml
================================================
name: msys2
# msys2 build for tesseract -head from main branch.
on:
#push:
schedule:
- cron: 0 17 * * *
jobs:
windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- msystem: MINGW64
mingw_package_prefix: mingw-w64-x86_64
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
install: autoconf automake automake-wrapper git libtool make
- run: pacman --noconfirm -S ${{ matrix.mingw_package_prefix }}-gcc
- run: gcc --version
- name: Install dependencies
run: |
pacman --noconfirm -S ${{ matrix.mingw_package_prefix }}-cairo
pacman --noconfirm -S ${{ matrix.mingw_package_prefix }}-curl
pacman --noconfirm -S ${{ matrix.mingw_package_prefix }}-gcc-libs
pacman --noconfirm -S ${{ matrix.mingw_package_prefix }}-icu
pacman --noconfirm -S ${{ matrix.mingw_package_prefix }}-leptonica
pacman --noconfirm -S ${{ matrix.mingw_package_prefix }}-libarchive
pacman --noconfirm -S ${{ matrix.mingw_package_prefix }}-pango
pacman --noconfirm -S ${{ matrix.mingw_package_prefix }}-pkg-config
pacman --noconfirm -S ${{ matrix.mingw_package_prefix }}-zlib
- name: Setup Tesseract
run: |
./autogen.sh
- name: Configure Tesseract
run: |
./configure '--disable-shared' '--disable-openmp' '--disable-doc' 'CXX=${{ matrix.config.cxx }}' 'CXXFLAGS=-g -O2'
- name: Build and install Tesseract
run: |
make
make install
- name: Make and install training tools
run: |
make training
make training-install
- name: Display version
run: |
tesseract -v
text2image -v
lstmtraining -v
- name: Download fonts, tessdata and langdata required for tests
run: |
git clone https://github.com/egorpugin/tessdata tessdata_unittest
cp tessdata_unittest/fonts/* test/testing/
mv tessdata_unittest/* ../
- name: Run Tesseract on phototest.tif and devatest.png
run: |
tesseract test/testing/phototest.tif - --tessdata-dir ../tessdata
tesseract test/testing/devatest.png - -l hin+eng --tessdata-dir ../tessdata
================================================
FILE: .github/workflows/sw.yml
================================================
name: sw
on:
schedule:
# every 3rd day
- cron: 0 0 */3 * *
jobs:
build:
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
strategy:
fail-fast: false
matrix:
os: [windows-2022, macos-latest]
include:
- os: ubuntu-22.04
container: fedora:latest
steps:
- name: packages
if: matrix.os == 'ubuntu-22.04'
run: sudo dnf -y install cmake gcc lld which flex bison clang clang-tools-extra git
- uses: actions/checkout@v6
with:
submodules: recursive
- uses: egorpugin/sw-action@master
- name: build
if: github.event_name != 'pull_request' && (matrix.os == 'windows-2022')
run: ./sw -static -shared -platform x86,x64 -config d,r build
- name: build-pr
if: github.event_name == 'pull_request' && (matrix.os == 'windows-2022')
run: ./sw build
- name: build
if: github.event_name != 'pull_request' && (matrix.os != 'windows-2022')
run: ./sw -static -shared -config d,r build -Dwith-tests=1
- name: build-pr
if: github.event_name == 'pull_request' && (matrix.os != 'windows-2022')
run: ./sw build -Dwith-tests=1
- name: download test data
run: git clone https://github.com/egorpugin/tessdata tessdata_unittest
- name: copy fonts
if: matrix.os != 'windows-2022'
run: cp tessdata_unittest/fonts/* test/testing/
- name: copy fonts
if: matrix.os == 'windows-2022'
run: Copy-Item -Path "tessdata_unittest\fonts\*" -Destination "test\testing" -Recurse
shell: pwsh
- name: test
if: github.event_name != 'pull_request' && (matrix.os != 'windows-2022' && matrix.os != 'macos-latest')
run: ./sw -static -shared -config "d,r" test -Dwith-tests=1 "-Dskip-tests=lstm,lstm_recode"
continue-on-error: true
- name: test
if: github.event_name == 'pull_request' && (matrix.os != 'windows-2022')
run: ./sw test -Dwith-tests=1 "-Dskip-tests=lstm,lstm_recode"
continue-on-error: true
- name: test-nightly
if: matrix.os != 'windows-2022' && matrix.os != 'macos-latest' && github.event.schedule=='0 0 * * *'
run: ./sw -static -shared -config "d,r" test -Dwith-tests=1
continue-on-error: true
# windows and macos-latest tests hang here for some reason, investigate
#- name: test
#if: matrix.os == 'windows-2022' || matrix.os == 'macos-latest'
#run: ./sw test -Dwith-tests=1 "-Dskip-tests=lstm,lstm_recode"
#continue-on-error: true
- name: Upload Unit Test Results
if: always() && matrix.os != 'windows-2022'
uses: actions/upload-artifact@v7
with:
name: Test Results (${{ matrix.os }})
path: .sw/test/results.xml
- name: Publish Test Report
if: always() && matrix.os != 'windows-2022'
uses: mikepenz/action-junit-report@v6
with:
check_name: test (${{ matrix.os }})
report_paths: .sw/test/results.xml
github_token: ${{ secrets.GITHUB_TOKEN }}
================================================
FILE: .github/workflows/unittest-disablelegacy.yml
================================================
name: unittest-disablelegacy
# autotools build on ubuntu, unittests with disabled legacy engine.
# currently some unittests are failing with disabled legacy engine.
on:
#push:
schedule:
- cron: 0 10 * * *
jobs:
linux:
runs-on: ${{ matrix.os }}
timeout-minutes: 150
strategy:
fail-fast: false
matrix:
compiler: [ g++, clang++-18 ]
os: [ ubuntu-24.04 ]
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install autoconf libleptonica-dev libpango1.0-dev -y
sudo apt-get install cabextract -y
#sudo apt-get install libc++-7-dev libc++abi-7-dev -y
- name: Setup
run: |
./autogen.sh
- name: Configure
run: |
./configure '--disable-shared' '--disable-legacy' 'CXX=${{ matrix.compiler }}'
- name: Make and Install Tesseract
run: |
make
sudo make install install
- name: Make and Install Training Tools
run: |
make training
sudo make install training-install
- name: Display Version
run: |
${{ matrix.compiler }} --version
tesseract -v
lstmtraining -v
text2image -v
if: success() || failure()
- name: Download fonts, tessdata and langdata required for tests
run: |
git clone https://github.com/egorpugin/tessdata tessdata_unittest
cp tessdata_unittest/fonts/* test/testing/
mv tessdata_unittest/* ../
- name: Run Tesseract on phototest.tif and devatest.png
run: |
tesseract test/testing/phototest.tif - --tessdata-dir ../tessdata
tesseract test/testing/devatest.png - -l hin+eng --tessdata-dir ../tessdata
- name: Make and run Unit Tests
run: |
make check
- name: Display Unit Tests Report
run: |
git log -3
${{ matrix.compiler }} --version
cat test-suite.log
if: always()
================================================
FILE: .github/workflows/unittest-macos.yml
================================================
name: unittest-macos
# autotools build on homebrew. unittests with address sanitizers. with openmp.
on:
#push:
schedule:
- cron: 0 0 * * *
jobs:
sanitizers:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- { name: macos-arm-14-clang-unittest, os: macos-14, cxx: clang++ } # Apple silicon
- { name: macos-latest-clang-unittest, os: macos-latest, cxx: clang++ }
- { name: macos-latest-gcc-unittest, os: macos-latest, cxx: g++ }
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Install dependencies (macOS Homebrew)
run: |
brew install autoconf automake cabextract libtool
brew install leptonica libarchive pango
if ! brew list icu4c &>/dev/null; then
brew install icu4c
fi
if ! brew list curl &>/dev/null; then
brew install curl
fi
- name: Setup
run: |
./autogen.sh
- name: Configure (macOS Homebrew)
run: |
./configure '--disable-shared' '--with-pic' \
'CXX=${{ matrix.config.cxx }}' \
'CXXFLAGS=-g -O2 -fsanitize=address,undefined'
- name: Make and Install Tesseract
run: |
make
sudo make install
- name: Make and Install Training Tools
run: |
make training
sudo make training-install
- name: Display Tesseract and Training Tools Version
run: |
tesseract -v
lstmtraining -v
text2image -v
if: success() || failure()
- name: Download fonts, tessdata and langdata required for tests
run: |
git clone https://github.com/egorpugin/tessdata tessdata_unittest
cp tessdata_unittest/fonts/* test/testing/
mv tessdata_unittest/* ../
- name: Run Tesseract on phototest.tif and devatest.png
run: |
tesseract test/testing/phototest.tif - --tessdata-dir ../tessdata
tesseract test/testing/devatest.png - -l hin+eng --tessdata-dir ../tessdata
- name: Make and run Unit Tests
run: |
make check
- name: Display Unit Tests Report and compiler version
run: |
cat test-suite.log
${{ matrix.config.cxx }} --version
git log -3 --pretty=format:'%h %ad %s | %an'
if: always()
================================================
FILE: .github/workflows/unittest.yml
================================================
name: unittest
# autotools build on ubuntu. unittests with address sanitizers. with openmp.
# ubuntu-20.04-gcc-unittest - CI runs out of diskspace.
on:
#push:
pull_request:
paths:
- '**.cpp'
- '**.h'
- '**Makefile.am'
- '/configure.ac'
- 'unittest/**.c'
- 'unittest/**.cc'
schedule:
- cron: 0 0 * * *
workflow_dispatch:
jobs:
sanitizers:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- { name: ubuntu-24.04-gcc-unittest, os: ubuntu-24.04, cxx: g++, cxxflags: '-g -O2 -fsanitize=address,undefined' }
- { name: ubuntu-22.04-clang-unittest, os: ubuntu-22.04, cxx: clang++, cxxflags: '-g -O2 -fsanitize=address,undefined -stdlib=libc++' }
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Remove Homebrew, Android and .NET to provide more disk space
run: |
# https://github.com/actions/virtual-environments/issues/2606#issuecomment-772683150
sudo rm -rf /home/linuxbrew # will release Homebrew
sudo rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android
sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET
- name: Install dependencies (Linux)
run: |
sudo apt-get update
sudo apt-get install autoconf libleptonica-dev libpango1.0-dev -y
sudo apt-get install cabextract -y
- name: Setup
run: |
./autogen.sh
- name: Configure (Linux)
run: |
./configure '--disable-shared' 'CXX=${{ matrix.config.cxx }}' \
'CXXFLAGS=${{ matrix.config.cxxflags }}'
- name: Make and Install Tesseract
run: |
${{ matrix.config.cxx }} --version
make
sudo make install
- name: Make and Install Training Tools
run: |
make training
sudo make training-install
- name: Display Tesseract and Training Tools Version
run: |
tesseract -v
lstmtraining -v
text2image -v
if: success() || failure()
- name: Download fonts, tessdata and langdata required for tests
run: |
git clone https://github.com/egorpugin/tessdata tessdata_unittest
cp tessdata_unittest/fonts/* test/testing/
mv tessdata_unittest/* ../
- name: Run Tesseract on phototest.tif and devatest.png
run: |
tesseract test/testing/phototest.tif - --tessdata-dir ../tessdata
tesseract test/testing/devatest.png - -l hin+eng --tessdata-dir ../tessdata
- name: Make and run Unit Tests
run: |
make check
- name: Display Unit Tests Report and Compiler Version
run: |
cat test-suite.log
${{ matrix.config.cxx }} --version
git log -3 --pretty=format:'%h %ad %s | %an'
if: always()
================================================
FILE: .github/workflows/vcpkg.yml
================================================
name: vcpkg
# build and test of tesseract on windows using vcpkg and cmake.
# vcpkg with -head does not work. https://github.com/microsoft/vcpkg/issues/16019
on:
#push:
schedule:
- cron: 0 23 * * *
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest]
steps:
- name: Checkout Tesseract Source (--head from main branch)
uses: actions/checkout@v6
with:
submodules: recursive
# - name: Visual Studio Setup
# shell: cmd
# run: |
# call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
- name: Install vcpkg
run: |
git clone https://github.com/microsoft/vcpkg
vcpkg/bootstrap-vcpkg.bat
vcpkg/vcpkg integrate install
- name: Build and Install Leptonica and image libraries using vcpkg
run: |
vcpkg/vcpkg install leptonica:x64-windows
- name: Configure and Build Tesseract (--head from main branch) with cmake
run: |
cmake . -B build -DCMAKE_BUILD_TYPE=Release -DSW_BUILD=OFF -DOPENMP_BUILD=OFF -DBUILD_TRAINING_TOOLS=OFF "-DCMAKE_TOOLCHAIN_FILE=${env:GITHUB_WORKSPACE}/vcpkg/scripts/buildsystems/vcpkg.cmake"
cmake --build build --config Release --target install
- name: Display Tesseract Version
run: |
D:\a\tesseract\tesseract\build\bin\Release\tesseract.exe --version
- name: Create CMakeLists.txt file for basicapitest
shell: bash
run: |
cd test
cat << "EOF" > CMakeLists.txt
cmake_minimum_required(VERSION 3.19)
project( basicapitest )
find_package( Tesseract REQUIRED )
find_package( Leptonica REQUIRED )
include_directories(${Tesseract_INCLUDE_DIRS})
include_directories(${Leptonica_INCLUDE_DIRS})
add_executable( basicapitest testing/basicapitest.cpp )
target_link_libraries(basicapitest ${Leptonica_LIBRARIES})
target_link_libraries(basicapitest Tesseract::libtesseract)
add_library(libtesseract UNKNOWN IMPORTED)
set_property(TARGET libtesseract PROPERTY IMPORTED_LOCATION D:/a/tesseract/tesseract/build/Release/tesseract50.lib)
target_link_libraries(basicapitest Tesseract::libtesseract)
EOF
cat CMakeLists.txt
- name: Configure basicapitest
run: |
cd test
cmake . "-DCMAKE_TOOLCHAIN_FILE=${env:GITHUB_WORKSPACE}/vcpkg/scripts/buildsystems/vcpkg.cmake"
- name: Build basicapitest
run: |
cd test
cmake --build . --config Release
- name: Download tessdata and image files used for tests
run: |
git clone https://github.com/egorpugin/tessdata tessdata_unittest
mv tessdata_unittest/* ../
- name: Run basicapitest
run: |
cd test
D:\a\tesseract\tesseract\test\Release\basicapitest.exe
- name: Run Tesseract CLI on test images in different languages
run: |
D:\a\tesseract\tesseract\build\bin\Release\tesseract.exe test\testing\phototest.tif - --oem 1 --tessdata-dir ..\tessdata
D:\a\tesseract\tesseract\build\bin\Release\tesseract.exe test\testing\raaj.tif - -l hin --oem 1 --tessdata-dir ..\tessdata
D:\a\tesseract\tesseract\build\bin\Release\tesseract.exe test\testing\viet.tif - -l vie --oem 1 --tessdata-dir ..\tessdata
D:\a\tesseract\tesseract\build\bin\Release\tesseract.exe test\testing\hebrew.png - -l heb --oem 1 --tessdata-dir ..\tessdata
D:\a\tesseract\tesseract\build\bin\Release\tesseract.exe test\testing\eurotext.tif - -l fra --oem 1 --tessdata-dir ..\tessdata_best
D:\a\tesseract\tesseract\build\bin\Release\tesseract.exe test\testing\arabic.tif - -l ara --oem 1 --psm 6 --tessdata-dir ..\tessdata
- name: List languages in different test tessdata-dir
run: |
D:\a\tesseract\tesseract\build\bin\Release\tesseract.exe --list-langs --tessdata-dir ..\tessdata
D:\a\tesseract\tesseract\build\bin\Release\tesseract.exe --list-langs --tessdata-dir ..\tessdata_best
D:\a\tesseract\tesseract\build\bin\Release\tesseract.exe --list-langs --tessdata-dir ..\tessdata_fast
================================================
FILE: .gitignore
================================================
*~
# Windows
*.user.*
*.idea*
*.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
/include/tesseract/version.h
# executables
/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
/cmake-*
.deps
.dirstamp
/.libs
*/.libs/*
*/*/.deps/*
*/*/.libs/*
*.lo
*.la
*.o
*.Plo
*.a
*.class
*.jar
__pycache__
# tessdata
*.traineddata
tessdata_*
# build dirs
/build*
/*.dll
/*.lib
/*.exe
/*.lnk
/win*
.vs*
.s*
# files generated by "make check"
/tests/.dirstamp
/unittest/*.trs
/unittest/tmp/*
# test programs
/unittest/*_test
/unittest/primesbitvector
/unittest/primesmap
# generated files from unlvtests
times.txt
/unlvtests/results*
# snap packaging specific rules
/parts/
/stage/
/prime/
/snap/.snapcraft/
/*.snap
/*_source.tar.bz2
# CodeQL and build artifacts
_codeql_detected_source_root
install-sh
================================================
FILE: .gitmodules
================================================
[submodule "googletest"]
path = unittest/third_party/googletest
url = https://github.com/google/googletest.git
[submodule "test"]
path = test
url = https://github.com/tesseract-ocr/test.git
================================================
FILE: .mailmap
================================================
Amit Dovev <amitdev2222@gmail.com>
Egor Pugin <egor.pugin@gmail.com>
Jeff Breidenbach <breidenbach@gmail.com> <jbreiden@google.com>
Jim O'Regan <joregan@gmail.com> <joregan@gmail.com@d0cd1f9f-072b-0410-8dd7-cf729c803f20>
Jim O'Regan <joregan@gmail.com> <joregan@d0cd1f9f-072b-0410-8dd7-cf729c803f20>
Ray Smith <rays@google.com> <theraysmith@gmail.com>
Ray Smith <rays@google.com> <rays@rays.lon.corp.google.com>
Ray Smith <rays@google.com> <rays@rays-glaptop.roam.corp.google.com>
Ray Smith <rays@google.com> <theraysmith@gmail.com@d0cd1f9f-072b-0410-8dd7-cf729c803f20>
Ray Smith <rays@google.com> <theraysmith@d0cd1f9f-072b-0410-8dd7-cf729c803f20>
Shree Devi Kumar <5095331+Shreeshrii@users.noreply.github.com>
Stefan Weil <sw@weilnetz.de> <sw@weil.de>
Stefan Weil <sw@weilnetz.de> <stefan@v2201612906741603.powersrv.de>
Stefan Weil <sw@weilnetz.de> <stefan.weil@bib.uni-mannheim.de>
Stefan Weil <sw@weilnetz.de> <stweil@ub-backup.bib.uni-mannheim.de>
Stefan Weil <sw@weilnetz.de> <stweil@ub-blade-02.bib.uni-mannheim.de>
Zdenko Podobný <zdenop@gmail.com> <zdenko.podobny@nbazp1.SPS>
Zdenko Podobný <zdenop@gmail.com> <zdenop@gmail.com@d0cd1f9f-072b-0410-8dd7-cf729c803f20>
Zdenko Podobný <zdenop@gmail.com> <zdenop@d0cd1f9f-072b-0410-8dd7-cf729c803f20>
================================================
FILE: AUTHORS
================================================
Ray Smith (lead developer) <theraysmith@gmail.com>
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
Stefan Brechtken
Thomas Breuel
Amit Dovev
Martin Ettl
Shree Devi Kumar
Noah Metzger
Tom Morris
Tobias Müller
Egor Pugin
Robert Sachunsky
Raf Schietekat
Sundar M. Vaidya
Robin Watts
Stefan Weil
Nick White
Alexander Zaitsev
================================================
FILE: CITATIONS.bib
================================================
@inproceedings{TableDetect,
author = {Faisal Shafait and Ray Smith},
booktitle = {Document Analysis Systems},
editor = {David S. Doermann and Venu Govindaraju and Daniel P. Lopresti and Premkumar Natarajan},
pages = {65--72},
publisher = {ACM},
series = {ACM International Conference Proceeding Series},
title = {Table detection in heterogeneous documents.},
url = {http://dblp.uni-trier.de/db/conf/das/das2010.html#ShafaitS10},
year = 2010,
isbn = {978-1-60558-773-8},
date = {2010-07-07}
}
@inproceedings{Multilingual,
author = {Ray Smith and Daria Antonova and Dar-Shyang Lee},
booktitle = {MOCR '09: Proceedings of the International Workshop on Multilingual OCR},
editor = {Venu Govindaraju and Premkumar Natarajan and Santanu Chaudhury and Daniel P. Lopresti},
pages = {1--8},
publisher = {ACM},
series = {ACM International Conference Proceeding Series},
title = {Adapting the Tesseract Open Source OCR Engine for Multilingual OCR.},
url = {https://storage.googleapis.com/pub-tools-public-publication-data/pdf/35248.pdf},
year = 2009,
isbn = {978-1-60558-698-4},
date = {2009-07-25},
doi = {http://doi.acm.org/10/1145/1577802.1577804},
location = {Barcelona, Spain},
}
@inproceedings{ScriptDetect,
author = {Ranjith Unnikrishnan and Ray Smith},
title = {Combined Orientation and Script Detection using the Tesseract OCR Engine},
booktitle = {MOCR '09: Proceedings of the International Workshop on Multilingual OCR},
editor = {Venu Govindaraju and Premkumar Natarajan and Santanu Chaudhury and Daniel P. Lopresti},
url = {https://storage.googleapis.com/pub-tools-public-publication-data/pdf/35506.pdf},
year = {2009},
isbn = {978-1-60558-698-4},
pages = {1--7},
location = {Barcelona, Spain},
doi = {http://doi.acm.org/10.1145/1577802.1577809},
publisher = {ACM},
address = {New York, NY, USA},
}
@inproceedings{PageLayout,
author = {Ray Smith},
title = {Hybrid Page Layout Analysis via Tab-Stop Detection},
booktitle = {ICDAR '09: Proceedings of the 2009 10th International Conference on Document Analysis and Recognition},
url = {https://storage.googleapis.com/pub-tools-public-publication-data/pdf/35094.pdf},
year = {2009},
isbn = {978-0-7695-3725-2},
pages = {241--245},
doi = {http://dx.doi.org/10.1109/ICDAR.2009.257},
publisher = {IEEE Computer Society},
address = {Washington, DC, USA},
}
@inproceedings{TessOverview,
author = {Ray Smith},
title = {An Overview of the Tesseract OCR Engine},
booktitle = {ICDAR '07: Proceedings of the Ninth International Conference on Document Analysis and Recognition},
url = {https://storage.googleapis.com/pub-tools-public-publication-data/pdf/33418.pdf},
year = {2007},
isbn = {0-7695-2822-8},
pages = {629--633},
publisher = {IEEE Computer Society},
address = {Washington, DC, USA},
}
================================================
FILE: CMakeLists.txt
================================================
#
# tesseract
#
# ##############################################################################
#
# cmake settings
#
# ##############################################################################
# Require CMake 3.18 for modern features like precompiled headers, unity builds, and better target management
cmake_minimum_required(VERSION 3.18 FATAL_ERROR)
# In-source builds are disabled.
if("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_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_CURRENT_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")
if(NOT ${CMAKE_VERSION} VERSION_LESS "3.15.0")
if(WIN32)
cmake_policy(SET CMP0091 NEW)
message(STATUS "Setting policy CMP0091 to NEW")
endif()
endif()
# ##############################################################################
#
# 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})
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
execute_process(COMMAND git --git-dir ${CMAKE_CURRENT_SOURCE_DIR}/.git
describe --abbrev=4 OUTPUT_VARIABLE GIT_REV)
string(REGEX REPLACE "\n$" "" PACKAGE_VERSION "${GIT_REV}")
endif()
if(NOT PACKAGE_VERSION)
set(PACKAGE_VERSION ${VERSION_PLAIN})
endif()
# 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)
# ##############################################################################
#
# options
#
# ##############################################################################
message(STATUS "Configuring tesseract version ${PACKAGE_VERSION}...")
if(WIN32)
option(SW_BUILD "Build with sw" ON)
else()
option(SW_BUILD "Build with sw" OFF)
endif()
# Apple's toolchains dont populate CMAKE_SYSTEM_PROCESSOR when crosscompiling
# instead it uses CMAKE_OSX_ARCHITECTURES which can contain multiple architectures
if(APPLE AND NOT CMAKE_SYSTEM_PROCESSOR AND CMAKE_OSX_ARCHITECTURES)
list(LENGTH CMAKE_OSX_ARCHITECTURES NO_OF_ARCH)
if(NO_OF_ARCH GREATER 1)
message(FATAL_ERROR "Apple's universal build for ${NO_OF_ARCH} architectures not supported. CMAKE_OSX_ARCHITECTURES: ${CMAKE_OSX_ARCHITECTURES}")
endif()
set(CMAKE_SYSTEM_PROCESSOR "${CMAKE_OSX_ARCHITECTURES}" CACHE STRING "Target processor" FORCE)
message(STATUS "CMAKE_SYSTEM_PROCESSOR set to '${CMAKE_SYSTEM_PROCESSOR}' from CMAKE_OSX_ARCHITECTURES")
endif()
option(OPENMP_BUILD "Build with openmp support" OFF) # see issue #1662
option(GRAPHICS_DISABLED "Disable disable graphics (ScrollView)" OFF)
option(DISABLED_LEGACY_ENGINE "Disable the legacy OCR engine" OFF)
option(ENABLE_LTO "Enable link-time optimization" OFF)
option(FAST_FLOAT "Enable float for LSTM" ON)
option(ENABLE_NATIVE
"Enable optimization for host CPU (could break HW compatibility)" OFF)
# see
# https://stackoverflow.com/questions/52653025/why-is-march-native-used-so-rarely
option(BUILD_TRAINING_TOOLS "Build training tools" ON)
option(BUILD_TESTS "Build tests" OFF)
option(USE_SYSTEM_ICU "Use system ICU" OFF)
option(DISABLE_TIFF "Disable build with libtiff (if available)" OFF)
option(DISABLE_ARCHIVE "Disable build with libarchive (if available)" OFF)
option(DISABLE_CURL "Disable build with libcurl (if available)" OFF)
option(INSTALL_CONFIGS "Install tesseract configs" ON)
# Build optimization options
option(ENABLE_UNITY_BUILD "Enable Unity/Jumbo builds for faster compilation" OFF)
option(ENABLE_PRECOMPILED_HEADERS "Enable precompiled headers for faster compilation" ON)
option(ENABLE_CCACHE "Enable ccache for faster incremental builds" ON)
option(ENABLE_NINJA_POOL "Enable Ninja job pools to manage parallelism" ON)
# ##############################################################################
#
# compiler and linker
#
# ##############################################################################
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CLANG 1)
endif()
if(NOT CMAKE_BUILD_TYPE)
message(STATUS "Setting build type to 'Release' as none was specified.")
set(CMAKE_BUILD_TYPE
Release
CACHE STRING "Choose the type of build." FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release")
endif()
include(CheckCXXCompilerFlag)
set(CMAKE_CXX_STANDARD 17)
if("cxx_std_20" IN_LIST CMAKE_CXX_COMPILE_FEATURES)
set(CMAKE_CXX_STANDARD 20)
endif()
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# cygwin gnu c++ needs to use -std=gnu++17 instead of -std=c++17
set(CMAKE_CXX_EXTENSIONS OFF)
endif()
if(BUILD_SHARED_LIBS)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
endif()
# LTO
cmake_policy(SET CMP0069 NEW)
include(CheckIPOSupported)
check_ipo_supported(RESULT LTO_SUPPORTED OUTPUT error)
if(LTO_SUPPORTED)
message(STATUS "IPO / LTO supported")
else()
message(STATUS "IPO / LTO not supported: <${error}>")
endif()
set(MARCH_NATIVE_OPT OFF)
if(ENABLE_NATIVE)
check_cxx_compiler_flag("-march=native" COMPILER_SUPPORTS_MARCH_NATIVE)
if(COMPILER_SUPPORTS_MARCH_NATIVE)
set(DOTPRODUCT_FLAGS "${DOTPRODUCT_FLAGS} -march=native")
if(NOT CLANG AND MSVC)
# clang-cl does not know this argument
set(DOTPRODUCT_FLAGS "${DOTPRODUCT_FLAGS} -mtune=native")
endif()
set(MARCH_NATIVE_OPT ON)
endif(COMPILER_SUPPORTS_MARCH_NATIVE)
endif(ENABLE_NATIVE)
message(STATUS "CMAKE_SYSTEM_PROCESSOR=<${CMAKE_SYSTEM_PROCESSOR}>")
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86|x86_64|AMD64|amd64|i386|i686")
set(HAVE_NEON FALSE)
if(MSVC)
set(HAVE_AVX ON)
set(AVX_COMPILE_FLAGS "/arch:AVX")
add_definitions("-DHAVE_AVX")
set(HAVE_AVX2 ON)
set(AVX2_COMPILE_FLAGS "/arch:AVX2")
add_definitions("-DHAVE_AVX2")
set(HAVE_AVX512F ON)
set(AVX512F_COMPILE_FLAGS "/arch:AVX512")
add_definitions("-DHAVE_AVX512F")
set(HAVE_FMA ON)
set(FMA_COMPILE_FLAGS "-D__FMA__")
add_definitions("-DHAVE_FMA")
set(HAVE_SSE4_1 ON)
set(SSE4_1_COMPILE_FLAGS "-D__SSE4_1__")
add_definitions("-DHAVE_SSE4_1")
set(DOTPRODUCT_FLAGS "${DOTPRODUCT_FLAGS} -openmp:experimental")
add_definitions("-DOPENMP_SIMD")
# clang with MSVC compatibility
if(CLANG)
set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -Wno-microsoft-unqualified-friend")
if(HAVE_FMA)
set(FMA_COMPILE_FLAGS "-mfma ${FMA_COMPILE_FLAGS}")
endif(HAVE_FMA)
if(HAVE_SSE4_1)
set(SSE4_1_COMPILE_FLAGS "-msse4.1 ${SSE4_1_COMPILE_FLAGS}")
endif(HAVE_SSE4_1)
endif(CLANG)
else() # if not MSVC
check_cxx_compiler_flag("-mavx" HAVE_AVX)
if(HAVE_AVX)
set(AVX_COMPILE_FLAGS "-mavx")
add_definitions("-DHAVE_AVX")
endif(HAVE_AVX)
check_cxx_compiler_flag("-mavx2" HAVE_AVX2)
if(HAVE_AVX2)
set(AVX2_COMPILE_FLAGS "-mavx2")
add_definitions("-DHAVE_AVX2")
endif()
check_cxx_compiler_flag("-mavx512f" HAVE_AVX512F)
if(HAVE_AVX512F)
set(AVX512F_COMPILE_FLAGS "-mavx512f")
add_definitions("-DHAVE_AVX512F")
endif()
check_cxx_compiler_flag("-mfma" HAVE_FMA)
if(HAVE_FMA)
set(FMA_COMPILE_FLAGS "-mfma")
add_definitions("-DHAVE_FMA")
endif()
check_cxx_compiler_flag("-msse4.1" HAVE_SSE4_1)
if(HAVE_SSE4_1)
set(SSE4_1_COMPILE_FLAGS "-msse4.1")
add_definitions("-DHAVE_SSE4_1")
endif()
check_cxx_compiler_flag("-fopenmp-simd" OPENMP_SIMD)
if(OPENMP_SIMD)
set(DOTPRODUCT_FLAGS "${DOTPRODUCT_FLAGS} -fopenmp-simd")
add_definitions("-DOPENMP_SIMD")
endif(OPENMP_SIMD)
endif(MSVC)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm64|aarch64.*|AARCH64.*")
set(HAVE_AVX FALSE)
set(HAVE_AVX2 FALSE)
set(HAVE_AVX512F FALSE)
set(HAVE_FMA FALSE)
set(HAVE_SSE4_1 FALSE)
set(HAVE_NEON TRUE)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm.*")
set(HAVE_AVX FALSE)
set(HAVE_AVX2 FALSE)
set(HAVE_AVX512F FALSE)
set(HAVE_FMA FALSE)
set(HAVE_SSE4_1 FALSE)
check_cxx_compiler_flag("-mfpu=neon" HAVE_NEON)
if(HAVE_NEON)
set(NEON_COMPILE_FLAGS "-mfpu=neon")
endif(HAVE_NEON)
else()
set(HAVE_AVX FALSE)
set(HAVE_AVX2 FALSE)
set(HAVE_AVX512F FALSE)
set(HAVE_FMA FALSE)
set(HAVE_NEON FALSE)
set(HAVE_SSE4_1 FALSE)
endif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86|x86_64|AMD64|amd64|i386|i686")
if(HAVE_NEON)
message(STATUS "LTO build is not supported on arm/RBPi.")
set(ENABLE_LTO FALSE) # enable LTO cause fatal error on arm/RBPi
endif()
# Compiler specific environment
if(CMAKE_COMPILER_IS_GNUCXX OR MINGW)
set(CMAKE_CXX_FLAGS_DEBUG
"${CMAKE_CXX_FLAGS_DEBUG} -Wall -DDEBUG -pedantic -Og -Wno-unknown-pragmas")
elseif(MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) # strdup
add_definitions(-D_USE_MATH_DEFINES) # Enable M_PI and other math constants
add_definitions(-DNOMINMAX) # Prevent min/max macro conflicts
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /utf-8")
if(NOT CLANG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
endif()
# Hide some warnings for release target wd4244 'argument': conversion from
# 'uint64_t' to 'unsigned int', possible loss of data wd4251 needs to have
# dll-interface wd4267 return': conversion from 'size_t' to 'int', possible
# loss of data wd4275 non dll-interface class wd4305 ...truncation from
# 'double' to 'float'
set(CMAKE_CXX_FLAGS_RELEASE
"${CMAKE_CXX_FLAGS_RELEASE} /wd4244 /wd4305 /wd4267 /wd4251 /wd4275 /wd4005"
)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /wd4068")
# Don't use /Wall because it generates too many warnings.
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /W0 /bigobj")
# MT flag
if(WIN32_MT_BUILD)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
message(STATUS "Building with static CRT.")
endif()
# Workaround: When building on VS 2022 17.10 or newer, but using an older runtime,
# mutexes can crash
# https://stackoverflow.com/questions/78598141/first-stdmutexlock-crashes-in-application-built-with-latest-visual-studio
add_definitions(-D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR)
endif()
if(CLANG) # clang all platforms
set(CMAKE_CXX_FLAGS_RELEASE
"${CMAKE_CXX_FLAGS_RELEASE} -Wno-unused-command-line-argument")
set(CMAKE_CXX_FLAGS_DEBUG
"${CMAKE_CXX_FLAGS_DEBUG} -Wall -DDEBUG -pedantic -O0")
endif()
if(OPENMP_BUILD
AND MSVC
AND "${MSVC_VERSION}" LESS 1929)
set(OPENMP_BUILD OFF)
endif()
if(OPENMP_BUILD)
if(MSVC) # supported from cmake 3.30
set(OpenMP_RUNTIME_MSVC "llvm")
endif(MSVC)
find_package(OpenMP)
# https://stackoverflow.com/questions/12399422
# how-to-set-linker-flags-for-openmp-in-cmakes-try-compile-function
if(NOT OpenMP_FOUND
AND CLANG
AND WIN32)
# workaround because find_package(OpenMP) does not work for clang-cl
# https://gitlab.kitware.com/cmake/cmake/issues/19404
check_include_file_cxx(omp.h HAVE_OMP_H_INCLUDE)
find_library(OpenMP_LIBRARY NAMES omp libomp.lib)
message(">> OpenMP_LIBRARY: ${OpenMP_LIBRARY}")
if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /openmp")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
endif()
set(OpenMP_FOUND 1)
# OpenMP 3.1 is fully supported from Clang 3.8.0
add_definitions(-D_OPENMP=201107)
endif()
if(MSVC)
# Note: -openmp:llvm is available for X64 from MSVC 16.9 from MSVC 16.10
# Preview 2 there is support also for x86 and arm64
# https://devblogs.microsoft.com/cppblog/openmp-updates-and-fixes-for-cpp-in-visual-studio-2019-16-10/
if("${OpenMP_CXX_FLAGS}" STREQUAL "-openmp")
set(OpenMP_CXX_FLAGS "-openmp:llvm")
endif()
endif()
if(OpenMP_FOUND)
message(">> OpenMP_FOUND ${OpenMP_FOUND} version: ${OpenMP_CXX_VERSION}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
if(NOT TARGET OpenMP::OpenMP_CXX)
add_library(OpenMP::OpenMP_CXX IMPORTED INTERFACE)
endif()
endif()
endif()
if(CYGWIN)
add_definitions(-D__CYGWIN__)
elseif(UNIX)
if(NOT ANDROID)
set(LIB_pthread pthread)
endif()
elseif(WIN32)
set(LIB_Ws2_32 Ws2_32)
endif()
add_definitions("-DCMAKE_BUILD")
# ##############################################################################
#
# Build optimizations
#
# ##############################################################################
# Setup ccache if available and enabled
if(ENABLE_CCACHE)
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
message(STATUS "Found ccache: ${CCACHE_PROGRAM}")
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
# Configure ccache for better performance
set(ENV{CCACHE_SLOPPINESS} "pch_defines,time_macros")
set(ENV{CCACHE_CPP2} "true")
else()
message(STATUS "ccache not found, disabling ccache support")
set(ENABLE_CCACHE OFF)
endif()
endif()
# Setup Ninja job pools for better resource management
if(ENABLE_NINJA_POOL AND CMAKE_GENERATOR STREQUAL "Ninja")
include(ProcessorCount)
ProcessorCount(N)
if(N GREATER 1)
# Use 75% of available cores for compilation, rest for linking
math(EXPR COMPILE_JOBS "${N} * 3 / 4")
math(EXPR LINK_JOBS "${N} - ${COMPILE_JOBS}")
if(LINK_JOBS LESS 1)
set(LINK_JOBS 1)
endif()
set_property(GLOBAL PROPERTY JOB_POOLS "compile=${COMPILE_JOBS};link=${LINK_JOBS}")
set(CMAKE_JOB_POOL_COMPILE compile)
set(CMAKE_JOB_POOL_LINK link)
message(STATUS "Ninja job pools: compile=${COMPILE_JOBS}, link=${LINK_JOBS}")
endif()
endif()
# ##############################################################################
#
# packages
#
# ##############################################################################
include(CheckFunctions)
if(SW_BUILD)
find_package(SW REQUIRED)
if(BUILD_SHARED_LIBS)
set(SW_BUILD_SHARED_LIBS 1)
else()
set(SW_BUILD_SHARED_LIBS 0)
endif()
sw_add_package(org.sw.demo.danbloomberg.leptonica
org.sw.demo.libarchive.libarchive)
if(BUILD_TRAINING_TOOLS)
sw_add_package(org.sw.demo.gnome.pango.pangocairo
org.sw.demo.unicode.icu.i18n)
endif()
sw_execute()
else()
find_package(PkgConfig)
if(APPLE)
if(DEFINED ENV{HOMEBREW_PREFIX})
set(HOMEBREW_PREFIX $ENV{HOMEBREW_PREFIX})
set(PKG_CONFIG_PATH "${HOMEBREW_PREFIX}/opt/icu4c/lib/pkgconfig:${HOMEBREW_PREFIX}/opt/libarchive/lib/pkgconfig")
set(ENV{PKG_CONFIG_PATH} "${PKG_CONFIG_PATH}")
endif()
endif()
# Check for required library. option -DLeptonica_DIR=path => cmake hint where
# to find leptonica
find_package(Leptonica ${MINIMUM_LEPTONICA_VERSION} CONFIG)
if(NOT Leptonica_FOUND AND PKG_CONFIG_EXECUTABLE)
pkg_check_modules(Leptonica lept>=${MINIMUM_LEPTONICA_VERSION})
link_directories(${Leptonica_LIBRARY_DIRS})
endif()
if(NOT Leptonica_FOUND)
message(FATAL_ERROR "Cannot find required library Leptonica. Quitting!")
else()
message(STATUS "Found leptonica version: ${Leptonica_VERSION}")
endif(NOT Leptonica_FOUND)
include_directories(${Leptonica_INCLUDE_DIRS})
check_leptonica_tiff_support()
if ((NOT LEPT_TIFF_RESULT EQUAL 0) AND LEPT_TIFF_COMPILE_SUCCESS)
message(NOTICE "Leptonica was build without TIFF support! Disabling TIFF support...")
set(DISABLE_TIFF ON)
elseif(NOT ${CMAKE_VERSION} VERSION_LESS "3.25")
message(STATUS "Leptonica was build with TIFF support.")
endif()
# Check for optional libraries.
if(DISABLE_TIFF)
set(HAVE_TIFFIO_H OFF)
message(STATUS "TIFF support disabled.")
else(DISABLE_TIFF)
find_package(TIFF) # for tesseract
if(NOT TIFF_FOUND AND PKG_CONFIG_EXECUTABLE)
# try PKG_CONFIG to find libtiff if cmake failed
pkg_check_modules(TIFF libtiff-4)
endif()
if(TIFF_FOUND)
set(HAVE_TIFFIO_H ON)
include_directories(${TIFF_INCLUDE_DIRS})
endif(TIFF_FOUND)
endif(DISABLE_TIFF)
if(DISABLE_ARCHIVE)
set(HAVE_LIBARCHIVE OFF)
message(STATUS "LibArchive support disabled.")
else(DISABLE_ARCHIVE)
find_package(LibArchive)
if(NOT LibArchive_FOUND AND PKG_CONFIG_EXECUTABLE)
# try PKG_CONFIG to find libarchive if cmake failed
pkg_check_modules(LibArchive libarchive)
endif()
if(LibArchive_FOUND)
set(HAVE_LIBARCHIVE ON)
include_directories(${LibArchive_INCLUDE_DIRS})
endif(LibArchive_FOUND)
endif(DISABLE_ARCHIVE)
if(DISABLE_CURL)
set(HAVE_LIBCURL OFF)
message(STATUS "CURL support disabled.")
else(DISABLE_CURL)
find_package(CURL)
if(NOT CURL_FOUND AND PKG_CONFIG_EXECUTABLE)
# try PKG_CONFIG to find libcurl if cmake failed
pkg_check_modules(CURL libcurl)
endif()
if(CURL_FOUND)
set(HAVE_LIBCURL ON)
include_directories(${CURL_INCLUDE_DIRS})
endif(CURL_FOUND)
endif(DISABLE_CURL)
endif()
# ##############################################################################
#
# configure
#
# ##############################################################################
if(MSVC)
set(DOTPRODUCT_FLAGS "${DOTPRODUCT_FLAGS} /fp:fast")
else()
set(DOTPRODUCT_FLAGS "${DOTPRODUCT_FLAGS} -O3 -ffast-math")
endif()
include (GNUInstallDirs)
set(AUTOCONFIG_SRC ${CMAKE_CURRENT_BINARY_DIR}/config_auto.h.in)
set(AUTOCONFIG ${CMAKE_CURRENT_BINARY_DIR}/config_auto.h)
add_definitions(-DHAVE_CONFIG_H)
if(GRAPHICS_DISABLED)
message("ScrollView debugging disabled.")
endif()
set(CMAKE_REQUIRED_INCLUDES
${CMAKE_REQUIRED_INCLUDES} "${CMAKE_PREFIX_PATH}/include"
${CMAKE_INSTALL_INCLUDEDIR})
include(Configure)
configure_file(${AUTOCONFIG_SRC} ${AUTOCONFIG} @ONLY)
set(INCLUDE_DIR ${CMAKE_INSTALL_INCLUDEDIR})
set(LIBRARY_DIRS ${CMAKE_INSTALL_LIBDIR})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/tesseract/version.h.in
${CMAKE_CURRENT_BINARY_DIR}/include/tesseract/version.h @ONLY)
include(CMakePackageConfigHelpers)
include(GenerateExportHeader)
# show summary of configuration
if(${CMAKE_BUILD_TYPE} MATCHES Debug)
set(COMPILER_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}")
elseif(${CMAKE_BUILD_TYPE} MATCHES Release)
set(COMPILER_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}")
if(LTO_SUPPORTED AND ENABLE_LTO)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
else()
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION FALSE)
endif() # LTO_SUPPORTED
endif()
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(BUILD_ARCH "64 bits")
elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
set(BUILD_ARCH "32 bits")
endif()
message(STATUS)
message(STATUS "General configuration for Tesseract ${PACKAGE_VERSION}")
message(STATUS "--------------------------------------------------------")
message(STATUS "Build type: ${CMAKE_BUILD_TYPE} ${BUILD_ARCH}")
message(STATUS "Compiler: ${CMAKE_CXX_COMPILER_ID}")
message(STATUS "Compiler version: ${CMAKE_CXX_COMPILER_VERSION}")
message(STATUS "Used standard: C++${CMAKE_CXX_STANDARD}")
message(STATUS "CXX compiler options: ${COMPILER_FLAGS}")
get_directory_property(DirCompDefs COMPILE_DEFINITIONS)
message(STATUS "Compile definitions = ${DirCompDefs}")
message(STATUS "Linker options: ${CMAKE_EXE_LINKER_FLAGS} "
"${CMAKE_EXE_LINKER_FLAGS_${CMAKE_BUILD_TYPE_UP}}")
message(STATUS "Install directory: ${CMAKE_INSTALL_PREFIX}")
message(STATUS "HAVE_AVX: ${HAVE_AVX}")
message(STATUS "HAVE_AVX2: ${HAVE_AVX2}")
message(STATUS "HAVE_AVX512F: ${HAVE_AVX512F}")
message(STATUS "HAVE_FMA: ${HAVE_FMA}")
message(STATUS "HAVE_SSE4_1: ${HAVE_SSE4_1}")
message(STATUS "MARCH_NATIVE_OPT: ${MARCH_NATIVE_OPT}")
message(STATUS "HAVE_NEON: ${HAVE_NEON}")
message(STATUS "Link-time optimization: ${CMAKE_INTERPROCEDURAL_OPTIMIZATION}")
message(STATUS "--------------------------------------------------------")
message(STATUS "Build with sw [SW_BUILD]: ${SW_BUILD}")
message(STATUS "Build with openmp support [OPENMP_BUILD]: ${OPENMP_BUILD}")
message(STATUS "Build with libarchive support [HAVE_LIBARCHIVE]: "
"${HAVE_LIBARCHIVE}")
message(STATUS "Build with libcurl support [HAVE_LIBCURL]: ${HAVE_LIBCURL}")
message(STATUS "Enable float for LSTM [FAST_FLOAT]: ${FAST_FLOAT}")
message(STATUS "Enable optimization for host CPU (could break HW compatibility)"
" [ENABLE_NATIVE]: ${ENABLE_NATIVE}")
message(STATUS "Disable disable graphics (ScrollView) [GRAPHICS_DISABLED]: "
"${GRAPHICS_DISABLED}")
message(STATUS "Disable the legacy OCR engine [DISABLED_LEGACY_ENGINE]: "
"${DISABLED_LEGACY_ENGINE}")
message(STATUS "Build training tools [BUILD_TRAINING_TOOLS]: "
"${BUILD_TRAINING_TOOLS}")
message(STATUS "Build tests [BUILD_TESTS]: ${BUILD_TESTS}")
message(STATUS "Use system ICU Library [USE_SYSTEM_ICU]: ${USE_SYSTEM_ICU}")
message(
STATUS "Install tesseract configs [INSTALL_CONFIGS]: ${INSTALL_CONFIGS}")
message(STATUS "--------------------------------------------------------")
message(STATUS "Modern build optimizations:")
message(STATUS "Unity build [ENABLE_UNITY_BUILD]: ${ENABLE_UNITY_BUILD}")
message(STATUS "Precompiled headers [ENABLE_PRECOMPILED_HEADERS]: ${ENABLE_PRECOMPILED_HEADERS}")
message(STATUS "ccache [ENABLE_CCACHE]: ${ENABLE_CCACHE}")
if(CMAKE_GENERATOR STREQUAL "Ninja")
message(STATUS "Ninja job pools [ENABLE_NINJA_POOL]: ${ENABLE_NINJA_POOL}")
else()
message(STATUS "Ninja job pools [ENABLE_NINJA_POOL]: Disabled (not using Ninja)")
endif()
message(STATUS "--------------------------------------------------------")
message(STATUS)
# ##############################################################################
#
# build
#
# ##############################################################################
include(BuildFunctions)
include(SourceGroups)
add_definitions(-D_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS=1)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include)
if(ANDROID_TOOLCHAIN)
include_directories(${ANDROID_TOOLCHAIN}/sysroot/usr/include)
add_compile_definitions(__ANDROID_API_FUTURE__)
endif()
# ##############################################################################
# LIBRARY tesseract
# ##############################################################################
# Include source file lists
include(cmake/SourceLists.cmake)
# Build the core source file list
set(TESSERACT_SRC ${TESSERACT_SRC_CORE})
if(DISABLED_LEGACY_ENGINE)
# prepend path to list of source files
function(prepend_path srcs path)
set(tmp, "")
foreach(src IN LISTS ${srcs})
list(APPEND tmp ${path}/${src})
endforeach(src ${srcs})
set(${srcs}
${tmp}
PARENT_SCOPE)
endfunction()
set(TESSERACT_SRC_LEGACY
src/ccmain/adaptions.cpp
src/ccmain/docqual.cpp
src/ccmain/equationdetect.cpp
src/ccmain/fixspace.cpp
src/ccmain/fixxht.cpp
src/ccmain/osdetect.cpp
src/ccmain/par_control.cpp
src/ccmain/recogtraining.cpp
src/ccmain/superscript.cpp
src/ccmain/tessbox.cpp
src/ccmain/tfacepp.cpp
src/ccstruct/fontinfo.cpp
src/ccstruct/params_training_featdef.cpp
src/ccutil/ambigs.cpp
src/ccutil/bitvector.cpp
src/ccutil/indexmapbidi.cpp
src/classify/adaptive.cpp
src/classify/adaptmatch.cpp
src/classify/blobclass.cpp
src/classify/cluster.cpp
src/classify/clusttool.cpp
src/classify/cutoffs.cpp
src/classify/featdefs.cpp
src/classify/float2int.cpp
src/classify/fpoint.cpp
src/classify/intfeaturespace.cpp
src/classify/intfx.cpp
src/classify/intmatcher.cpp
src/classify/intproto.cpp
src/classify/kdtree.cpp
src/classify/mf.cpp
src/classify/mfoutline.cpp
src/classify/mfx.cpp
src/classify/normfeat.cpp
src/classify/normmatch.cpp
src/classify/ocrfeatures.cpp
src/classify/outfeat.cpp
src/classify/picofeat.cpp
src/classify/protos.cpp
src/classify/shapeclassifier.cpp
src/classify/shapetable.cpp
src/classify/tessclassifier.cpp
src/classify/trainingsample.cpp
src/dict/permdawg.cpp
src/dict/hyphen.cpp
src/wordrec/associate.cpp
src/wordrec/chop.cpp
src/wordrec/chopper.cpp
src/wordrec/drawfx.cpp
src/wordrec/findseam.cpp
src/wordrec/gradechop.cpp
src/wordrec/language_model.cpp
src/wordrec/lm_consistency.cpp
src/wordrec/lm_pain_points.cpp
src/wordrec/lm_state.cpp
src/wordrec/outlines.cpp
src/wordrec/params_model.cpp
src/wordrec/pieces.cpp
src/wordrec/plotedges.cpp
src/wordrec/render.cpp
src/wordrec/segsearch.cpp
src/wordrec/wordclass.cpp)
prepend_path(TESSERACT_SRC_LEGACY "${CMAKE_CURRENT_SOURCE_DIR}")
list(REMOVE_ITEM TESSERACT_SRC ${TESSERACT_SRC_LEGACY})
endif(DISABLED_LEGACY_ENGINE)
# Use architecture files from SourceLists.cmake
set(arch_files ${TESSERACT_SRC_ARCH})
if(DOTPRODUCT_FLAGS)
set_source_files_properties(src/arch/dotproduct.cpp
PROPERTIES COMPILE_FLAGS ${DOTPRODUCT_FLAGS})
endif(DOTPRODUCT_FLAGS)
if(HAVE_AVX)
list(APPEND arch_files_opt src/arch/dotproductavx.cpp)
set_source_files_properties(src/arch/dotproductavx.cpp
PROPERTIES COMPILE_FLAGS ${AVX_COMPILE_FLAGS})
endif(HAVE_AVX)
if(HAVE_AVX2)
list(APPEND arch_files_opt src/arch/intsimdmatrixavx2.cpp
src/arch/dotproductavx.cpp)
set_source_files_properties(src/arch/intsimdmatrixavx2.cpp
PROPERTIES COMPILE_FLAGS ${AVX2_COMPILE_FLAGS})
endif(HAVE_AVX2)
if(HAVE_AVX512F)
list(APPEND arch_files_opt src/arch/dotproductavx512.cpp)
set_source_files_properties(src/arch/dotproductavx512.cpp
PROPERTIES COMPILE_FLAGS ${AVX512F_COMPILE_FLAGS})
endif(HAVE_AVX512F)
if(HAVE_FMA)
list(APPEND arch_files_opt src/arch/dotproductfma.cpp)
set_source_files_properties(src/arch/dotproductfma.cpp
PROPERTIES COMPILE_FLAGS ${FMA_COMPILE_FLAGS})
endif(HAVE_FMA)
if(HAVE_SSE4_1)
list(APPEND arch_files_opt src/arch/dotproductsse.cpp
src/arch/intsimdmatrixsse.cpp)
set_source_files_properties(
src/arch/dotproductsse.cpp src/arch/intsimdmatrixsse.cpp
PROPERTIES COMPILE_FLAGS ${SSE4_1_COMPILE_FLAGS})
endif(HAVE_SSE4_1)
if(HAVE_NEON)
list(APPEND arch_files_opt src/arch/dotproductneon.cpp
src/arch/intsimdmatrixneon.cpp)
if(NEON_COMPILE_FLAGS)
set_source_files_properties(
src/arch/dotproductneon.cpp src/arch/intsimdmatrixneon.cpp
PROPERTIES COMPILE_FLAGS ${NEON_COMPILE_FLAGS})
endif()
endif(HAVE_NEON)
# Use explicit header file lists from SourceLists.cmake
set(TESSERACT_HDR ${TESSERACT_HDR_INCLUDE} ${TESSERACT_HDR_INTERNAL})
set(TESSERACT_SRC
${TESSERACT_SRC}
src/api/baseapi.cpp
src/api/capi.cpp
src/api/renderer.cpp
src/api/altorenderer.cpp
src/api/pagerenderer.cpp
src/api/hocrrenderer.cpp
src/api/lstmboxrenderer.cpp
src/api/pdfrenderer.cpp
src/api/wordstrboxrenderer.cpp)
set(TESSERACT_CONFIGS
tessdata/configs/alto
tessdata/configs/ambigs.train
tessdata/configs/api_config
tessdata/configs/bazaar
tessdata/configs/bigram
tessdata/configs/box.train
tessdata/configs/box.train.stderr
tessdata/configs/digits
tessdata/configs/get.images
tessdata/configs/hocr
tessdata/configs/inter
tessdata/configs/kannada
tessdata/configs/linebox
tessdata/configs/logfile
tessdata/configs/lstm.train
tessdata/configs/lstmbox
tessdata/configs/lstmdebug
tessdata/configs/makebox
tessdata/configs/page
tessdata/configs/pdf
tessdata/configs/quiet
tessdata/configs/rebox
tessdata/configs/strokewidth
tessdata/configs/tsv
tessdata/configs/txt
tessdata/configs/unlv
tessdata/configs/wordstrbox)
set(TESSERACT_TESSCONFIGS
tessdata/tessconfigs/batch tessdata/tessconfigs/batch.nochop
tessdata/tessconfigs/matdemo tessdata/tessconfigs/msdemo
tessdata/tessconfigs/nobatch tessdata/tessconfigs/segdemo)
set(LIBTESSFILES ${TESSERACT_SRC} ${arch_files} ${arch_files_opt}
${TESSERACT_HDR})
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${LIBTESSFILES})
add_library(libtesseract ${LIBTESSFILES})
# Apply modern optimizations to the main library
if(ENABLE_UNITY_BUILD)
set_target_properties(libtesseract PROPERTIES UNITY_BUILD ON)
set_target_properties(libtesseract PROPERTIES UNITY_BUILD_BATCH_SIZE 16)
message(STATUS "Unity build enabled for libtesseract with batch size 16")
endif()
# Apply precompiled headers to reduce compilation time
if(ENABLE_PRECOMPILED_HEADERS)
target_precompile_headers(libtesseract PRIVATE
<vector>
<string>
<memory>
<algorithm>
<iostream>
<cstdlib>
<cstring>
<cmath>
)
# Exclude architecture-specific files from PCH due to custom compiler flags
set(ARCH_FILES_NO_PCH
src/arch/dotproduct.cpp
src/arch/dotproductavx.cpp
src/arch/dotproductavx512.cpp
src/arch/dotproductfma.cpp
src/arch/dotproductsse.cpp
src/arch/dotproductneon.cpp
src/arch/intsimdmatrixavx2.cpp
src/arch/intsimdmatrixsse.cpp
src/arch/intsimdmatrixneon.cpp
)
foreach(file ${ARCH_FILES_NO_PCH})
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${file}")
set_source_files_properties("${file}" PROPERTIES SKIP_PRECOMPILE_HEADERS ON)
endif()
endforeach()
message(STATUS "Precompiled headers enabled for libtesseract (excluding architecture-specific files)")
endif()
# Configure build pools for Ninja
if(ENABLE_NINJA_POOL AND CMAKE_GENERATOR STREQUAL "Ninja")
set_target_properties(libtesseract PROPERTIES JOB_POOL_COMPILE compile)
set_target_properties(libtesseract PROPERTIES JOB_POOL_LINK link)
endif()
target_include_directories(
libtesseract BEFORE
PRIVATE src
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/arch>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/ccmain>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/ccstruct>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/ccutil>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/classify>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/cutil>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/dict>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/lstm>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/textord>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/viewer>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/wordrec>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/training>)
if(BUILD_SHARED_LIBS)
target_compile_definitions(
libtesseract
PRIVATE -DTESS_EXPORTS
INTERFACE -DTESS_IMPORTS)
# generate_export_header (libtesseract EXPORT_MACRO_NAME TESS_API)
endif()
target_link_libraries(libtesseract PRIVATE ${LIB_Ws2_32} ${LIB_pthread})
if(OpenMP_CXX_FOUND)
target_link_libraries(libtesseract PUBLIC OpenMP::OpenMP_CXX)
endif()
if(LibArchive_FOUND)
target_link_libraries(libtesseract PUBLIC ${LibArchive_LIBRARIES})
endif(LibArchive_FOUND)
if(CURL_FOUND)
if(NOT CURL_LIBRARIES)
target_link_libraries(libtesseract PUBLIC CURL::libcurl)
else()
target_link_libraries(libtesseract PUBLIC ${CURL_LIBRARIES})
endif()
endif(CURL_FOUND)
set_target_properties(
libtesseract PROPERTIES VERSION
${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
set_target_properties(
libtesseract PROPERTIES SOVERSION
${VERSION_MAJOR}.${VERSION_MINOR})
set_target_properties(
libtesseract
PROPERTIES
OUTPUT_NAME
tesseract$<$<BOOL:${WIN32}>:${VERSION_MAJOR}${VERSION_MINOR}$<$<CONFIG:DEBUG>:d>>
)
if(SW_BUILD)
target_link_libraries(libtesseract PUBLIC org.sw.demo.danbloomberg.leptonica
org.sw.demo.libarchive.libarchive)
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/TesseractTargets.cmake
"include(${CMAKE_CURRENT_BINARY_DIR}/cppan.cmake)\n")
export(
TARGETS libtesseract
APPEND
FILE ${CMAKE_CURRENT_BINARY_DIR}/TesseractTargets.cmake
NAMESPACE Tesseract::)
else()
target_link_libraries(libtesseract PUBLIC ${Leptonica_LIBRARIES})
export(
TARGETS libtesseract
FILE ${CMAKE_CURRENT_BINARY_DIR}/TesseractTargets.cmake
NAMESPACE Tesseract::)
endif()
if(WIN32
AND CLANG
AND OPENMP_BUILD)
# Workaround for "libomp.lib is not automatically added on Windows" see:
# http://lists.llvm.org/pipermail/openmp-dev/2015-August/000857.html
target_link_libraries(libtesseract PRIVATE ${OpenMP_LIBRARY})
endif()
if(ANDROID)
add_definitions(-DANDROID)
find_package(CpuFeaturesNdkCompat REQUIRED)
target_include_directories(
libtesseract
PRIVATE "${CpuFeaturesNdkCompat_DIR}/../../../include/ndk_compat")
target_link_libraries(libtesseract PRIVATE CpuFeatures::ndk_compat)
endif()
# ##############################################################################
# EXECUTABLE tesseract
# ##############################################################################
add_executable(tesseract src/tesseract.cpp)
target_link_libraries(tesseract libtesseract)
if(HAVE_TIFFIO_H AND WIN32)
target_link_libraries(tesseract ${TIFF_LIBRARIES})
endif()
if(OPENMP_BUILD AND UNIX)
target_link_libraries(tesseract pthread)
endif()
# ##############################################################################
if(BUILD_TESTS
AND EXISTS
${CMAKE_CURRENT_SOURCE_DIR}/unittest/third_party/googletest/CMakeLists.txt
)
enable_testing()
add_subdirectory(unittest/third_party/googletest)
add_subdirectory(unittest)
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.in
@ONLY)
# to resolve generator expression in OUTPUT_NAME
file(
GENERATE
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/tesseract_$<CONFIG>.pc
INPUT ${CMAKE_CURRENT_BINARY_DIR}/tesseract.pc.in)
configure_package_config_file(
cmake/templates/TesseractConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/cmake/tesseract/TesseractConfig.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/tesseract
PATH_VARS INCLUDE_DIR LIBRARY_DIRS)
write_basic_package_version_file(
${CMAKE_CURRENT_BINARY_DIR}/cmake/tesseract/TesseractConfigVersion.cmake
VERSION ${PACKAGE_VERSION}
COMPATIBILITY SameMajorVersion)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/tesseract_$<CONFIG>.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
RENAME tesseract.pc)
install(TARGETS tesseract DESTINATION bin)
if (MSVC)
install(FILES $<TARGET_PDB_FILE:${PROJECT_NAME}> DESTINATION bin OPTIONAL)
endif()
install(
TARGETS libtesseract
EXPORT TesseractTargets
RUNTIME DESTINATION bin
RUNTIME DESTINATION bin
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
if (MSVC AND BUILD_SHARED_LIBS)
install(FILES $<TARGET_PDB_FILE:libtesseract> DESTINATION bin OPTIONAL)
endif()
install(
EXPORT TesseractTargets
NAMESPACE Tesseract::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/tesseract)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(
FILES include/tesseract/baseapi.h
include/tesseract/capi.h
include/tesseract/renderer.h
${CMAKE_CURRENT_BINARY_DIR}/include/tesseract/version.h
include/tesseract/ltrresultiterator.h
include/tesseract/pageiterator.h
include/tesseract/resultiterator.h
include/tesseract/osdetect.h
include/tesseract/publictypes.h
include/tesseract/ocrclass.h
include/tesseract/export.h
include/tesseract/unichar.h
# ${CMAKE_CURRENT_BINARY_DIR}/src/endianness.h
DESTINATION include/tesseract)
if(INSTALL_CONFIGS)
install(FILES ${TESSERACT_CONFIGS}
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/tessdata/configs)
install(FILES ${TESSERACT_TESSCONFIGS}
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/tessdata/tessconfigs)
endif()
# ##############################################################################
# uninstall target
# ##############################################################################
if(NOT TARGET uninstall)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/templates/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY)
add_custom_target(
uninstall
COMMENT "Uninstall installed files"
COMMAND ${CMAKE_COMMAND} -P
${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
endif()
# ##############################################################################
================================================
FILE: CONTRIBUTING.md
================================================
# 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 [user forum](https://groups.google.com/g/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://tesseract-ocr.github.io/tessdoc/ImproveQuality.html) documentation.
* 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://tesseract-ocr.github.io/tessdoc/) or [[2]](https://tesseract-ocr.github.io/tessdoc/tess5/TrainingTesseract-5.html) found in the project documentation.
* 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 [documentation](https://tesseract-ocr.github.io/tessdoc/) 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](https://groups.google.com/g/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
You should always make sure your changes build and run successfully.
For that, your clone needs to have all submodules (`googletest`, `test`) included. To do so, either specify `--recurse-submodules` during the initial clone, or run `git submodule update --init --recursive NAME` for each `NAME` later. If `configure` already created those directories (blocking the clone), remove them first (or `make distclean`), then clone and reconfigure.
Have a look at [the README](./README.md) and [testing README](https://github.com/tesseract-ocr/test/blob/main/README.md) and the [documentation](https://tesseract-ocr.github.io/tessdoc/Compiling-%E2%80%93-GitInstallation.html#unit-test-builds) on installation.
In short, after running `configure` from the build directory of your choice, to build the library and CLI, run `make`. To test it, run `make check`. To build the training tools, run `make training`.
As soon as your changes are building and tests are succeeding, you can publish them. If you have not already, please [fork](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) tesseract (somewhere) on GitHub, and push your changes to that fork (in a new branch). Then [submit as PR](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork).
Please also keep track of reports from CI (automated build status) and Coverity/CodeQL (quality scan). When the indicators show deterioration after your changes, further action may be required to improve them.
================================================
FILE: ChangeLog
================================================
The ChangeLog for all releases from 1.0 (2006-06-16) up to 5.0.0 (2024-11-10)
is available here:
https://github.com/tesseract-ocr/tesseract/blob/64eab6c457b2337dd690746a5fde5c222b40d5f8/ChangeLog
See https://github.com/tesseract-ocr/tesseract/releases for the latest release notes.
================================================
FILE: INSTALL
================================================
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.
================================================
FILE: INSTALL.GIT.md
================================================
## 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++17 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.1.jar](https://search.maven.org/remotecontent?filepath=org/piccolo2d/piccolo2d-core/3.0.1/piccolo2d-core-3.0.1.jar) and
[piccolo2d-extras-3.0.1.jar](https://search.maven.org/remotecontent?filepath=org/piccolo2d/piccolo2d-extras/3.0.1/piccolo2d-extras-3.0.1.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](https://tesseract-ocr.github.io/tessdoc/ViewerDebugging.html).
## cmake
There is alternative build system based on multiplatform [cmake](https://cmake.org/)
### LINUX
mkdir build
cd build && cmake .. && make
sudo make install
### WINDOWS
See the [documentation](https://tesseract-ocr.github.io/tessdoc/) for more information on this.
================================================
FILE: LICENSE
================================================
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.
================================================
FILE: Makefile.am
================================================
## run autogen.sh to create Makefile.in from this file
ACLOCAL_AMFLAGS = -I m4
.PHONY: doc html install-langs ScrollView.jar install-jars pdf training
CLEANFILES =
SUBDIRS = . tessdata
if MINGW
SUBDIRS += nsis
endif
EXTRA_DIST = README.md LICENSE
EXTRA_DIST += aclocal.m4 config configure.ac autogen.sh
EXTRA_DIST += tesseract.pc.in doc
if !GRAPHICS_DISABLED
EXTRA_DIST += java
endif
EXTRA_DIST += CMakeLists.txt tesseract.pc.cmake cmake VERSION
DIST_SUBDIRS = $(SUBDIRS)
EXTRA_PROGRAMS =
uninstall-hook:
rm -rf $(DESTDIR)$(pkgincludedir)
dist-hook:
# 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 $(distdir)/doc/html/* $(distdir)/doc/*.log
if !GRAPHICS_DISABLED
ScrollView.jar:
@cd "$(top_builddir)/java" && $(MAKE) $@
install-jars:
@cd "$(top_builddir)/java" && $(MAKE) $@
endif
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_builddir)/doc/html/*
@tar --create --directory=$(top_builddir)/doc/html --verbose --file=- . | gzip -c -9 > $(top_builddir)/@PACKAGE_NAME@-@PACKAGE_VERSION@-doc-html.tar.gz;
doc-clean:
rm -rf $(top_builddir)/doc/html/*
if MINGW
winsetup: training ScrollView.jar
@cd "$(top_builddir)/nsis" && $(MAKE) winsetup
endif
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = tesseract.pc
pkginclude_HEADERS = $(top_builddir)/include/tesseract/version.h
pkginclude_HEADERS += include/tesseract/baseapi.h
pkginclude_HEADERS += include/tesseract/capi.h
pkginclude_HEADERS += include/tesseract/export.h
pkginclude_HEADERS += include/tesseract/ltrresultiterator.h
pkginclude_HEADERS += include/tesseract/ocrclass.h
pkginclude_HEADERS += include/tesseract/osdetect.h
pkginclude_HEADERS += include/tesseract/pageiterator.h
pkginclude_HEADERS += include/tesseract/publictypes.h
pkginclude_HEADERS += include/tesseract/renderer.h
pkginclude_HEADERS += include/tesseract/resultiterator.h
pkginclude_HEADERS += include/tesseract/unichar.h
# Rules for all subdirectories.
noinst_HEADERS =
noinst_LTLIBRARIES =
AM_CPPFLAGS += -I$(top_srcdir)/include
AM_CPPFLAGS += -I$(top_builddir)/include
if VISIBILITY
AM_CPPFLAGS += -DTESS_EXPORTS
AM_CPPFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden -fPIC
endif
AM_CXXFLAGS = $(OPENMP_CXXFLAGS)
# Rules for src/api.
libtesseract_la_CPPFLAGS = $(AM_CPPFLAGS)
libtesseract_la_CPPFLAGS += -DTESS_COMMON_TRAINING_API=
libtesseract_la_CPPFLAGS += -I$(top_srcdir)/src/arch
libtesseract_la_CPPFLAGS += -I$(top_srcdir)/src/ccmain
libtesseract_la_CPPFLAGS += -I$(top_srcdir)/src/ccstruct
libtesseract_la_CPPFLAGS += -I$(top_srcdir)/src/ccutil
libtesseract_la_CPPFLAGS += -I$(top_srcdir)/src/classify
libtesseract_la_CPPFLAGS += -I$(top_srcdir)/src/cutil
libtesseract_la_CPPFLAGS += -I$(top_srcdir)/src/dict
libtesseract_la_CPPFLAGS += -I$(top_srcdir)/src/lstm
libtesseract_la_CPPFLAGS += -I$(top_srcdir)/src/textord
libtesseract_la_CPPFLAGS += -I$(top_srcdir)/src/training/common
libtesseract_la_CPPFLAGS += -I$(top_srcdir)/src/viewer
libtesseract_la_CPPFLAGS += -I$(top_srcdir)/src/wordrec
libtesseract_la_CPPFLAGS += $(libcurl_CFLAGS)
lib_LTLIBRARIES = libtesseract.la
libtesseract_la_LDFLAGS = $(LEPTONICA_LIBS)
libtesseract_la_LDFLAGS += $(libarchive_LIBS)
libtesseract_la_LDFLAGS += $(libcurl_LIBS)
if T_WIN
libtesseract_la_LDFLAGS += -no-undefined -lws2_32
else
libtesseract_la_LDFLAGS += $(NOUNDEFINED)
endif
libtesseract_la_LDFLAGS += -version-info $(GENERIC_LIBRARY_VERSION)
libtesseract_la_SOURCES = src/api/baseapi.cpp
libtesseract_la_SOURCES += src/api/altorenderer.cpp
libtesseract_la_SOURCES += src/api/pagerenderer.cpp
libtesseract_la_SOURCES += src/api/capi.cpp
libtesseract_la_SOURCES += src/api/hocrrenderer.cpp
libtesseract_la_SOURCES += src/api/lstmboxrenderer.cpp
libtesseract_la_SOURCES += src/api/pdfrenderer.cpp
libtesseract_la_SOURCES += src/api/renderer.cpp
libtesseract_la_SOURCES += src/api/wordstrboxrenderer.cpp
libtesseract_la_LIBADD = libtesseract_ccutil.la
libtesseract_la_LIBADD += libtesseract_lstm.la
libtesseract_la_LIBADD += libtesseract_native.la
# Rules for src/arch.
noinst_HEADERS += src/arch/dotproduct.h
noinst_HEADERS += src/arch/intsimdmatrix.h
noinst_HEADERS += src/arch/simddetect.h
noinst_LTLIBRARIES += libtesseract_native.la
libtesseract_native_la_CXXFLAGS = -O3 -ffast-math
if OPENMP_SIMD
libtesseract_native_la_CXXFLAGS += -fopenmp-simd -DOPENMP_SIMD
endif
libtesseract_native_la_CXXFLAGS += -I$(top_srcdir)/src/ccutil
libtesseract_native_la_SOURCES = src/arch/dotproduct.cpp
if HAVE_AVX
libtesseract_avx_la_CXXFLAGS = -mavx
libtesseract_avx_la_CXXFLAGS += -I$(top_srcdir)/src/ccutil
libtesseract_avx_la_SOURCES = src/arch/dotproductavx.cpp
libtesseract_la_LIBADD += libtesseract_avx.la
noinst_LTLIBRARIES += libtesseract_avx.la
endif
if HAVE_AVX2
libtesseract_avx2_la_CXXFLAGS = -mavx2
libtesseract_avx2_la_CXXFLAGS += -I$(top_srcdir)/src/ccutil
libtesseract_avx2_la_SOURCES = src/arch/intsimdmatrixavx2.cpp
libtesseract_la_LIBADD += libtesseract_avx2.la
noinst_LTLIBRARIES += libtesseract_avx2.la
endif
if HAVE_AVX512F
libtesseract_avx512_la_CXXFLAGS = -mavx512f
libtesseract_avx512_la_CXXFLAGS += -I$(top_srcdir)/src/ccutil
libtesseract_avx512_la_SOURCES = src/arch/dotproductavx512.cpp
libtesseract_la_LIBADD += libtesseract_avx512.la
noinst_LTLIBRARIES += libtesseract_avx512.la
endif
if HAVE_FMA
libtesseract_fma_la_CXXFLAGS = -mfma
libtesseract_fma_la_CXXFLAGS += -I$(top_srcdir)/src/ccutil
libtesseract_fma_la_SOURCES = src/arch/dotproductfma.cpp
libtesseract_la_LIBADD += libtesseract_fma.la
noinst_LTLIBRARIES += libtesseract_fma.la
endif
if HAVE_SSE4_1
libtesseract_sse_la_CXXFLAGS = -msse4.1
libtesseract_sse_la_CXXFLAGS += -I$(top_srcdir)/src/ccutil
libtesseract_sse_la_SOURCES = src/arch/dotproductsse.cpp src/arch/intsimdmatrixsse.cpp
libtesseract_la_LIBADD += libtesseract_sse.la
noinst_LTLIBRARIES += libtesseract_sse.la
endif
if HAVE_NEON
libtesseract_neon_la_CXXFLAGS = $(NEON_CXXFLAGS)
libtesseract_neon_la_CXXFLAGS += -O3
if OPENMP_SIMD
libtesseract_neon_la_CXXFLAGS += -fopenmp-simd -DOPENMP_SIMD
endif
libtesseract_neon_la_CXXFLAGS += -I$(top_srcdir)/src/ccutil
libtesseract_neon_la_SOURCES = src/arch/intsimdmatrixneon.cpp
libtesseract_neon_la_SOURCES += src/arch/dotproductneon.cpp
libtesseract_la_LIBADD += libtesseract_neon.la
noinst_LTLIBRARIES += libtesseract_neon.la
endif
if HAVE_RVV
libtesseract_rvv_la_CXXFLAGS = $(RVV_CXXFLAGS)
libtesseract_rvv_la_CXXFLAGS += -O3
libtesseract_rvv_la_CXXFLAGS += -I$(top_srcdir)/src/ccutil
libtesseract_rvv_la_SOURCES = src/arch/intsimdmatrixrvv.cpp
libtesseract_la_LIBADD += libtesseract_rvv.la
noinst_LTLIBRARIES += libtesseract_rvv.la
endif
libtesseract_la_SOURCES += src/arch/intsimdmatrix.cpp
libtesseract_la_SOURCES += src/arch/simddetect.cpp
# Rules for src/ccmain.
noinst_HEADERS += src/ccmain/control.h
noinst_HEADERS += src/ccmain/mutableiterator.h
noinst_HEADERS += src/ccmain/output.h
noinst_HEADERS += src/ccmain/paragraphs.h
noinst_HEADERS += src/ccmain/paragraphs_internal.h
noinst_HEADERS += src/ccmain/paramsd.h
noinst_HEADERS += src/ccmain/pgedit.h
noinst_HEADERS += src/ccmain/tesseractclass.h
noinst_HEADERS += src/ccmain/tessvars.h
noinst_HEADERS += src/ccmain/thresholder.h
noinst_HEADERS += src/ccmain/werdit.h
if !DISABLED_LEGACY_ENGINE
noinst_HEADERS += src/ccmain/docqual.h
noinst_HEADERS += src/ccmain/equationdetect.h
noinst_HEADERS += src/ccmain/fixspace.h
noinst_HEADERS += src/ccmain/reject.h
endif
libtesseract_la_SOURCES += src/ccmain/applybox.cpp
libtesseract_la_SOURCES += src/ccmain/control.cpp
libtesseract_la_SOURCES += src/ccmain/linerec.cpp
libtesseract_la_SOURCES += src/ccmain/ltrresultiterator.cpp
libtesseract_la_SOURCES += src/ccmain/mutableiterator.cpp
libtesseract_la_SOURCES += src/ccmain/output.cpp
libtesseract_la_SOURCES += src/ccmain/pageiterator.cpp
libtesseract_la_SOURCES += src/ccmain/pagesegmain.cpp
libtesseract_la_SOURCES += src/ccmain/pagewalk.cpp
libtesseract_la_SOURCES += src/ccmain/paragraphs.cpp
if !GRAPHICS_DISABLED
libtesseract_la_SOURCES += src/ccmain/paramsd.cpp
libtesseract_la_SOURCES += src/ccmain/pgedit.cpp
endif
libtesseract_la_SOURCES += src/ccmain/reject.cpp
libtesseract_la_SOURCES += src/ccmain/resultiterator.cpp
libtesseract_la_SOURCES += src/ccmain/tessedit.cpp
libtesseract_la_SOURCES += src/ccmain/tesseractclass.cpp
libtesseract_la_SOURCES += src/ccmain/tessvars.cpp
libtesseract_la_SOURCES += src/ccmain/thresholder.cpp
libtesseract_la_SOURCES += src/ccmain/werdit.cpp
if !DISABLED_LEGACY_ENGINE
libtesseract_la_SOURCES += src/ccmain/adaptions.cpp
libtesseract_la_SOURCES += src/ccmain/docqual.cpp
libtesseract_la_SOURCES += src/ccmain/equationdetect.cpp
libtesseract_la_SOURCES += src/ccmain/fixspace.cpp
libtesseract_la_SOURCES += src/ccmain/fixxht.cpp
libtesseract_la_SOURCES += src/ccmain/osdetect.cpp
libtesseract_la_SOURCES += src/ccmain/par_control.cpp
libtesseract_la_SOURCES += src/ccmain/recogtraining.cpp
libtesseract_la_SOURCES += src/ccmain/superscript.cpp
libtesseract_la_SOURCES += src/ccmain/tessbox.cpp
libtesseract_la_SOURCES += src/ccmain/tfacepp.cpp
endif
# Rules for src/ccstruct.
noinst_HEADERS += src/ccstruct/blamer.h
noinst_HEADERS += src/ccstruct/blobbox.h
noinst_HEADERS += src/ccstruct/blobs.h
noinst_HEADERS += src/ccstruct/blread.h
noinst_HEADERS += src/ccstruct/boxread.h
noinst_HEADERS += src/ccstruct/boxword.h
noinst_HEADERS += src/ccstruct/ccstruct.h
noinst_HEADERS += src/ccstruct/coutln.h
noinst_HEADERS += src/ccstruct/crakedge.h
noinst_HEADERS += src/ccstruct/debugpixa.h
noinst_HEADERS += src/ccstruct/detlinefit.h
noinst_HEADERS += src/ccstruct/dppoint.h
noinst_HEADERS += src/ccstruct/image.h
noinst_HEADERS += src/ccstruct/imagedata.h
noinst_HEADERS += src/ccstruct/linlsq.h
noinst_HEADERS += src/ccstruct/matrix.h
noinst_HEADERS += src/ccstruct/mod128.h
noinst_HEADERS += src/ccstruct/normalis.h
noinst_HEADERS += src/ccstruct/ocrblock.h
noinst_HEADERS += src/ccstruct/ocrpara.h
noinst_HEADERS += src/ccstruct/ocrrow.h
noinst_HEADERS += src/ccstruct/otsuthr.h
noinst_HEADERS += src/ccstruct/pageres.h
noinst_HEADERS += src/ccstruct/pdblock.h
noinst_HEADERS += src/ccstruct/points.h
noinst_HEADERS += src/ccstruct/polyaprx.h
noinst_HEADERS += src/ccstruct/polyblk.h
noinst_HEADERS += src/ccstruct/quadlsq.h
noinst_HEADERS += src/ccstruct/quadratc.h
noinst_HEADERS += src/ccstruct/quspline.h
noinst_HEADERS += src/ccstruct/ratngs.h
noinst_HEADERS += src/ccstruct/rect.h
noinst_HEADERS += src/ccstruct/rejctmap.h
noinst_HEADERS += src/ccstruct/seam.h
noinst_HEADERS += src/ccstruct/split.h
noinst_HEADERS += src/ccstruct/statistc.h
noinst_HEADERS += src/ccstruct/stepblob.h
noinst_HEADERS += src/ccstruct/werd.h
if !DISABLED_LEGACY_ENGINE
noinst_HEADERS += src/ccstruct/fontinfo.h
noinst_HEADERS += src/ccstruct/params_training_featdef.h
endif
libtesseract_la_SOURCES += src/ccstruct/blamer.cpp
libtesseract_la_SOURCES += src/ccstruct/blobbox.cpp
libtesseract_la_SOURCES += src/ccstruct/blobs.cpp
libtesseract_la_SOURCES += src/ccstruct/blread.cpp
libtesseract_la_SOURCES += src/ccstruct/boxread.cpp
libtesseract_la_SOURCES += src/ccstruct/boxword.cpp
libtesseract_la_SOURCES += src/ccstruct/ccstruct.cpp
libtesseract_la_SOURCES += src/ccstruct/coutln.cpp
libtesseract_la_SOURCES += src/ccstruct/detlinefit.cpp
libtesseract_la_SOURCES += src/ccstruct/dppoint.cpp
libtesseract_la_SOURCES += src/ccstruct/image.cpp
libtesseract_la_SOURCES += src/ccstruct/imagedata.cpp
libtesseract_la_SOURCES += src/ccstruct/linlsq.cpp
libtesseract_la_SOURCES += src/ccstruct/matrix.cpp
libtesseract_la_SOURCES += src/ccstruct/mod128.cpp
libtesseract_la_SOURCES += src/ccstruct/normalis.cpp
libtesseract_la_SOURCES += src/ccstruct/ocrblock.cpp
libtesseract_la_SOURCES += src/ccstruct/ocrpara.cpp
libtesseract_la_SOURCES += src/ccstruct/ocrrow.cpp
libtesseract_la_SOURCES += src/ccstruct/otsuthr.cpp
libtesseract_la_SOURCES += src/ccstruct/pageres.cpp
libtesseract_la_SOURCES += src/ccstruct/pdblock.cpp
libtesseract_la_SOURCES += src/ccstruct/points.cpp
libtesseract_la_SOURCES += src/ccstruct/polyaprx.cpp
libtesseract_la_SOURCES += src/ccstruct/polyblk.cpp
libtesseract_la_SOURCES += src/ccstruct/quadlsq.cpp
libtesseract_la_SOURCES += src/ccstruct/quspline.cpp
libtesseract_la_SOURCES += src/ccstruct/ratngs.cpp
libtesseract_la_SOURCES += src/ccstruct/rect.cpp
libtesseract_la_SOURCES += src/ccstruct/rejctmap.cpp
libtesseract_la_SOURCES += src/ccstruct/seam.cpp
libtesseract_la_SOURCES += src/ccstruct/split.cpp
libtesseract_la_SOURCES += src/ccstruct/statistc.cpp
libtesseract_la_SOURCES += src/ccstruct/stepblob.cpp
libtesseract_la_SOURCES += src/ccstruct/werd.cpp
if !DISABLED_LEGACY_ENGINE
libtesseract_la_SOURCES += src/ccstruct/fontinfo.cpp
libtesseract_la_SOURCES += src/ccstruct/params_training_featdef.cpp
endif
# Rules for src/ccutil
libtesseract_ccutil_la_CPPFLAGS = $(AM_CPPFLAGS)
libtesseract_ccutil_la_CPPFLAGS += $(libarchive_CFLAGS)
if !NO_TESSDATA_PREFIX
libtesseract_ccutil_la_CPPFLAGS += -DTESSDATA_PREFIX='"@datadir@"'
endif
noinst_HEADERS += src/ccutil/ccutil.h
noinst_HEADERS += src/ccutil/clst.h
noinst_HEADERS += src/ccutil/elst2.h
noinst_HEADERS += src/ccutil/elst.h
noinst_HEADERS += src/ccutil/errcode.h
noinst_HEADERS += src/ccutil/fileerr.h
noinst_HEADERS += src/ccutil/genericheap.h
noinst_HEADERS += src/ccutil/genericvector.h
noinst_HEADERS += src/ccutil/helpers.h
noinst_HEADERS += src/ccutil/host.h
noinst_HEADERS += src/ccutil/kdpair.h
noinst_HEADERS += src/ccutil/lsterr.h
noinst_HEADERS += src/ccutil/object_cache.h
noinst_HEADERS += src/ccutil/params.h
noinst_HEADERS += src/ccutil/qrsequence.h
noinst_HEADERS += src/ccutil/sorthelper.h
noinst_HEADERS += src/ccutil/scanutils.h
noinst_HEADERS += src/ccutil/serialis.h
noinst_HEADERS += src/ccutil/tessdatamanager.h
noinst_HEADERS += src/ccutil/tprintf.h
noinst_HEADERS += src/ccutil/unicharcompress.h
noinst_HEADERS += src/ccutil/unicharmap.h
noinst_HEADERS += src/ccutil/unicharset.h
noinst_HEADERS += src/ccutil/unicity_table.h
if !DISABLED_LEGACY_ENGINE
noinst_HEADERS += src/ccutil/ambigs.h
noinst_HEADERS += src/ccutil/bitvector.h
noinst_HEADERS += src/ccutil/indexmapbidi.h
noinst_HEADERS += src/ccutil/universalambigs.h
endif
noinst_LTLIBRARIES += libtesseract_ccutil.la
libtesseract_ccutil_la_SOURCES = src/ccutil/ccutil.cpp
libtesseract_ccutil_la_SOURCES += src/ccutil/errcode.cpp
libtesseract_ccutil_la_SOURCES += src/ccutil/serialis.cpp
libtesseract_ccutil_la_SOURCES += src/ccutil/scanutils.cpp
libtesseract_ccutil_la_SOURCES += src/ccutil/tessdatamanager.cpp
libtesseract_ccutil_la_SOURCES += src/ccutil/tprintf.cpp
libtesseract_ccutil_la_SOURCES += src/ccutil/unichar.cpp
libtesseract_ccutil_la_SOURCES += src/ccutil/unicharcompress.cpp
libtesseract_ccutil_la_SOURCES += src/ccutil/unicharmap.cpp
libtesseract_ccutil_la_SOURCES += src/ccutil/unicharset.cpp
libtesseract_ccutil_la_SOURCES += src/ccutil/params.cpp
if !DISABLED_LEGACY_ENGINE
libtesseract_ccutil_la_SOURCES += src/ccutil/ambigs.cpp
libtesseract_ccutil_la_SOURCES += src/ccutil/bitvector.cpp
libtesseract_ccutil_la_SOURCES += src/ccutil/indexmapbidi.cpp
endif
# Rules for src/classify.
noinst_HEADERS += src/classify/classify.h
if !DISABLED_LEGACY_ENGINE
noinst_HEADERS += src/classify/adaptive.h
noinst_HEADERS += src/classify/cluster.h
noinst_HEADERS += src/classify/clusttool.h
noinst_HEADERS += src/classify/featdefs.h
noinst_HEADERS += src/classify/float2int.h
noinst_HEADERS += src/classify/fpoint.h
noinst_HEADERS += src/classify/intfeaturespace.h
noinst_HEADERS += src/classify/intfx.h
noinst_HEADERS += src/classify/intmatcher.h
noinst_HEADERS += src/classify/intproto.h
noinst_HEADERS += src/classify/kdtree.h
noinst_HEADERS += src/classify/mf.h
noinst_HEADERS += src/classify/mfdefs.h
noinst_HEADERS += src/classify/mfoutline.h
noinst_HEADERS += src/classify/mfx.h
noinst_HEADERS += src/classify/normfeat.h
noinst_HEADERS += src/classify/normmatch.h
noinst_HEADERS += src/classify/ocrfeatures.h
noinst_HEADERS += src/classify/outfeat.h
noinst_HEADERS += src/classify/picofeat.h
noinst_HEADERS += src/classify/protos.h
noinst_HEADERS += src/classify/shapeclassifier.h
noinst_HEADERS += src/classify/shapetable.h
noinst_HEADERS += src/classify/tessclassifier.h
noinst_HEADERS += src/classify/trainingsample.h
endif
libtesseract_la_SOURCES += src/classify/classify.cpp
if !DISABLED_LEGACY_ENGINE
libtesseract_la_SOURCES += src/classify/adaptive.cpp
libtesseract_la_SOURCES += src/classify/adaptmatch.cpp
libtesseract_la_SOURCES += src/classify/blobclass.cpp
libtesseract_la_SOURCES += src/classify/cluster.cpp
libtesseract_la_SOURCES += src/classify/clusttool.cpp
libtesseract_la_SOURCES += src/classify/cutoffs.cpp
libtesseract_la_SOURCES += src/classify/featdefs.cpp
libtesseract_la_SOURCES += src/classify/float2int.cpp
libtesseract_la_SOURCES += src/classify/fpoint.cpp
libtesseract_la_SOURCES += src/classify/intfeaturespace.cpp
libtesseract_la_SOURCES += src/classify/intfx.cpp
libtesseract_la_SOURCES += src/classify/intmatcher.cpp
libtesseract_la_SOURCES += src/classify/intproto.cpp
libtesseract_la_SOURCES += src/classify/kdtree.cpp
libtesseract_la_SOURCES += src/classify/mf.cpp
libtesseract_la_SOURCES += src/classify/mfoutline.cpp
libtesseract_la_SOURCES += src/classify/mfx.cpp
libtesseract_la_SOURCES += src/classify/normfeat.cpp
libtesseract_la_SOURCES += src/classify/normmatch.cpp
libtesseract_la_SOURCES += src/classify/ocrfeatures.cpp
libtesseract_la_SOURCES += src/classify/outfeat.cpp
libtesseract_la_SOURCES += src/classify/picofeat.cpp
libtesseract_la_SOURCES += src/classify/protos.cpp
libtesseract_la_SOURCES += src/classify/shapeclassifier.cpp
libtesseract_la_SOURCES += src/classify/shapetable.cpp
libtesseract_la_SOURCES += src/classify/tessclassifier.cpp
libtesseract_la_SOURCES += src/classify/trainingsample.cpp
endif
# Rules for src/cutil.
if !DISABLED_LEGACY_ENGINE
noinst_HEADERS += src/cutil/bitvec.h
noinst_HEADERS += src/cutil/oldlist.h
endif
if !DISABLED_LEGACY_ENGINE
libtesseract_la_SOURCES += src/cutil/oldlist.cpp
endif
# Rules for src/dict.
noinst_HEADERS += src/dict/dawg.h
noinst_HEADERS += src/dict/dawg_cache.h
noinst_HEADERS += src/dict/dict.h
noinst_HEADERS += src/dict/matchdefs.h
noinst_HEADERS += src/dict/stopper.h
noinst_HEADERS += src/dict/trie.h
libtesseract_la_SOURCES += src/dict/context.cpp
libtesseract_la_SOURCES += src/dict/dawg.cpp
libtesseract_la_SOURCES += src/dict/dawg_cache.cpp
libtesseract_la_SOURCES += src/dict/dict.cpp
libtesseract_la_SOURCES += src/dict/stopper.cpp
libtesseract_la_SOURCES += src/dict/trie.cpp
if !DISABLED_LEGACY_ENGINE
libtesseract_la_SOURCES += src/dict/hyphen.cpp
libtesseract_la_SOURCES += src/dict/permdawg.cpp
endif
# Rules for src/lstm.
libtesseract_lstm_la_CPPFLAGS = $(AM_CPPFLAGS)
libtesseract_lstm_la_CPPFLAGS += -I$(top_srcdir)/src/arch
libtesseract_lstm_la_CPPFLAGS += -I$(top_srcdir)/src/ccstruct
libtesseract_lstm_la_CPPFLAGS += -I$(top_srcdir)/src/ccutil
libtesseract_lstm_la_CPPFLAGS += -I$(top_srcdir)/src/classify
libtesseract_lstm_la_CPPFLAGS += -I$(top_srcdir)/src/cutil
libtesseract_lstm_la_CPPFLAGS += -I$(top_srcdir)/src/dict
libtesseract_lstm_la_CPPFLAGS += -I$(top_srcdir)/src/lstm
libtesseract_lstm_la_CPPFLAGS += -I$(top_srcdir)/src/viewer
if !NO_TESSDATA_PREFIX
libtesseract_lstm_la_CPPFLAGS += -DTESSDATA_PREFIX='"@datadir@"'
endif
noinst_HEADERS += src/lstm/convolve.h
noinst_HEADERS += src/lstm/fullyconnected.h
noinst_HEADERS += src/lstm/functions.h
noinst_HEADERS += src/lstm/input.h
noinst_HEADERS += src/lstm/lstm.h
noinst_HEADERS += src/lstm/lstmrecognizer.h
noinst_HEADERS += src/lstm/maxpool.h
noinst_HEADERS += src/lstm/network.h
noinst_HEADERS += src/lstm/networkio.h
noinst_HEADERS += src/lstm/networkscratch.h
noinst_HEADERS += src/lstm/parallel.h
noinst_HEADERS += src/lstm/plumbing.h
noinst_HEADERS += src/lstm/recodebeam.h
noinst_HEADERS += src/lstm/reconfig.h
noinst_HEADERS += src/lstm/reversed.h
noinst_HEADERS += src/lstm/series.h
noinst_HEADERS += src/lstm/static_shape.h
noinst_HEADERS += src/lstm/stridemap.h
noinst_HEADERS += src/lstm/weightmatrix.h
noinst_LTLIBRARIES += libtesseract_lstm.la
libtesseract_lstm_la_SOURCES = src/lstm/convolve.cpp
libtesseract_lstm_la_SOURCES += src/lstm/fullyconnected.cpp
libtesseract_lstm_la_SOURCES += src/lstm/functions.cpp
libtesseract_lstm_la_SOURCES += src/lstm/input.cpp
libtesseract_lstm_la_SOURCES += src/lstm/lstm.cpp
libtesseract_lstm_la_SOURCES += src/lstm/lstmrecognizer.cpp
libtesseract_lstm_la_SOURCES += src/lstm/maxpool.cpp
libtesseract_lstm_la_SOURCES += src/lstm/network.cpp
libtesseract_lstm_la_SOURCES += src/lstm/networkio.cpp
libtesseract_lstm_la_SOURCES += src/lstm/parallel.cpp
libtesseract_lstm_la_SOURCES += src/lstm/plumbing.cpp
libtesseract_lstm_la_SOURCES += src/lstm/recodebeam.cpp
libtesseract_lstm_la_SOURCES += src/lstm/reconfig.cpp
libtesseract_lstm_la_SOURCES += src/lstm/reversed.cpp
libtesseract_lstm_la_SOURCES += src/lstm/series.cpp
libtesseract_lstm_la_SOURCES += src/lstm/stridemap.cpp
libtesseract_lstm_la_SOURCES += src/lstm/weightmatrix.cpp
# Rules for src/textord.
noinst_HEADERS += src/textord/alignedblob.h
noinst_HEADERS += src/textord/baselinedetect.h
noinst_HEADERS += src/textord/bbgrid.h
noinst_HEADERS += src/textord/blkocc.h
noinst_HEADERS += src/textord/blobgrid.h
noinst_HEADERS += src/textord/ccnontextdetect.h
noinst_HEADERS += src/textord/cjkpitch.h
noinst_HEADERS += src/textord/colfind.h
noinst_HEADERS += src/textord/colpartition.h
noinst_HEADERS += src/textord/colpartitionset.h
noinst_HEADERS += src/textord/colpartitiongrid.h
noinst_HEADERS += src/textord/devanagari_processing.h
noinst_HEADERS += src/textord/drawtord.h
noinst_HEADERS += src/textord/edgblob.h
noinst_HEADERS += src/textord/edgloop.h
noinst_HEADERS += src/textord/fpchop.h
noinst_HEADERS += src/textord/gap_map.h
noinst_HEADERS += src/textord/imagefind.h
noinst_HEADERS += src/textord/linefind.h
noinst_HEADERS += src/textord/makerow.h
noinst_HEADERS += src/textord/oldbasel.h
noinst_HEADERS += src/textord/pithsync.h
noinst_HEADERS += src/textord/pitsync1.h
noinst_HEADERS += src/textord/scanedg.h
noinst_HEADERS += src/textord/sortflts.h
noinst_HEADERS += src/textord/strokewidth.h
noinst_HEADERS += src/textord/tabfind.h
noinst_HEADERS += src/textord/tablefind.h
noinst_HEADERS += src/textord/tabvector.h
noinst_HEADERS += src/textord/tablerecog.h
noinst_HEADERS += src/textord/textlineprojection.h
noinst_HEADERS += src/textord/textord.h
noinst_HEADERS += src/textord/topitch.h
noinst_HEADERS += src/textord/tordmain.h
noinst_HEADERS += src/textord/tovars.h
noinst_HEADERS += src/textord/underlin.h
noinst_HEADERS += src/textord/wordseg.h
noinst_HEADERS += src/textord/workingpartset.h
if !DISABLED_LEGACY_ENGINE
noinst_HEADERS += src/textord/equationdetectbase.h
endif
libtesseract_la_SOURCES += src/textord/alignedblob.cpp
libtesseract_la_SOURCES += src/textord/baselinedetect.cpp
libtesseract_la_SOURCES += src/textord/bbgrid.cpp
libtesseract_la_SOURCES += src/textord/blkocc.cpp
libtesseract_la_SOURCES += src/textord/blobgrid.cpp
libtesseract_la_SOURCES += src/textord/ccnontextdetect.cpp
libtesseract_la_SOURCES += src/textord/cjkpitch.cpp
libtesseract_la_SOURCES += src/textord/colfind.cpp
libtesseract_la_SOURCES += src/textord/colpartition.cpp
libtesseract_la_SOURCES += src/textord/colpartitionset.cpp
libtesseract_la_SOURCES += src/textord/colpartitiongrid.cpp
libtesseract_la_SOURCES += src/textord/devanagari_processing.cpp
libtesseract_la_SOURCES += src/textord/drawtord.cpp
libtesseract_la_SOURCES += src/textord/edgblob.cpp
libtesseract_la_SOURCES += src/textord/edgloop.cpp
libtesseract_la_SOURCES += src/textord/fpchop.cpp
libtesseract_la_SOURCES += src/textord/gap_map.cpp
libtesseract_la_SOURCES += src/textord/imagefind.cpp
libtesseract_la_SOURCES += src/textord/linefind.cpp
libtesseract_la_SOURCES += src/textord/makerow.cpp
libtesseract_la_SOURCES += src/textord/oldbasel.cpp
libtesseract_la_SOURCES += src/textord/pithsync.cpp
libtesseract_la_SOURCES += src/textord/pitsync1.cpp
libtesseract_la_SOURCES += src/textord/scanedg.cpp
libtesseract_la_SOURCES += src/textord/sortflts.cpp
libtesseract_la_SOURCES += src/textord/strokewidth.cpp
libtesseract_la_SOURCES += src/textord/tabfind.cpp
libtesseract_la_SOURCES += src/textord/tablefind.cpp
libtesseract_la_SOURCES += src/textord/tabvector.cpp
libtesseract_la_SOURCES += src/textord/tablerecog.cpp
libtesseract_la_SOURCES += src/textord/textlineprojection.cpp
libtesseract_la_SOURCES += src/textord/textord.cpp
libtesseract_la_SOURCES += src/textord/topitch.cpp
libtesseract_la_SOURCES += src/textord/tordmain.cpp
libtesseract_la_SOURCES += src/textord/tospace.cpp
libtesseract_la_SOURCES += src/textord/tovars.cpp
libtesseract_la_SOURCES += src/textord/underlin.cpp
libtesseract_la_SOURCES += src/textord/wordseg.cpp
libtesseract_la_SOURCES += src/textord/workingpartset.cpp
if !DISABLED_LEGACY_ENGINE
libtesseract_la_SOURCES += src/textord/equationdetectbase.cpp
endif
# Rules for src/viewer.
if !GRAPHICS_DISABLED
noinst_HEADERS += src/viewer/scrollview.h
noinst_HEADERS += src/viewer/svmnode.h
noinst_HEADERS += src/viewer/svutil.h
libtesseract_la_SOURCES += src/viewer/scrollview.cpp
libtesseract_la_SOURCES += src/viewer/svmnode.cpp
libtesseract_la_SOURCES += src/viewer/svutil.cpp
EXTRA_PROGRAMS += svpaint
svpaint_CPPFLAGS = $(AM_CPPFLAGS)
svpaint_CPPFLAGS += -I$(top_srcdir)/src/ccstruct
svpaint_CPPFLAGS += -I$(top_srcdir)/src/viewer
svpaint_SOURCES = src/svpaint.cpp
svpaint_LDADD = libtesseract.la
endif
# Rules for src/wordrec.
noinst_HEADERS += src/wordrec/wordrec.h
if !DISABLED_LEGACY_ENGINE
noinst_HEADERS += src/wordrec/associate.h
noinst_HEADERS += src/wordrec/chop.h
noinst_HEADERS += src/wordrec/drawfx.h
noinst_HEADERS += src/wordrec/findseam.h
noinst_HEADERS += src/wordrec/language_model.h
noinst_HEADERS += src/wordrec/lm_consistency.h
noinst_HEADERS += src/wordrec/lm_pain_points.h
noinst_HEADERS += src/wordrec/lm_state.h
noinst_HEADERS += src/wordrec/outlines.h
noinst_HEADERS += src/wordrec/params_model.h
noinst_HEADERS += src/wordrec/plotedges.h
noinst_HEADERS += src/wordrec/render.h
endif
libtesseract_la_SOURCES += src/wordrec/tface.cpp
libtesseract_la_SOURCES += src/wordrec/wordrec.cpp
if !DISABLED_LEGACY_ENGINE
libtesseract_la_SOURCES += src/wordrec/associate.cpp
libtesseract_la_SOURCES += src/wordrec/chop.cpp
libtesseract_la_SOURCES += src/wordrec/chopper.cpp
libtesseract_la_SOURCES += src/wordrec/drawfx.cpp
libtesseract_la_SOURCES += src/wordrec/findseam.cpp
libtesseract_la_SOURCES += src/wordrec/gradechop.cpp
libtesseract_la_SOURCES += src/wordrec/language_model.cpp
libtesseract_la_SOURCES += src/wordrec/lm_consistency.cpp
libtesseract_la_SOURCES += src/wordrec/lm_pain_points.cpp
libtesseract_la_SOURCES += src/wordrec/lm_state.cpp
libtesseract_la_SOURCES += src/wordrec/outlines.cpp
libtesseract_la_SOURCES += src/wordrec/params_model.cpp
libtesseract_la_SOURCES += src/wordrec/pieces.cpp
if !GRAPHICS_DISABLED
libtesseract_la_SOURCES += src/wordrec/plotedges.cpp
endif
libtesseract_la_SOURCES += src/wordrec/render.cpp
libtesseract_la_SOURCES += src/wordrec/segsearch.cpp
libtesseract_la_SOURCES += src/wordrec/wordclass.cpp
endif
# Rules for tesseract executable.
bin_PROGRAMS = tesseract
tesseract_SOURCES = src/tesseract.cpp
tesseract_CPPFLAGS = $(AM_CPPFLAGS)
tesseract_CPPFLAGS += -I$(top_srcdir)/src/arch
tesseract_CPPFLAGS += -I$(top_srcdir)/src/ccmain
tesseract_CPPFLAGS += -I$(top_srcdir)/src/ccstruct
tesseract_CPPFLAGS += -I$(top_srcdir)/src/ccutil
tesseract_CPPFLAGS += -I$(top_srcdir)/src/classify
tesseract_CPPFLAGS += -I$(top_srcdir)/src/cutil
tesseract_CPPFLAGS += -I$(top_srcdir)/src/dict
tesseract_CPPFLAGS += -I$(top_srcdir)/src/textord
tesseract_CPPFLAGS += -I$(top_srcdir)/src/viewer
tesseract_CPPFLAGS += -I$(top_srcdir)/src/wordrec
tesseract_LDFLAGS = $(OPENMP_CXXFLAGS)
tesseract_LDADD = libtesseract.la
tesseract_LDADD += $(LEPTONICA_LIBS)
tesseract_LDADD += $(libarchive_LIBS)
tesseract_LDADD += $(libcurl_LIBS)
if T_WIN
tesseract_LDADD += -ltiff
tesseract_LDADD += -lws2_32
endif
if ADD_RT
tesseract_LDADD += -lrt
endif
# Rules for training tools.
if ENABLE_TRAINING
training: $(trainingtools) | $(PROGRAMS)
training-install: $(trainingtools)
mkdir -p $(DESTDIR)$(bindir)
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install \
$(INSTALL) $(INSTALL_STRIP_FLAG) $(trainingtools) $(DESTDIR)$(bindir)
training-uninstall:
# Some unit tests use code from training.
check: libtesseract_training.la
# dawg_test runs dawg2wordlist and wordlist2dawg.
check: dawg2wordlist wordlist2dawg
else
training:
@echo "Need to reconfigure project, so there are no errors"
endif
CLEANFILES += $(EXTRA_PROGRAMS)
training_CPPFLAGS = $(AM_CPPFLAGS)
training_CPPFLAGS += -DPANGO_ENABLE_ENGINE
training_CPPFLAGS += -DTESS_COMMON_TRAINING_API=
training_CPPFLAGS += -DTESS_PANGO_TRAINING_API=
training_CPPFLAGS += -DTESS_UNICHARSET_TRAINING_API=
training_CPPFLAGS += -I$(top_srcdir)/src/training
training_CPPFLAGS += -I$(top_srcdir)/src/training/common
training_CPPFLAGS += -I$(top_srcdir)/src/training/pango
training_CPPFLAGS += -I$(top_srcdir)/src/training/unicharset
training_CPPFLAGS += -I$(top_srcdir)/src/api
training_CPPFLAGS += -I$(top_srcdir)/src/ccmain
training_CPPFLAGS += -I$(top_srcdir)/src/ccutil
training_CPPFLAGS += -I$(top_srcdir)/src/ccstruct
training_CPPFLAGS += -I$(top_srcdir)/src/lstm
training_CPPFLAGS += -I$(top_srcdir)/src/arch
training_CPPFLAGS += -I$(top_srcdir)/src/viewer
training_CPPFLAGS += -I$(top_srcdir)/src/textord
training_CPPFLAGS += -I$(top_srcdir)/src/dict
training_CPPFLAGS += -I$(top_srcdir)/src/classify
training_CPPFLAGS += -I$(top_srcdir)/src/wordrec
training_CPPFLAGS += -I$(top_srcdir)/src/cutil
training_CPPFLAGS += $(ICU_UC_CFLAGS) $(ICU_I18N_CFLAGS)
training_CPPFLAGS += $(pango_CFLAGS)
training_CPPFLAGS += $(cairo_CFLAGS)
if DISABLED_LEGACY_ENGINE
training_CPPFLAGS += -DDISABLED_LEGACY_ENGINE
endif
# TODO: training programs cannot be linked to shared library created
# with -fvisibility
if VISIBILITY
AM_LDFLAGS += -all-static
endif
noinst_HEADERS += src/training/pango/boxchar.h
noinst_HEADERS += src/training/common/commandlineflags.h
noinst_HEADERS += src/training/common/commontraining.h
noinst_HEADERS += src/training/common/ctc.h
noinst_HEADERS += src/training/common/networkbuilder.h
noinst_HEADERS += src/training/degradeimage.h
noinst_HEADERS += src/training/pango/ligature_table.h
noinst_HEADERS += src/training/pango/pango_font_info.h
noinst_HEADERS += src/training/pango/stringrenderer.h
noinst_HEADERS += src/training/pango/tlog.h
noinst_HEADERS += src/training/unicharset/icuerrorcode.h
noinst_HEADERS += src/training/unicharset/fileio.h
noinst_HEADERS += src/training/unicharset/lang_model_helpers.h
noinst_HEADERS += src/training/unicharset/lstmtester.h
noinst_HEADERS += src/training/unicharset/lstmtrainer.h
noinst_HEADERS += src/training/unicharset/normstrngs.h
noinst_HEADERS += src/training/unicharset/unicharset_training_utils.h
noinst_HEADERS += src/training/unicharset/validate_grapheme.h
noinst_HEADERS += src/training/unicharset/validate_indic.h
noinst_HEADERS += src/training/unicharset/validate_javanese.h
noinst_HEADERS += src/training/unicharset/validate_khmer.h
noinst_HEADERS += src/training/unicharset/validate_myanmar.h
noinst_HEADERS += src/training/unicharset/validator.h
if !DISABLED_LEGACY_ENGINE
noinst_HEADERS += src/training/common/errorcounter.h
noinst_HEADERS += src/training/common/intfeaturedist.h
noinst_HEADERS += src/training/common/intfeaturemap.h
noinst_HEADERS += src/training/common/mastertrainer.h
noinst_HEADERS += src/training/common/sampleiterator.h
noinst_HEADERS += src/training/common/trainingsampleset.h
noinst_HEADERS += src/training/mergenf.h
endif
CLEANFILES += libtesseract_training.la
EXTRA_LTLIBRARIES = libtesseract_training.la
libtesseract_training_la_CPPFLAGS = $(training_CPPFLAGS)
libtesseract_training_la_SOURCES = src/training/pango/boxchar.cpp
libtesseract_training_la_SOURCES += src/training/common/commandlineflags.cpp
libtesseract_training_la_SOURCES += src/training/common/commontraining.cpp
libtesseract_training_la_SOURCES += src/training/common/ctc.cpp
libtesseract_training_la_SOURCES += src/training/common/networkbuilder.cpp
libtesseract_training_la_SOURCES += src/training/degradeimage.cpp
libtesseract_training_la_SOURCES += src/training/pango/ligature_table.cpp
libtesseract_training_la_SOURCES += src/training/pango/pango_font_info.cpp
libtesseract_training_la_SOURCES += src/training/pango/stringrenderer.cpp
libtesseract_training_la_SOURCES += src/training/pango/tlog.cpp
libtesseract_training_la_SOURCES += src/training/unicharset/icuerrorcode.cpp
libtesseract_training_la_SOURCES += src/training/unicharset/fileio.cpp
libtesseract_training_la_SOURCES += src/training/unicharset/lang_model_helpers.cpp
libtesseract_training_la_SOURCES += src/training/unicharset/lstmtester.cpp
libtesseract_training_la_SOURCES += src/training/unicharset/lstmtrainer.cpp
libtesseract_training_la_SOURCES += src/training/unicharset/normstrngs.cpp
libtesseract_training_la_SOURCES += src/training/unicharset/unicharset_training_utils.cpp
libtesseract_training_la_SOURCES += src/training/unicharset/validate_grapheme.cpp
libtesseract_training_la_SOURCES += src/training/unicharset/validate_indic.cpp
libtesseract_training_la_SOURCES += src/training/unicharset/validate_javanese.cpp
libtesseract_training_la_SOURCES += src/training/unicharset/validate_khmer.cpp
libtesseract_training_la_SOURCES += src/training/unicharset/validate_myanmar.cpp
libtesseract_training_la_SOURCES += src/training/unicharset/validator.cpp
if !DISABLED_LEGACY_ENGINE
libtesseract_training_la_SOURCES += src/training/common/errorcounter.cpp
libtesseract_training_la_SOURCES += src/training/common/intfeaturedist.cpp
libtesseract_training_la_SOURCES += src/training/common/intfeaturemap.cpp
libtesseract_training_la_SOURCES += src/training/common/mastertrainer.cpp
libtesseract_training_la_SOURCES += src/training/common/sampleiterator.cpp
libtesseract_training_la_SOURCES += src/training/common/trainingsampleset.cpp
endif
trainingtools = combine_lang_model$(EXEEXT)
trainingtools += combine_tessdata$(EXEEXT)
trainingtools += dawg2wordlist$(EXEEXT)
trainingtools += lstmeval$(EXEEXT)
trainingtools += lstmtraining$(EXEEXT)
trainingtools += merge_unicharsets$(EXEEXT)
trainingtools += set_unicharset_properties$(EXEEXT)
trainingtools += text2image$(EXEEXT)
trainingtools += unicharset_extractor$(EXEEXT)
trainingtools += wordlist2dawg$(EXEEXT)
if !DISABLED_LEGACY_ENGINE
trainingtools += ambiguous_words$(EXEEXT)
trainingtools += classifier_tester$(EXEEXT)
trainingtools += cntraining$(EXEEXT)
trainingtools += mftraining$(EXEEXT)
trainingtools += shapeclustering$(EXEEXT)
endif
$(trainingtools): libtesseract.la
EXTRA_PROGRAMS += $(trainingtools)
extralib = libtesseract.la
extralib += $(libarchive_LIBS)
extralib += $(LEPTONICA_LIBS)
if T_WIN
extralib += -lws2_32
endif
if !DISABLED_LEGACY_ENGINE
ambiguous_words_CPPFLAGS = $(training_CPPFLAGS)
ambiguous_words_SOURCES = src/training/ambiguous_words.cpp
ambiguous_words_LDADD = libtesseract_training.la
ambiguous_words_LDADD += $(extralib)
classifier_tester_CPPFLAGS = $(training_CPPFLAGS)
classifier_tester_SOURCES = src/training/classifier_tester.cpp
classifier_tester_LDADD = libtesseract_training.la
classifier_tester_LDADD += $(extralib)
cntraining_CPPFLAGS = $(training_CPPFLAGS)
cntraining_SOURCES = src/training/cntraining.cpp
cntraining_LDADD = libtesseract_training.la
cntraining_LDADD += $(extralib)
mftraining_CPPFLAGS = $(training_CPPFLAGS)
mftraining_SOURCES = src/training/mftraining.cpp src/training/mergenf.cpp
mftraining_LDADD = libtesseract_training.la
mftraining_LDADD += $(ICU_UC_LIBS)
mftraining_LDADD += $(extralib)
shapeclustering_CPPFLAGS = $(training_CPPFLAGS)
shapeclustering_SOURCES = src/training/shapeclustering.cpp
shapeclustering_LDADD = libtesseract_training.la
shapeclustering_LDADD += $(extralib)
endif
combine_lang_model_CPPFLAGS = $(training_CPPFLAGS)
combine_lang_model_SOURCES = src/training/combine_lang_model.cpp
combine_lang_model_LDADD = libtesseract_training.la
combine_lang_model_LDADD += $(ICU_I18N_LIBS) $(ICU_UC_LIBS)
combine_lang_model_LDADD += $(extralib)
combine_tessdata_CPPFLAGS = $(training_CPPFLAGS)
combine_tessdata_SOURCES = src/training/combine_tessdata.cpp
combine_tessdata_LDADD = $(extralib)
dawg2wordlist_CPPFLAGS = $(training_CPPFLAGS)
dawg2wordlist_SOURCES = src/training/dawg2wordlist.cpp
dawg2wordlist_LDADD = $(extralib)
lstmeval_CPPFLAGS = $(training_CPPFLAGS)
lstmeval_SOURCES = src/training/lstmeval.cpp
lstmeval_LDADD = libtesseract_training.la
lstmeval_LDADD += $(ICU_UC_LIBS)
lstmeval_LDADD += $(extralib)
lstmtraining_CPPFLAGS = $(training_CPPFLAGS)
lstmtraining_SOURCES = src/training/lstmtraining.cpp
lstmtraining_LDADD = libtesseract_training.la
lstmtraining_LDADD += $(ICU_I18N_LIBS) $(ICU_UC_LIBS)
lstmtraining_LDADD += $(extralib)
merge_unicharsets_CPPFLAGS = $(training_CPPFLAGS)
merge_unicharsets_SOURCES = src/training/merge_unicharsets.cpp
merge_unicharsets_LDADD = $(extralib)
set_unicharset_properties_CPPFLAGS = $(training_CPPFLAGS)
set_unicharset_properties_SOURCES = src/training/set_unicharset_properties.cpp
set_unicharset_properties_LDADD = libtesseract_training.la
set_unicharset_properties_LDADD += $(ICU_I18N_LIBS) $(ICU_UC_LIBS)
set_unicharset_properties_LDADD += $(extralib)
text2image_CPPFLAGS = $(training_CPPFLAGS)
text2image_SOURCES = src/training/text2image.cpp
text2image_LDADD = libtesseract_training.la
text2image_LDADD += $(ICU_I18N_LIBS) $(ICU_UC_LIBS)
text2image_LDADD += $(extralib)
text2image_LDADD += $(ICU_UC_LIBS) $(cairo_LIBS)
text2image_LDADD += $(pango_LIBS) $(pangocairo_LIBS) $(pangoft2_LIBS)
unicharset_extractor_CPPFLAGS = $(training_CPPFLAGS)
unicharset_extractor_SOURCES = src/training/unicharset_extractor.cpp
unicharset_extractor_LDADD = libtesseract_training.la
unicharset_extractor_LDADD += $(ICU_I18N_LIBS) $(ICU_UC_LIBS)
unicharset_extractor_LDADD += $(extralib)
wordlist2dawg_CPPFLAGS = $(training_CPPFLAGS)
wordlist2dawg_SOURCES = src/training/wordlist2dawg.cpp
wordlist2dawg_LDADD = $(extralib)
# fuzzer-api is used for fuzzing tests.
# They are run by OSS-Fuzz https://oss-fuzz.com/, but can also be run locally.
# Note: -fsanitize=fuzzer currently requires the clang++ compiler.
# LIB_FUZZING_ENGINE can be overridden by the caller.
# This is used by OSS-Fuzz.
LIB_FUZZING_ENGINE ?= -fsanitize=fuzzer
fuzzer-api: libtesseract.la
fuzzer-api: unittest/fuzzers/fuzzer-api.cpp
$(CXX) $(CXXFLAGS) -g $(LIB_FUZZING_ENGINE) \
-I $(top_srcdir)/include \
-I $(builddir)/include \
-I $(top_srcdir)/src/ccmain \
-I $(top_srcdir)/src/ccstruct \
-I $(top_srcdir)/src/ccutil \
$(LEPTONICA_CFLAGS) \
$(OPENMP_CXXFLAGS) \
$< \
$(builddir)/.libs/libtesseract.a \
$(LEPTONICA_LIBS) \
$(libarchive_LIBS) \
$(libcurl_LIBS) \
-o $@
fuzzer-api-512x256: libtesseract.la
fuzzer-api-512x256: unittest/fuzzers/fuzzer-api.cpp
$(CXX) $(CXXFLAGS) -g $(LIB_FUZZING_ENGINE) \
-DTESSERACT_FUZZER_WIDTH=512 \
-DTESSERACT_FUZZER_HEIGHT=256 \
-I $(top_srcdir)/include \
-I $(builddir)/include \
-I $(top_srcdir)/src/ccmain \
-I $(top_srcdir)/src/ccstruct \
-I $(top_srcdir)/src/ccutil \
$(LEPTONICA_CFLAGS) \
$(OPENMP_CXXFLAGS) \
$< \
$(builddir)/.libs/libtesseract.a \
$(LEPTONICA_LIBS) \
$(libarchive_LIBS) \
$(libcurl_LIBS) \
-o $@
CLEANFILES += fuzzer-api fuzzer-api-512x256
if ASCIIDOC
man_MANS = doc/combine_lang_model.1
man_MANS += doc/combine_tessdata.1
man_MANS += doc/dawg2wordlist.1
man_MANS += doc/lstmeval.1
man_MANS += doc/lstmtraining.1
man_MANS += doc/merge_unicharsets.1
man_MANS += doc/set_unicharset_properties.1
man_MANS += doc/tesseract.1
man_MANS += doc/text2image.1
man_MANS += doc/unicharset.5
man_MANS += doc/unicharset_extractor.1
man_MANS += doc/wordlist2dawg.1
if !DISABLED_LEGACY_ENGINE
man_MANS += doc/ambiguous_words.1
man_MANS += doc/classifier_tester.1
man_MANS += doc/cntraining.1
man_MANS += doc/mftraining.1
man_MANS += doc/shapeclustering.1
man_MANS += doc/unicharambigs.5
endif
man_xslt = http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
EXTRA_DIST += $(man_MANS) doc/Doxyfile
html: ${man_MANS:%=%.html}
pdf: ${man_MANS:%=%.pdf}
SUFFIXES = .asc .html .pdf
.asc:
if HAVE_XML_CATALOG_FILES
asciidoc -b docbook -d manpage -o - $< | \
XML_CATALOG_FILES=$(XML_CATALOG_FILES) xsltproc --nonet -o $@ $(man_xslt) -
else
asciidoc -b docbook -d manpage -o - $< | \
xsltproc --nonet -o $@ $(man_xslt) -
endif
.asc.html:
asciidoc -b html5 -o $@ $<
.asc.pdf:
asciidoc -b docbook -d manpage -o $*.dbk $<
docbook2pdf -o doc $*.dbk
MAINTAINERCLEANFILES = $(man_MANS) Doxyfile
endif
# Absolute path of directory 'langdata'.
LANGDATA_DIR=$(shell cd $(top_srcdir) && cd .. && pwd)/langdata_lstm
# Absolute path of directory 'tessdata' with traineddata files
# (must be on same level as top source directory).
TESSDATA_DIR=$(shell cd $(top_srcdir) && cd .. && pwd)/tessdata
# Absolute path of directory 'testing' with test images and ground truth texts
# (using submodule test).
TESTING_DIR=$(shell cd $(top_srcdir) && pwd)/test/testing
# Absolute path of directory 'testdata' with test unicharset etc.
# (using submodule test).
TESTDATA_DIR=$(shell cd $(top_srcdir) && pwd)/test/testdata
# Suppress some memory leaks reported by LeakSanitizer.
export LSAN_OPTIONS=suppressions=$(top_srcdir)/unittest/tesseract_leaksanitizer.supp
unittest_CPPFLAGS = $(AM_CPPFLAGS)
unittest_CPPFLAGS += -DTESSBIN_DIR="\"$(abs_top_builddir)\""
unittest_CPPFLAGS += -DLANGDATA_DIR="\"$(LANGDATA_DIR)\""
unittest_CPPFLAGS += -DTESSDATA_DIR="\"$(TESSDATA_DIR)\""
unittest_CPPFLAGS += -DTESTING_DIR="\"$(TESTING_DIR)\""
unittest_CPPFLAGS += -DTESTDATA_DIR="\"$(TESTDATA_DIR)\""
unittest_CPPFLAGS += -DPANGO_ENABLE_ENGINE
if DISABLED_LEGACY_ENGINE
unittest_CPPFLAGS += -DDISABLED_LEGACY_ENGINE
endif # DISABLED_LEGACY_ENGINE
unittest_CPPFLAGS += -DTESS_COMMON_TRAINING_API=
unittest_CPPFLAGS += -DTESS_PANGO_TRAINING_API=
unittest_CPPFLAGS += -DTESS_UNICHARSET_TRAINING_API=
unittest_CPPFLAGS += -I$(top_srcdir)/src/arch
unittest_CPPFLAGS += -I$(top_srcdir)/src/ccmain
unittest_CPPFLAGS += -I$(top_srcdir)/src/ccstruct
unittest_CPPFLAGS += -I$(top_srcdir)/src/ccutil
unittest_CPPFLAGS += -I$(top_srcdir)/src/classify
unittest_CPPFLAGS += -I$(top_srcdir)/src/cutil
unittest_CPPFLAGS += -I$(top_srcdir)/src/dict
unittest_CPPFLAGS += -I$(top_srcdir)/src/display
unittest_CPPFLAGS += -I$(top_srcdir)/src/lstm
unittest_CPPFLAGS += -I$(top_srcdir)/src/textord
unittest_CPPFLAGS += -I$(top_srcdir)/unittest/base
unittest_CPPFLAGS += -I$(top_srcdir)/unittest/util
unittest_CPPFLAGS += $(LEPTONICA_CFLAGS)
if ENABLE_TRAINING
unittest_CPPFLAGS += -I$(top_srcdir)/src/training
unittest_CPPFLAGS += -I$(top_srcdir)/src/training/common
unittest_CPPFLAGS += -I$(top_srcdir)/src/training/pango
unittest_CPPFLAGS += -I$(top_srcdir)/src/training/unicharset
unittest_CPPFLAGS += $(pangocairo_CFLAGS)
endif # ENABLE_TRAINING
unittest_CPPFLAGS += -I$(top_srcdir)/src/viewer
unittest_CPPFLAGS += -I$(top_srcdir)/src/wordrec
unittest_CPPFLAGS += -I$(top_srcdir)/unittest
# Build googletest:
check_LTLIBRARIES = libgtest.la libgtest_main.la libgmock.la libgmock_main.la
libgtest_la_SOURCES = unittest/third_party/googletest/googletest/src/gtest-all.cc
libgtest_la_CPPFLAGS = -I$(top_srcdir)/unittest/third_party/googletest/googletest/include
libgtest_la_CPPFLAGS += -I$(top_srcdir)/unittest/third_party/googletest/googletest
libgtest_la_CPPFLAGS += -pthread
libgtest_main_la_SOURCES = unittest/third_party/googletest/googletest/src/gtest_main.cc
libgtest_main_la_CPPFLAGS = $(libgtest_la_CPPFLAGS)
GMOCK_INCLUDES = -I$(top_srcdir)/unittest/third_party/googletest/googlemock/include \
-I$(top_srcdir)/unittest/third_party/googletest/googlemock \
-I$(top_srcdir)/unittest/third_party/googletest/googletest/include \
-I$(top_srcdir)/unittest/third_party/googletest/googletest
libgmock_la_SOURCES = unittest/third_party/googletest/googlemock/src/gmock-all.cc
libgmock_la_CPPFLAGS = $(GMOCK_INCLUDES) \
-pthread
libgmock_main_la_SOURCES = unittest/third_party/googletest/googlemock/src/gmock_main.cc
libgmock_main_la_CPPFLAGS = $(GMOCK_INCLUDES) \
-pthread
# Build unittests
GTEST_LIBS = libgtest.la libgtest_main.la -lpthread
GMOCK_LIBS = libgmock.la libgmock_main.la
TESS_LIBS = $(GTEST_LIBS)
TESS_LIBS += libtesseract.la $(libarchive_LIBS)
TRAINING_LIBS = libtesseract_training.la
TRAINING_LIBS += $(TESS_LIBS)
unittest_CPPFLAGS += -isystem $(top_srcdir)/unittest/third_party/googletest/googletest/include
unittest_CPPFLAGS += -isystem $(top_srcdir)/unittest/third_party/googletest/googlemock/include
check_PROGRAMS = apiexample_test
if ENABLE_TRAINING
if !DISABLED_LEGACY_ENGINE
check_PROGRAMS += applybox_test
endif # !DISABLED_LEGACY_ENGINE
check_PROGRAMS += baseapi_test
check_PROGRAMS += baseapi_thread_test
if !DISABLED_LEGACY_ENGINE
check_PROGRAMS += bitvector_test
endif # !DISABLED_LEGACY_ENGINE
endif # ENABLE_TRAINING
check_PROGRAMS += cleanapi_test
check_PROGRAMS += colpartition_test
if ENABLE_TRAINING
check_PROGRAMS += commandlineflags_test
check_PROGRAMS += dawg_test
endif # ENABLE_TRAINING
check_PROGRAMS += denorm_test
if !DISABLED_LEGACY_ENGINE
check_PROGRAMS += equationdetect_test
endif # !DISABLED_LEGACY_ENGINE
check_PROGRAMS += fileio_test
check_PROGRAMS += heap_test
check_PROGRAMS += imagedata_test
if !DISABLED_LEGACY_ENGINE
check_PROGRAMS += indexmapbidi_test
check_PROGRAMS += intfeaturemap_test
endif # !DISABLED_LEGACY_ENGINE
check_PROGRAMS += intsimdmatrix_test
check_PROGRAMS += lang_model_test
check_PROGRAMS += layout_test
check_PROGRAMS += ligature_table_test
check_PROGRAMS += linlsq_test
check_PROGRAMS += list_test
if ENABLE_TRAINING
check_PROGRAMS += lstm_recode_test
check_PROGRAMS += lstm_squashed_test
check_PROGRAMS += lstm_test
check_PROGRAMS += lstmtrainer_test
endif # ENABLE_TRAINING
check_PROGRAMS += loadlang_test
if !DISABLED_LEGACY_ENGINE
check_PROGRAMS += mastertrainer_test
endif # !DISABLED_LEGACY_ENGINE
check_PROGRAMS += matrix_test
check_PROGRAMS += networkio_test
if ENABLE_TRAINING
check_PROGRAMS += normstrngs_test
endif # ENABLE_TRAINING
check_PROGRAMS += nthitem_test
if !DISABLED_LEGACY_ENGINE
check_PROGRAMS += osd_test
endif # !DISABLED_LEGACY_ENGINE
check_PROGRAMS += pagesegmode_test
if ENABLE_TRAINING
check_PROGRAMS += pango_font_info_test
endif # ENABLE_TRAINING
check_PROGRAMS += paragraphs_test
if !DISABLED_LEGACY_ENGINE
check_PROGRAMS += params_model_test
endif # !DISABLED_LEGACY_ENGINE
check_PROGRAMS += progress_test
check_PROGRAMS += qrsequence_test
check_PROGRAMS += recodebeam_test
check_PROGRAMS += rect_test
check_PROGRAMS += resultiterator_test
check_PROGRAMS += scanutils_test
if !DISABLED_LEGACY_ENGINE
check_PROGRAMS += shapetable_test
endif # !DISABLED_LEGACY_ENGINE
check_PROGRAMS += stats_test
check_PROGRAMS += stridemap_test
check_PROGRAMS += stringrenderer_test
check_PROGRAMS += tablefind_test
check_PROGRAMS += tablerecog_test
check_PROGRAMS += tabvector_test
check_PROGRAMS += tatweel_test
if !DISABLED_LEGACY_ENGINE
check_PROGRAMS += textlineprojection_test
endif # !DISABLED_LEGACY_ENGINE
check_PROGRAMS += tfile_test
if ENABLE_TRAINING
check_PROGRAMS += unichar_test
check_PROGRAMS += unicharcompress_test
check_PROGRAMS += unicharset_test
check_PROGRAMS += validate_grapheme_test
check_PROGRAMS += validate_indic_test
check_PROGRAMS += validate_khmer_test
check_PROGRAMS += validate_myanmar_test
check_PROGRAMS += validator_test
endif # ENABLE_TRAINING
check_PROGRAMS: libtesseract.la libtesseract_training.la
TESTS = $(check_PROGRAMS)
# List of source files needed to build the executable:
apiexample_test_SOURCES = unittest/apiexample_test.cc
apiexample_test_CPPFLAGS = $(unittest_CPPFLAGS)
apiexample_test_LDFLAGS = $(LEPTONICA_LIBS)
apiexample_test_LDADD = $(TESS_LIBS) $(LEPTONICA_LIBS)
if !DISABLED_LEGACY_ENGINE
applybox_test_SOURCES = unittest/applybox_test.cc
applybox_test_CPPFLAGS = $(unittest_CPPFLAGS)
applybox_test_LDADD = $(TRAINING_LIBS) $(LEPTONICA_LIBS)
endif # !DISABLED_LEGACY_ENGINE
baseapi_test_SOURCES = unittest/baseapi_test.cc
baseapi_test_CPPFLAGS = $(unittest_CPPFLAGS)
baseapi_test_LDADD = $(TRAINING_LIBS) $(LEPTONICA_LIBS)
baseapi_thread_test_SOURCES = unittest/baseapi_thread_test.cc
baseapi_thread_test_CPPFLAGS = $(unittest_CPPFLAGS)
baseapi_thread_test_LDADD = $(TESS_LIBS) $(LEPTONICA_LIBS)
if !DISABLED_LEGACY_ENGINE
bitvector_test_SOURCES = unittest/bitvector_test.cc
bitvector_test_CPPFLAGS = $(unittest_CPPFLAGS)
bitvector_test_LDADD = $(TRAINING_LIBS)
endif # !DISABLED_LEGACY_ENGINE
cleanapi_test_SOURCES = unittest/cleanapi_test.cc
cleanapi_test_CPPFLAGS = $(unittest_CPPFLAGS)
cleanapi_test_LDADD = $(TESS_LIBS)
colpartition_test_SOURCES = unittest/colpartition_test.cc
colpartition_test_CPPFLAGS = $(unittest_CPPFLAGS)
colpartition_test_LDADD = $(TESS_LIBS)
commandlineflags_test_SOURCES = unittest/commandlineflags_test.cc
commandlineflags_test_CPPFLAGS = $(unittest_CPPFLAGS)
commandlineflags_test_LDADD = $(TRAINING_LIBS) $(ICU_UC_LIBS)
dawg_test_SOURCES = unittest/dawg_test.cc
dawg_test_CPPFLAGS = $(unittest_CPPFLAGS)
dawg_test_LDADD = $(TRAINING_LIBS)
denorm_test_SOURCES = unittest/denorm_test.cc
denorm_test_CPPFLAGS = $(unittest_CPPFLAGS)
denorm_test_LDADD = $(TESS_LIBS)
if !DISABLED_LEGACY_ENGINE
equationdetect_test_SOURCES = unittest/equationdetect_test.cc
equationdetect_test_CPPFLAGS = $(unittest_CPPFLAGS)
equationdetect_test_LDADD = $(TESS_LIBS) $(LEPTONICA_LIBS)
endif # !DISABLED_LEGACY_ENGINE
fileio_test_SOURCES = unittest/fileio_test.cc
fileio_test_CPPFLAGS = $(unittest_CPPFLAGS)
fileio_test_LDADD = $(TRAINING_LIBS)
heap_test_SOURCES = unittest/heap_test.cc
heap_test_CPPFLAGS = $(unittest_CPPFLAGS)
heap_test_LDADD = $(TESS_LIBS)
imagedata_test_SOURCES = unittest/imagedata_test.cc
imagedata_test_CPPFLAGS = $(unittest_CPPFLAGS)
imagedata_test_LDADD = $(TRAINING_LIBS)
if !DISABLED_LEGACY_ENGINE
indexmapbidi_test_SOURCES = unittest/indexmapbidi_test.cc
indexmapbidi_test_CPPFLAGS = $(unittest_CPPFLAGS)
indexmapbidi_test_LDADD = $(TRAINING_LIBS)
endif # !DISABLED_LEGACY_ENGINE
if !DISABLED_LEGACY_ENGINE
intfeaturemap_test_SOURCES = unittest/intfeaturemap_test.cc
intfeaturemap_test_CPPFLAGS = $(unittest_CPPFLAGS)
intfeaturemap_test_LDADD = $(TRAINING_LIBS)
endif # !DISABLED_LEGACY_ENGINE
intsimdmatrix_test_SOURCES = unittest/intsimdmatrix_test.cc
intsimdmatrix_test_CPPFLAGS = $(unittest_CPPFLAGS)
if HAVE_AVX2
intsimdmatrix_test_CPPFLAGS += -DHAVE_AVX2
endif
if HAVE_SSE4_1
intsimdmatrix_test_CPPFLAGS += -DHAVE_SSE4_1
endif
intsimdmatrix_test_LDADD = $(TESS_LIBS)
lang_model_test_SOURCES = unittest/lang_model_test.cc
lang_model_test_CPPFLAGS = $(unittest_CPPFLAGS)
lang_model_test_LDADD = $(TRAINING_LIBS) $(ICU_I18N_LIBS) $(ICU_UC_LIBS)
layout_test_SOURCES = unittest/layout_test.cc
layout_test_CPPFLAGS = $(unittest_CPPFLAGS)
layout_test_LDADD = $(TRAINING_LIBS) $(LEPTONICA_LIBS)
ligature_table_test_SOURCES = unittest/ligature_table_test.cc
ligature_table_test_CPPFLAGS = $(unittest_CPPFLAGS)
ligature_table_test_LDADD = $(TRAINING_LIBS) $(LEPTONICA_LIBS)
ligature_table_test_LDADD += $(ICU_I18N_LIBS) $(ICU_UC_LIBS)
ligature_table_test_LDADD += $(pangocairo_LIBS) $(pangoft2_LIBS)
ligature_table_test_LDADD += $(cairo_LIBS) $(pango_LIBS)
linlsq_test_SOURCES = unittest/linlsq_test.cc
linlsq_test_CPPFLAGS = $(unittest_CPPFLAGS)
linlsq_test_LDADD = $(TESS_LIBS)
list_test_SOURCES = unittest/list_test.cc
list_test_CPPFLAGS = $(unittest_CPPFLAGS)
list_test_LDADD = $(TESS_LIBS)
loadlang_test_SOURCES = unittest/loadlang_test.cc
loadlang_test_CPPFLAGS = $(unittest_CPPFLAGS)
loadlang_test_LDADD = $(TESS_LIBS) $(LEPTONICA_LIBS)
lstm_recode_test_SOURCES = unittest/lstm_recode_test.cc
lstm_recode_test_CPPFLAGS = $(unittest_CPPFLAGS)
lstm_recode_test_LDADD = $(TRAINING_LIBS)
lstm_squashed_test_SOURCES = unittest/lstm_squashed_test.cc
lstm_squashed_test_CPPFLAGS = $(unittest_CPPFLAGS)
lstm_squashed_test_LDADD = $(TRAINING_LIBS)
lstm_test_SOURCES = unittest/lstm_test.cc
lstm_test_CPPFLAGS = $(unittest_CPPFLAGS)
lstm_test_LDADD = $(TRAINING_LIBS)
lstmtrainer_test_SOURCES = unittest/lstmtrainer_test.cc
lstmtrainer_test_CPPFLAGS = $(unittest_CPPFLAGS)
lstmtrainer_test_LDADD = $(TRAINING_LIBS) $(LEPTONICA_LIBS)
if !DISABLED_LEGACY_ENGINE
mastertrainer_test_SOURCES = unittest/mastertrainer_test.cc
mastertrainer_test_CPPFLAGS = $(unittest_CPPFLAGS)
mastertrainer_test_LDADD = $(TRAINING_LIBS) $(LEPTONICA_LIBS)
endif # !DISABLED_LEGACY_ENGINE
matrix_test_SOURCES = unittest/matrix_test.cc
matrix_test_CPPFLAGS = $(unittest_CPPFLAGS)
matrix_test_LDADD = $(TESS_LIBS)
networkio_test_SOURCES = unittest/networkio_test.cc
networkio_test_CPPFLAGS = $(unittest_CPPFLAGS)
networkio_test_LDADD = $(TESS_LIBS)
normstrngs_test_SOURCES = unittest/normstrngs_test.cc
normstrngs_test_CPPFLAGS = $(unittest_CPPFLAGS)
normstrngs_test_LDADD = $(TRAINING_LIBS) $(ICU_I18N_LIBS) $(ICU_UC_LIBS)
nthitem_test_SOURCES = unittest/nthitem_test.cc
nthitem_test_CPPFLAGS = $(unittest_CPPFLAGS)
nthitem_test_LDADD = $(TESS_LIBS)
if !DISABLED_LEGACY_ENGINE
osd_test_SOURCES = unittest/osd_test.cc
osd_test_CPPFLAGS = $(unittest_CPPFLAGS)
osd_test_LDADD = $(TESS_LIBS) $(LEPTONICA_LIBS)
endif # !DISABLED_LEGACY_ENGINE
pagesegmode_test_SOURCES = unittest/pagesegmode_test.cc
pagesegmode_test_CPPFLAGS = $(unittest_CPPFLAGS)
pagesegmode_test_LDADD = $(TRAINING_LIBS) $(LEPTONICA_LIBS)
pango_font_info_test_SOURCES = unittest/pango_font_info_test.cc
pango_font_info_test_CPPFLAGS = $(unittest_CPPFLAGS)
pango_font_info_test_LDADD = $(TRAINING_LIBS) $(LEPTONICA_LIBS)
pango_font_info_test_LDADD += $(ICU_I18N_LIBS) $(ICU_UC_LIBS)
pango_font_info_test_LDADD += $(pangocairo_LIBS)
pango_font_info_test_LDADD += $(pangoft2_LIBS)
paragraphs_test_SOURCES = unittest/paragraphs_test.cc
paragraphs_test_CPPFLAGS = $(unittest_CPPFLAGS)
paragraphs_test_LDADD = $(TESS_LIBS)
if !DISABLED_LEGACY_ENGINE
params_model_test_SOURCES = unittest/params_model_test.cc
params_model_test_CPPFLAGS = $(unittest_CPPFLAGS)
params_model_test_LDADD = $(TRAINING_LIBS)
endif # !DISABLED_LEGACY_ENGINE
progress_test_SOURCES = unittest/progress_test.cc
progress_test_CPPFLAGS = $(unittest_CPPFLAGS)
progress_test_LDFLAGS = $(LEPTONICA_LIBS)
progress_test_LDADD = $(GTEST_LIBS) $(GMOCK_LIBS) $(TESS_LIBS) $(LEPTONICA_LIBS)
qrsequence_test_SOURCES = unittest/qrsequence_test.cc
qrsequence_test_CPPFLAGS = $(unittest_CPPFLAGS)
qrsequence_test_LDADD = $(TESS_LIBS)
recodebeam_test_SOURCES = unittest/recodebeam_test.cc
recodebeam_test_CPPFLAGS = $(unittest_CPPFLAGS)
recodebeam_test_LDADD = $(TRAINING_LIBS) $(ICU_I18N_LIBS) $(ICU_UC_LIBS)
rect_test_SOURCES = unittest/rect_test.cc
rect_test_CPPFLAGS = $(unittest_CPPFLAGS)
rect_test_LDADD = $(TESS_LIBS)
resultiterator_test_SOURCES = unittest/resultiterator_test.cc
resultiterator_test_CPPFLAGS = $(unittest_CPPFLAGS)
resultiterator_test_LDADD = $(TRAINING_LIBS)
resultiterator_test_LDADD += $(LEPTONICA_LIBS) $(ICU_I18N_LIBS) $(ICU_UC_LIBS)
scanutils_test_SOURCES = unittest/scanutils_test.cc
scanutils_test_CPPFLAGS = $(unittest_CPPFLAGS)
scanutils_test_LDADD = $(TRAINING_LIBS)
if !DISABLED_LEGACY_ENGINE
shapetable_test_SOURCES = unittest/shapetable_test.cc
shapetable_test_CPPFLAGS = $(unittest_CPPFLAGS)
shapetable_test_LDADD = $(TRAINING_LIBS)
endif # !DISABLED_LEGACY_ENGINE
stats_test_SOURCES = unittest/stats_test.cc
stats_test_CPPFLAGS = $(unittest_CPPFLAGS)
stats_test_LDADD = $(TESS_LIBS)
stridemap_test_SOURCES = unittest/stridemap_test.cc
stridemap_test_CPPFLAGS = $(unittest_CPPFLAGS)
stridemap_test_LDADD = $(TESS_LIBS)
stringrenderer_test_SOURCES = unittest/stringrenderer_test.cc
stringrenderer_test_CPPFLAGS = $(unittest_CPPFLAGS)
stringrenderer_test_LDADD = $(TRAINING_LIBS) $(LEPTONICA_LIBS)
stringrenderer_test_LDADD += $(ICU_I18N_LIBS) $(ICU_UC_LIBS)
stringrenderer_test_LDADD += $(pangocairo_LIBS) $(pangoft2_LIBS)
stringrenderer_test_LDADD += $(cairo_LIBS) $(pango_LIBS)
tablefind_test_SOURCES = unittest/tablefind_test.cc
tablefind_test_CPPFLAGS = $(unittest_CPPFLAGS)
tablefind_test_LDADD = $(TESS_LIBS)
tablerecog_test_SOURCES = unittest/tablerecog_test.cc
tablerecog_test_CPPFLAGS = $(unittest_CPPFLAGS)
tablerecog_test_LDADD = $(TESS_LIBS)
tabvector_test_SOURCES = unittest/tabvector_test.cc
tabvector_test_CPPFLAGS = $(unittest_CPPFLAGS)
tabvector_test_LDADD = $(TESS_LIBS)
tatweel_test_SOURCES = unittest/tatweel_test.cc
tatweel_test_SOURCES += unittest/third_party/utf/rune.c
tatweel_test_SOURCES += unittest/util/utf8/unicodetext.cc
tatweel_test_SOURCES += unittest/util/utf8/unilib.cc
tatweel_test_CPPFLAGS = $(unittest_CPPFLAGS)
tatweel_test_LDADD = $(TRAINING_LIBS)
textlineprojection_test_SOURCES = unittest/textlineprojection_test.cc
textlineprojection_test_CPPFLAGS = $(unittest_CPPFLAGS)
textlineprojection_test_LDADD = $(TRAINING_LIBS) $(LEPTONICA_LIBS)
tfile_test_SOURCES = unittest/tfile_test.cc
tfile_test_CPPFLAGS = $(unittest_CPPFLAGS)
tfile_test_LDADD = $(TESS_LIBS)
unichar_test_SOURCES = unittest/unichar_test.cc
unichar_test_CPPFLA
gitextract_b4jzl2xw/
├── .clang-format
├── .gitattributes
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── issue-bug.yml
│ │ └── issue-feature-request.yml
│ ├── copilot-instructions.md
│ ├── dependabot.yml
│ └── workflows/
│ ├── autotools-macos.yml
│ ├── autotools-openmp.yml
│ ├── autotools.yml
│ ├── cifuzz.yml
│ ├── cmake-win64.yml
│ ├── cmake.yml
│ ├── codeql-analysis.yml
│ ├── installer-for-windows.yml
│ ├── msys2.yml
│ ├── sw.yml
│ ├── unittest-disablelegacy.yml
│ ├── unittest-macos.yml
│ ├── unittest.yml
│ └── vcpkg.yml
├── .gitignore
├── .gitmodules
├── .mailmap
├── AUTHORS
├── CITATIONS.bib
├── CMakeLists.txt
├── CONTRIBUTING.md
├── ChangeLog
├── INSTALL
├── INSTALL.GIT.md
├── LICENSE
├── Makefile.am
├── README.md
├── VERSION
├── appveyor.yml
├── autogen.sh
├── cmake/
│ ├── BuildFunctions.cmake
│ ├── BuildOptimizations.cmake
│ ├── CheckFunctions.cmake
│ ├── Configure.cmake
│ ├── SourceGroups.cmake
│ ├── SourceLists.cmake
│ └── templates/
│ ├── TesseractConfig.cmake.in
│ └── cmake_uninstall.cmake.in
├── configure.ac
├── doc/
│ ├── Doxyfile
│ ├── ambiguous_words.1.asc
│ ├── classifier_tester.1.asc
│ ├── cntraining.1.asc
│ ├── combine_lang_model.1.asc
│ ├── combine_tessdata.1.asc
│ ├── dawg2wordlist.1.asc
│ ├── generate_manpages.sh
│ ├── lstmeval.1.asc
│ ├── lstmtraining.1.asc
│ ├── merge_unicharsets.1.asc
│ ├── mftraining.1.asc
│ ├── set_unicharset_properties.1.asc
│ ├── shapeclustering.1.asc
│ ├── tesseract.1.asc
│ ├── tesseract.natvis
│ ├── text2image.1.asc
│ ├── unicharambigs.5.asc
│ ├── unicharset.5.asc
│ ├── unicharset_extractor.1.asc
│ └── wordlist2dawg.1.asc
├── include/
│ └── tesseract/
│ ├── baseapi.h
│ ├── capi.h
│ ├── export.h
│ ├── ltrresultiterator.h
│ ├── ocrclass.h
│ ├── osdetect.h
│ ├── pageiterator.h
│ ├── publictypes.h
│ ├── renderer.h
│ ├── resultiterator.h
│ ├── unichar.h
│ └── version.h.in
├── java/
│ ├── Makefile.am
│ ├── Manifest.txt
│ └── com/
│ ├── Makefile.am
│ └── google/
│ ├── Makefile.am
│ └── scrollview/
│ ├── Makefile.am
│ ├── ScrollView.java
│ ├── events/
│ │ ├── Makefile.am
│ │ ├── SVEvent.java
│ │ ├── SVEventHandler.java
│ │ └── SVEventType.java
│ └── ui/
│ ├── Makefile.am
│ ├── SVAbstractMenuItem.java
│ ├── SVCheckboxMenuItem.java
│ ├── SVEmptyMenuItem.java
│ ├── SVImageHandler.java
│ ├── SVMenuBar.java
│ ├── SVMenuItem.java
│ ├── SVPopupMenu.java
│ ├── SVSubMenuItem.java
│ └── SVWindow.java
├── nsis/
│ ├── Makefile.am
│ ├── build.sh
│ ├── find_deps.py
│ ├── include/
│ │ └── EnvVarUpdate.nsh
│ ├── tesseract.nsi
│ └── winpath.cpp
├── snap/
│ └── snapcraft.yaml
├── src/
│ ├── api/
│ │ ├── altorenderer.cpp
│ │ ├── baseapi.cpp
│ │ ├── capi.cpp
│ │ ├── hocrrenderer.cpp
│ │ ├── lstmboxrenderer.cpp
│ │ ├── pagerenderer.cpp
│ │ ├── pdf_ttf.h
│ │ ├── pdfrenderer.cpp
│ │ ├── renderer.cpp
│ │ └── wordstrboxrenderer.cpp
│ ├── arch/
│ │ ├── dotproduct.cpp
│ │ ├── dotproduct.h
│ │ ├── dotproductavx.cpp
│ │ ├── dotproductavx512.cpp
│ │ ├── dotproductfma.cpp
│ │ ├── dotproductneon.cpp
│ │ ├── dotproductsse.cpp
│ │ ├── intsimdmatrix.cpp
│ │ ├── intsimdmatrix.h
│ │ ├── intsimdmatrixavx2.cpp
│ │ ├── intsimdmatrixneon.cpp
│ │ ├── intsimdmatrixrvv.cpp
│ │ ├── intsimdmatrixsse.cpp
│ │ ├── simddetect.cpp
│ │ └── simddetect.h
│ ├── ccmain/
│ │ ├── adaptions.cpp
│ │ ├── applybox.cpp
│ │ ├── control.cpp
│ │ ├── control.h
│ │ ├── docqual.cpp
│ │ ├── docqual.h
│ │ ├── equationdetect.cpp
│ │ ├── equationdetect.h
│ │ ├── fixspace.cpp
│ │ ├── fixspace.h
│ │ ├── fixxht.cpp
│ │ ├── linerec.cpp
│ │ ├── ltrresultiterator.cpp
│ │ ├── mutableiterator.cpp
│ │ ├── mutableiterator.h
│ │ ├── osdetect.cpp
│ │ ├── output.cpp
│ │ ├── output.h
│ │ ├── pageiterator.cpp
│ │ ├── pagesegmain.cpp
│ │ ├── pagewalk.cpp
│ │ ├── par_control.cpp
│ │ ├── paragraphs.cpp
│ │ ├── paragraphs.h
│ │ ├── paragraphs_internal.h
│ │ ├── paramsd.cpp
│ │ ├── paramsd.h
│ │ ├── pgedit.cpp
│ │ ├── pgedit.h
│ │ ├── recogtraining.cpp
│ │ ├── reject.cpp
│ │ ├── reject.h
│ │ ├── resultiterator.cpp
│ │ ├── superscript.cpp
│ │ ├── tessbox.cpp
│ │ ├── tessedit.cpp
│ │ ├── tesseractclass.cpp
│ │ ├── tesseractclass.h
│ │ ├── tessvars.cpp
│ │ ├── tessvars.h
│ │ ├── tfacepp.cpp
│ │ ├── thresholder.cpp
│ │ ├── thresholder.h
│ │ ├── werdit.cpp
│ │ └── werdit.h
│ ├── ccstruct/
│ │ ├── blamer.cpp
│ │ ├── blamer.h
│ │ ├── blobbox.cpp
│ │ ├── blobbox.h
│ │ ├── blobs.cpp
│ │ ├── blobs.h
│ │ ├── blread.cpp
│ │ ├── blread.h
│ │ ├── boxread.cpp
│ │ ├── boxread.h
│ │ ├── boxword.cpp
│ │ ├── boxword.h
│ │ ├── ccstruct.cpp
│ │ ├── ccstruct.h
│ │ ├── coutln.cpp
│ │ ├── coutln.h
│ │ ├── crakedge.h
│ │ ├── debugpixa.h
│ │ ├── detlinefit.cpp
│ │ ├── detlinefit.h
│ │ ├── dppoint.cpp
│ │ ├── dppoint.h
│ │ ├── fontinfo.cpp
│ │ ├── fontinfo.h
│ │ ├── image.cpp
│ │ ├── image.h
│ │ ├── imagedata.cpp
│ │ ├── imagedata.h
│ │ ├── linlsq.cpp
│ │ ├── linlsq.h
│ │ ├── matrix.cpp
│ │ ├── matrix.h
│ │ ├── mod128.cpp
│ │ ├── mod128.h
│ │ ├── normalis.cpp
│ │ ├── normalis.h
│ │ ├── ocrblock.cpp
│ │ ├── ocrblock.h
│ │ ├── ocrpara.cpp
│ │ ├── ocrpara.h
│ │ ├── ocrrow.cpp
│ │ ├── ocrrow.h
│ │ ├── otsuthr.cpp
│ │ ├── otsuthr.h
│ │ ├── pageres.cpp
│ │ ├── pageres.h
│ │ ├── params_training_featdef.cpp
│ │ ├── params_training_featdef.h
│ │ ├── pdblock.cpp
│ │ ├── pdblock.h
│ │ ├── points.cpp
│ │ ├── points.h
│ │ ├── polyaprx.cpp
│ │ ├── polyaprx.h
│ │ ├── polyblk.cpp
│ │ ├── polyblk.h
│ │ ├── quadlsq.cpp
│ │ ├── quadlsq.h
│ │ ├── quadratc.h
│ │ ├── quspline.cpp
│ │ ├── quspline.h
│ │ ├── ratngs.cpp
│ │ ├── ratngs.h
│ │ ├── rect.cpp
│ │ ├── rect.h
│ │ ├── rejctmap.cpp
│ │ ├── rejctmap.h
│ │ ├── seam.cpp
│ │ ├── seam.h
│ │ ├── split.cpp
│ │ ├── split.h
│ │ ├── statistc.cpp
│ │ ├── statistc.h
│ │ ├── stepblob.cpp
│ │ ├── stepblob.h
│ │ ├── werd.cpp
│ │ └── werd.h
│ ├── ccutil/
│ │ ├── ambigs.cpp
│ │ ├── ambigs.h
│ │ ├── bitvector.cpp
│ │ ├── bitvector.h
│ │ ├── ccutil.cpp
│ │ ├── ccutil.h
│ │ ├── clst.h
│ │ ├── elst.h
│ │ ├── elst2.h
│ │ ├── errcode.cpp
│ │ ├── errcode.h
│ │ ├── fileerr.h
│ │ ├── genericheap.h
│ │ ├── genericvector.h
│ │ ├── helpers.h
│ │ ├── host.h
│ │ ├── indexmapbidi.cpp
│ │ ├── indexmapbidi.h
│ │ ├── kdpair.h
│ │ ├── lsterr.h
│ │ ├── object_cache.h
│ │ ├── params.cpp
│ │ ├── params.h
│ │ ├── qrsequence.h
│ │ ├── scanutils.cpp
│ │ ├── scanutils.h
│ │ ├── serialis.cpp
│ │ ├── serialis.h
│ │ ├── sorthelper.h
│ │ ├── tessdatamanager.cpp
│ │ ├── tessdatamanager.h
│ │ ├── tesserrstream.h
│ │ ├── tesstypes.h
│ │ ├── tprintf.cpp
│ │ ├── tprintf.h
│ │ ├── unichar.cpp
│ │ ├── unicharcompress.cpp
│ │ ├── unicharcompress.h
│ │ ├── unicharmap.cpp
│ │ ├── unicharmap.h
│ │ ├── unicharset.cpp
│ │ ├── unicharset.h
│ │ ├── unicity_table.h
│ │ └── universalambigs.h
│ ├── classify/
│ │ ├── adaptive.cpp
│ │ ├── adaptive.h
│ │ ├── adaptmatch.cpp
│ │ ├── blobclass.cpp
│ │ ├── classify.cpp
│ │ ├── classify.h
│ │ ├── cluster.cpp
│ │ ├── cluster.h
│ │ ├── clusttool.cpp
│ │ ├── clusttool.h
│ │ ├── cutoffs.cpp
│ │ ├── featdefs.cpp
│ │ ├── featdefs.h
│ │ ├── float2int.cpp
│ │ ├── float2int.h
│ │ ├── fpoint.cpp
│ │ ├── fpoint.h
│ │ ├── intfeaturespace.cpp
│ │ ├── intfeaturespace.h
│ │ ├── intfx.cpp
│ │ ├── intfx.h
│ │ ├── intmatcher.cpp
│ │ ├── intmatcher.h
│ │ ├── intproto.cpp
│ │ ├── intproto.h
│ │ ├── kdtree.cpp
│ │ ├── kdtree.h
│ │ ├── mf.cpp
│ │ ├── mf.h
│ │ ├── mfdefs.h
│ │ ├── mfoutline.cpp
│ │ ├── mfoutline.h
│ │ ├── mfx.cpp
│ │ ├── mfx.h
│ │ ├── normfeat.cpp
│ │ ├── normfeat.h
│ │ ├── normmatch.cpp
│ │ ├── normmatch.h
│ │ ├── ocrfeatures.cpp
│ │ ├── ocrfeatures.h
│ │ ├── outfeat.cpp
│ │ ├── outfeat.h
│ │ ├── picofeat.cpp
│ │ ├── picofeat.h
│ │ ├── protos.cpp
│ │ ├── protos.h
│ │ ├── shapeclassifier.cpp
│ │ ├── shapeclassifier.h
│ │ ├── shapetable.cpp
│ │ ├── shapetable.h
│ │ ├── tessclassifier.cpp
│ │ ├── tessclassifier.h
│ │ ├── trainingsample.cpp
│ │ └── trainingsample.h
│ ├── cutil/
│ │ ├── bitvec.h
│ │ ├── oldlist.cpp
│ │ └── oldlist.h
│ ├── dict/
│ │ ├── context.cpp
│ │ ├── dawg.cpp
│ │ ├── dawg.h
│ │ ├── dawg_cache.cpp
│ │ ├── dawg_cache.h
│ │ ├── dict.cpp
│ │ ├── dict.h
│ │ ├── hyphen.cpp
│ │ ├── matchdefs.h
│ │ ├── permdawg.cpp
│ │ ├── stopper.cpp
│ │ ├── stopper.h
│ │ ├── trie.cpp
│ │ └── trie.h
│ ├── lstm/
│ │ ├── convolve.cpp
│ │ ├── convolve.h
│ │ ├── fullyconnected.cpp
│ │ ├── fullyconnected.h
│ │ ├── functions.cpp
│ │ ├── functions.h
│ │ ├── generate_lut.py
│ │ ├── input.cpp
│ │ ├── input.h
│ │ ├── lstm.cpp
│ │ ├── lstm.h
│ │ ├── lstmrecognizer.cpp
│ │ ├── lstmrecognizer.h
│ │ ├── maxpool.cpp
│ │ ├── maxpool.h
│ │ ├── network.cpp
│ │ ├── network.h
│ │ ├── networkio.cpp
│ │ ├── networkio.h
│ │ ├── networkscratch.h
│ │ ├── parallel.cpp
│ │ ├── parallel.h
│ │ ├── plumbing.cpp
│ │ ├── plumbing.h
│ │ ├── recodebeam.cpp
│ │ ├── recodebeam.h
│ │ ├── reconfig.cpp
│ │ ├── reconfig.h
│ │ ├── reversed.cpp
│ │ ├── reversed.h
│ │ ├── series.cpp
│ │ ├── series.h
│ │ ├── static_shape.h
│ │ ├── stridemap.cpp
│ │ ├── stridemap.h
│ │ ├── weightmatrix.cpp
│ │ └── weightmatrix.h
│ ├── svpaint.cpp
│ ├── tesseract.cpp
│ ├── textord/
│ │ ├── alignedblob.cpp
│ │ ├── alignedblob.h
│ │ ├── baselinedetect.cpp
│ │ ├── baselinedetect.h
│ │ ├── bbgrid.cpp
│ │ ├── bbgrid.h
│ │ ├── blkocc.cpp
│ │ ├── blkocc.h
│ │ ├── blobgrid.cpp
│ │ ├── blobgrid.h
│ │ ├── ccnontextdetect.cpp
│ │ ├── ccnontextdetect.h
│ │ ├── cjkpitch.cpp
│ │ ├── cjkpitch.h
│ │ ├── colfind.cpp
│ │ ├── colfind.h
│ │ ├── colpartition.cpp
│ │ ├── colpartition.h
│ │ ├── colpartitiongrid.cpp
│ │ ├── colpartitiongrid.h
│ │ ├── colpartitionset.cpp
│ │ ├── colpartitionset.h
│ │ ├── devanagari_processing.cpp
│ │ ├── devanagari_processing.h
│ │ ├── drawtord.cpp
│ │ ├── drawtord.h
│ │ ├── edgblob.cpp
│ │ ├── edgblob.h
│ │ ├── edgloop.cpp
│ │ ├── edgloop.h
│ │ ├── equationdetectbase.cpp
│ │ ├── equationdetectbase.h
│ │ ├── fpchop.cpp
│ │ ├── fpchop.h
│ │ ├── gap_map.cpp
│ │ ├── gap_map.h
│ │ ├── imagefind.cpp
│ │ ├── imagefind.h
│ │ ├── linefind.cpp
│ │ ├── linefind.h
│ │ ├── makerow.cpp
│ │ ├── makerow.h
│ │ ├── oldbasel.cpp
│ │ ├── oldbasel.h
│ │ ├── pithsync.cpp
│ │ ├── pithsync.h
│ │ ├── pitsync1.cpp
│ │ ├── pitsync1.h
│ │ ├── scanedg.cpp
│ │ ├── scanedg.h
│ │ ├── sortflts.cpp
│ │ ├── sortflts.h
│ │ ├── strokewidth.cpp
│ │ ├── strokewidth.h
│ │ ├── tabfind.cpp
│ │ ├── tabfind.h
│ │ ├── tablefind.cpp
│ │ ├── tablefind.h
│ │ ├── tablerecog.cpp
│ │ ├── tablerecog.h
│ │ ├── tabvector.cpp
│ │ ├── tabvector.h
│ │ ├── textlineprojection.cpp
│ │ ├── textlineprojection.h
│ │ ├── textord.cpp
│ │ ├── textord.h
│ │ ├── topitch.cpp
│ │ ├── topitch.h
│ │ ├── tordmain.cpp
│ │ ├── tordmain.h
│ │ ├── tospace.cpp
│ │ ├── tovars.cpp
│ │ ├── tovars.h
│ │ ├── underlin.cpp
│ │ ├── underlin.h
│ │ ├── wordseg.cpp
│ │ ├── wordseg.h
│ │ ├── workingpartset.cpp
│ │ └── workingpartset.h
│ ├── training/
│ │ ├── CMakeLists.txt
│ │ ├── ambiguous_words.cpp
│ │ ├── classifier_tester.cpp
│ │ ├── cntraining.cpp
│ │ ├── combine_lang_model.cpp
│ │ ├── combine_tessdata.cpp
│ │ ├── common/
│ │ │ ├── commandlineflags.cpp
│ │ │ ├── commandlineflags.h
│ │ │ ├── commontraining.cpp
│ │ │ ├── commontraining.h
│ │ │ ├── ctc.cpp
│ │ │ ├── ctc.h
│ │ │ ├── errorcounter.cpp
│ │ │ ├── errorcounter.h
│ │ │ ├── export.h
│ │ │ ├── intfeaturedist.cpp
│ │ │ ├── intfeaturedist.h
│ │ │ ├── intfeaturemap.cpp
│ │ │ ├── intfeaturemap.h
│ │ │ ├── mastertrainer.cpp
│ │ │ ├── mastertrainer.h
│ │ │ ├── networkbuilder.cpp
│ │ │ ├── networkbuilder.h
│ │ │ ├── sampleiterator.cpp
│ │ │ ├── sampleiterator.h
│ │ │ ├── trainingsampleset.cpp
│ │ │ └── trainingsampleset.h
│ │ ├── dawg2wordlist.cpp
│ │ ├── degradeimage.cpp
│ │ ├── degradeimage.h
│ │ ├── lstmeval.cpp
│ │ ├── lstmtraining.cpp
│ │ ├── merge_unicharsets.cpp
│ │ ├── mergenf.cpp
│ │ ├── mergenf.h
│ │ ├── mftraining.cpp
│ │ ├── pango/
│ │ │ ├── boxchar.cpp
│ │ │ ├── boxchar.h
│ │ │ ├── export.h
│ │ │ ├── ligature_table.cpp
│ │ │ ├── ligature_table.h
│ │ │ ├── pango_font_info.cpp
│ │ │ ├── pango_font_info.h
│ │ │ ├── stringrenderer.cpp
│ │ │ ├── stringrenderer.h
│ │ │ ├── tlog.cpp
│ │ │ └── tlog.h
│ │ ├── set_unicharset_properties.cpp
│ │ ├── shapeclustering.cpp
│ │ ├── text2image.cpp
│ │ ├── unicharset/
│ │ │ ├── export.h
│ │ │ ├── fileio.cpp
│ │ │ ├── fileio.h
│ │ │ ├── icuerrorcode.cpp
│ │ │ ├── icuerrorcode.h
│ │ │ ├── lang_model_helpers.cpp
│ │ │ ├── lang_model_helpers.h
│ │ │ ├── lstmtester.cpp
│ │ │ ├── lstmtester.h
│ │ │ ├── lstmtrainer.cpp
│ │ │ ├── lstmtrainer.h
│ │ │ ├── normstrngs.cpp
│ │ │ ├── normstrngs.h
│ │ │ ├── unicharset_training_utils.cpp
│ │ │ ├── unicharset_training_utils.h
│ │ │ ├── validate_grapheme.cpp
│ │ │ ├── validate_grapheme.h
│ │ │ ├── validate_indic.cpp
│ │ │ ├── validate_indic.h
│ │ │ ├── validate_javanese.cpp
│ │ │ ├── validate_javanese.h
│ │ │ ├── validate_khmer.cpp
│ │ │ ├── validate_khmer.h
│ │ │ ├── validate_myanmar.cpp
│ │ │ ├── validate_myanmar.h
│ │ │ ├── validator.cpp
│ │ │ └── validator.h
│ │ ├── unicharset_extractor.cpp
│ │ └── wordlist2dawg.cpp
│ ├── viewer/
│ │ ├── scrollview.cpp
│ │ ├── scrollview.h
│ │ ├── svmnode.cpp
│ │ ├── svmnode.h
│ │ ├── svutil.cpp
│ │ └── svutil.h
│ └── wordrec/
│ ├── associate.cpp
│ ├── associate.h
│ ├── chop.cpp
│ ├── chop.h
│ ├── chopper.cpp
│ ├── drawfx.cpp
│ ├── drawfx.h
│ ├── findseam.cpp
│ ├── findseam.h
│ ├── gradechop.cpp
│ ├── language_model.cpp
│ ├── language_model.h
│ ├── lm_consistency.cpp
│ ├── lm_consistency.h
│ ├── lm_pain_points.cpp
│ ├── lm_pain_points.h
│ ├── lm_state.cpp
│ ├── lm_state.h
│ ├── outlines.cpp
│ ├── outlines.h
│ ├── params_model.cpp
│ ├── params_model.h
│ ├── pieces.cpp
│ ├── plotedges.cpp
│ ├── plotedges.h
│ ├── render.cpp
│ ├── render.h
│ ├── segsearch.cpp
│ ├── tface.cpp
│ ├── wordclass.cpp
│ ├── wordrec.cpp
│ └── wordrec.h
├── sw.cpp
├── tessdata/
│ ├── Makefile.am
│ ├── configs/
│ │ ├── Makefile.am
│ │ ├── alto
│ │ ├── ambigs.train
│ │ ├── api_config
│ │ ├── bazaar
│ │ ├── bigram
│ │ ├── box.train
│ │ ├── box.train.stderr
│ │ ├── digits
│ │ ├── get.images
│ │ ├── hocr
│ │ ├── inter
│ │ ├── kannada
│ │ ├── linebox
│ │ ├── logfile
│ │ ├── lstm.train
│ │ ├── lstmbox
│ │ ├── lstmdebug
│ │ ├── makebox
│ │ ├── page
│ │ ├── pdf
│ │ ├── quiet
│ │ ├── rebox
│ │ ├── strokewidth
│ │ ├── tsv
│ │ ├── txt
│ │ ├── unlv
│ │ └── wordstrbox
│ ├── eng.user-patterns
│ ├── eng.user-words
│ └── tessconfigs/
│ ├── Makefile.am
│ ├── batch
│ ├── batch.nochop
│ ├── matdemo
│ ├── msdemo
│ ├── nobatch
│ └── segdemo
├── tesseract.pc.cmake
├── tesseract.pc.in
└── unittest/
├── CMakeLists.txt
├── README.md
├── apiexample_test.cc
├── applybox_test.cc
├── baseapi_test.cc
├── baseapi_thread_test.cc
├── bitvector_test.cc
├── capiexample_c_test.c
├── capiexample_test.cc
├── cleanapi_test.cc
├── colpartition_test.cc
├── commandlineflags_test.cc
├── cycletimer.h
├── dawg_test.cc
├── denorm_test.cc
├── doubleptr.h
├── equationdetect_test.cc
├── fileio_test.cc
├── fuzzers/
│ ├── fuzzer-api.cpp
│ └── oss-fuzz-build.sh
├── heap_test.cc
├── imagedata_test.cc
├── include_gunit.h
├── indexmapbidi_test.cc
├── intfeaturemap_test.cc
├── intsimdmatrix_test.cc
├── lang_model_test.cc
├── layout_test.cc
├── ligature_table_test.cc
├── linlsq_test.cc
├── list_test.cc
├── loadlang_test.cc
├── log.h
├── lstm_recode_test.cc
├── lstm_squashed_test.cc
├── lstm_test.cc
├── lstm_test.h
├── lstmtrainer_test.cc
├── mastertrainer_test.cc
├── matrix_test.cc
├── networkio_test.cc
├── normstrngs_test.cc
├── normstrngs_test.h
├── nthitem_test.cc
├── osd_test.cc
├── pagesegmode_test.cc
├── pango_font_info_test.cc
├── paragraphs_test.cc
├── params_model_test.cc
├── progress_test.cc
├── qrsequence_test.cc
├── recodebeam_test.cc
├── rect_test.cc
├── resultiterator_test.cc
├── scanutils_test.cc
├── shapetable_test.cc
├── stats_test.cc
├── stridemap_test.cc
├── stringrenderer_test.cc
├── syntaxnet/
│ └── base.h
├── tablefind_test.cc
├── tablerecog_test.cc
├── tabvector_test.cc
├── tatweel_test.cc
├── tesseract_leaksanitizer.supp
├── textlineprojection_test.cc
├── tfile_test.cc
├── third_party/
│ └── utf/
│ ├── rune.c
│ └── utf.h
├── unichar_test.cc
├── unicharcompress_test.cc
├── unicharset_test.cc
├── util/
│ └── utf8/
│ ├── unicodetext.cc
│ ├── unicodetext.h
│ ├── unilib.cc
│ ├── unilib.h
│ └── unilib_utf8_utils.h
├── validate_grapheme_test.cc
├── validate_indic_test.cc
├── validate_khmer_test.cc
├── validate_myanmar_test.cc
└── validator_test.cc
Showing preview only (284K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (3259 symbols across 583 files)
FILE: include/tesseract/baseapi.h
type Pix (line 35) | struct Pix
type Pixa (line 36) | struct Pixa
type Boxa (line 37) | struct Boxa
function namespace (line 39) | namespace tesseract {
FILE: include/tesseract/capi.h
type tesseract (line 43) | typedef tesseract::TessResultRenderer TessResultRenderer;
type tesseract (line 44) | typedef tesseract::TessBaseAPI TessBaseAPI;
type tesseract (line 45) | typedef tesseract::PageIterator TessPageIterator;
type tesseract (line 46) | typedef tesseract::ResultIterator TessResultIterator;
type tesseract (line 47) | typedef tesseract::MutableIterator TessMutableIterator;
type tesseract (line 48) | typedef tesseract::ChoiceIterator TessChoiceIterator;
type tesseract (line 49) | typedef tesseract::OcrEngineMode TessOcrEngineMode;
type tesseract (line 50) | typedef tesseract::PageSegMode TessPageSegMode;
type tesseract (line 51) | typedef tesseract::PageIteratorLevel TessPageIteratorLevel;
type tesseract (line 52) | typedef tesseract::Orientation TessOrientation;
type tesseract (line 53) | typedef tesseract::ParagraphJustification TessParagraphJustification;
type tesseract (line 54) | typedef tesseract::WritingDirection TessWritingDirection;
type tesseract (line 55) | typedef tesseract::TextlineOrder TessTextlineOrder;
type tesseract (line 56) | typedef tesseract::PolyBlockType TessPolyBlockType;
type tesseract (line 57) | typedef tesseract::ETEXT_DESC ETEXT_DESC;
type TessResultRenderer (line 59) | typedef struct TessResultRenderer TessResultRenderer;
type TessBaseAPI (line 60) | typedef struct TessBaseAPI TessBaseAPI;
type TessPageIterator (line 61) | typedef struct TessPageIterator TessPageIterator;
type TessResultIterator (line 62) | typedef struct TessResultIterator TessResultIterator;
type TessMutableIterator (line 63) | typedef struct TessMutableIterator TessMutableIterator;
type TessChoiceIterator (line 64) | typedef struct TessChoiceIterator TessChoiceIterator;
type TessOcrEngineMode (line 65) | typedef enum TessOcrEngineMode {
type TessPageSegMode (line 71) | typedef enum TessPageSegMode {
type TessPageIteratorLevel (line 88) | typedef enum TessPageIteratorLevel {
type TessPolyBlockType (line 95) | typedef enum TessPolyBlockType {
type TessOrientation (line 113) | typedef enum TessOrientation {
type TessParagraphJustification (line 119) | typedef enum TessParagraphJustification {
type TessWritingDirection (line 125) | typedef enum TessWritingDirection {
type TessTextlineOrder (line 130) | typedef enum TessTextlineOrder {
type ETEXT_DESC (line 135) | typedef struct ETEXT_DESC ETEXT_DESC;
type Pix (line 142) | struct Pix
type Boxa (line 143) | struct Boxa
type Pixa (line 144) | struct Pixa
type Pix (line 222) | struct Pix
type Pix (line 323) | struct Pix
type Pixa (line 333) | struct Pixa
type Pixa (line 335) | struct Pixa
type Pixa (line 339) | struct Pixa
type Pixa (line 342) | struct Pixa
type Pixa (line 344) | struct Pixa
type Pixa (line 346) | struct Pixa
type Pixa (line 350) | struct Pixa
type Pixa (line 354) | struct Pixa
type Pix (line 368) | struct Pix
type Pix (line 551) | struct Pix
FILE: include/tesseract/ltrresultiterator.h
function StrongScriptDirection (line 114) | StrongScriptDirection WordDirection() const;
FILE: include/tesseract/ocrclass.h
type EANYCODE_CHAR (line 59) | struct EANYCODE_CHAR { /*single character */
function progress (line 105) | int16_t progress{0}
function more_to_come (line 109) | int8_t more_to_come{0}
function ocr_alive (line 110) | volatile int8_t ocr_alive{0}
function err_code (line 111) | int8_t err_code{0}
function CANCEL_FUNC (line 112) | CANCEL_FUNC cancel{nullptr}; /// returns true to cancel
FILE: include/tesseract/osdetect.h
function namespace (line 25) | namespace tesseract {
FILE: include/tesseract/pageiterator.h
type Pix (line 24) | struct Pix
type Pta (line 25) | struct Pta
function namespace (line 27) | namespace tesseract {
FILE: include/tesseract/publictypes.h
function namespace (line 20) | namespace tesseract {
FILE: include/tesseract/renderer.h
type Pix (line 28) | struct Pix
function namespace (line 30) | namespace tesseract {
FILE: include/tesseract/resultiterator.h
function namespace (line 30) | namespace tesseract {
FILE: include/tesseract/unichar.h
function namespace (line 27) | namespace tesseract {
FILE: java/com/google/scrollview/ScrollView.java
class ScrollView (line 32) | public class ScrollView {
method addMessage (line 60) | public static void addMessage(SVEvent e) {
method receiveMessage (line 83) | public static String receiveMessage() throws IOException {
method IOLoop (line 91) | private static void IOLoop() {
method parseArguments (line 145) | private static void parseArguments(String argList,
method processInput (line 215) | private static void processInput(String inputLine) {
method exit (line 362) | public static void exit() {
method main (line 370) | public static void main(String[] args) {
FILE: java/com/google/scrollview/events/SVEvent.java
class SVEvent (line 21) | public class SVEvent {
method SVEvent (line 43) | public SVEvent(SVEventType t, SVWindow w, int x1, int y1, int x2, int y2,
method SVEvent (line 65) | public SVEvent(SVEventType eventtype, SVWindow svWindow, int commandid,
method toString (line 82) | @Override
FILE: java/com/google/scrollview/events/SVEventHandler.java
class SVEventHandler (line 43) | public class SVEventHandler extends PBasicInputEventHandler implements
method SVEventHandler (line 76) | public SVEventHandler(SVWindow wdw) {
method processEvent (line 85) | private void processEvent(SVEvent e) {
method showPopup (line 93) | private void showPopup(PInputEvent e) {
method mouseClicked (line 104) | @Override
method mousePressed (line 120) | @Override
method mouseDragged (line 132) | @Override
method mouseReleased (line 165) | @Override
method mouseWheelRotated (line 185) | @Override
method mouseMoved (line 202) | @Override
method mouseEntered (line 211) | @Override
method mouseExited (line 219) | @Override
method actionPerformed (line 228) | public void actionPerformed(ActionEvent e) {
method keyPressed (line 243) | public void keyPressed(KeyEvent e) {
method windowClosing (line 263) | public void windowClosing(WindowEvent e) {
method keyReleased (line 278) | public void keyReleased(KeyEvent e) {
method keyTyped (line 281) | public void keyTyped(KeyEvent e) {
method windowActivated (line 284) | public void windowActivated(WindowEvent e) {
method windowClosed (line 287) | public void windowClosed(WindowEvent e) {
method windowDeactivated (line 290) | public void windowDeactivated(WindowEvent e) {
method windowDeiconified (line 293) | public void windowDeiconified(WindowEvent e) {
method windowIconified (line 296) | public void windowIconified(WindowEvent e) {
method windowOpened (line 299) | public void windowOpened(WindowEvent e) {
FILE: java/com/google/scrollview/events/SVEventType.java
type SVEventType (line 20) | public enum SVEventType {
FILE: java/com/google/scrollview/ui/SVAbstractMenuItem.java
class SVAbstractMenuItem (line 27) | abstract class SVAbstractMenuItem {
method SVAbstractMenuItem (line 35) | SVAbstractMenuItem(int id, String name, JMenuItem jmi) {
method getValue (line 42) | public String getValue() { return null; }
method add (line 45) | public void add(SVAbstractMenuItem mli) { }
method add (line 48) | public void add(JMenu jli) { }
method performAction (line 56) | public void performAction(SVWindow window, SVEventType eventType) {}
FILE: java/com/google/scrollview/ui/SVCheckboxMenuItem.java
class SVCheckboxMenuItem (line 31) | class SVCheckboxMenuItem extends SVAbstractMenuItem {
method SVCheckboxMenuItem (line 34) | SVCheckboxMenuItem(int id, String name, boolean val) {
method performAction (line 40) | @Override
method getValue (line 53) | @Override
FILE: java/com/google/scrollview/ui/SVEmptyMenuItem.java
class SVEmptyMenuItem (line 33) | class SVEmptyMenuItem extends SVAbstractMenuItem {
method SVEmptyMenuItem (line 34) | SVEmptyMenuItem(int id, String name) {
method performAction (line 38) | @Override
FILE: java/com/google/scrollview/ui/SVImageHandler.java
class SVImageHandler (line 29) | public class SVImageHandler {
method SVImageHandler (line 31) | private SVImageHandler() {
method readImage (line 42) | public static PImage readImage(int size, BufferedReader in) {
FILE: java/com/google/scrollview/ui/SVMenuBar.java
class SVMenuBar (line 31) | public class SVMenuBar implements ActionListener {
method SVMenuBar (line 44) | public SVMenuBar(SVWindow scrollView) {
method actionPerformed (line 56) | public void actionPerformed(ActionEvent e) {
method add (line 73) | public void add(String parent, String name, int id) {
method add (line 118) | public void add(String parent, String name, int id, boolean b) {
FILE: java/com/google/scrollview/ui/SVMenuItem.java
class SVMenuItem (line 31) | class SVMenuItem extends SVAbstractMenuItem {
method SVMenuItem (line 35) | SVMenuItem(int id, String name, String v, String d) {
method performAction (line 46) | @Override
method getValue (line 56) | @Override
FILE: java/com/google/scrollview/ui/SVPopupMenu.java
class SVPopupMenu (line 34) | public class SVPopupMenu implements ActionListener {
method SVPopupMenu (line 47) | SVPopupMenu(SVWindow sv) {
method add (line 64) | public void add(String parent, String name, int id) {
method add (line 111) | public void add(String parent, String name, int id, String value, Stri...
method actionPerformed (line 129) | public void actionPerformed(ActionEvent e) {
method show (line 141) | public void show(Component Invoker, int x, int y) {
FILE: java/com/google/scrollview/ui/SVSubMenuItem.java
class SVSubMenuItem (line 25) | class SVSubMenuItem extends SVAbstractMenuItem {
method SVSubMenuItem (line 26) | public SVSubMenuItem(String name, JMenu jli) {
method add (line 30) | @Override
method add (line 35) | @Override
FILE: java/com/google/scrollview/ui/SVWindow.java
class SVWindow (line 52) | public class SVWindow extends JFrame {
method brush (line 118) | public void brush(int red, int green, int blue) {
method brush (line 123) | public void brush(int red, int green, int blue, int alpha) {
method clear (line 133) | public void clear() {
method createPolyline (line 157) | public void createPolyline(int length) {
method drawPolyline (line 167) | public void drawPolyline() {
method SVWindow (line 202) | public SVWindow(String name, int hash, int posX, int posY, int sizeX,
method addMessageBox (line 305) | public void addMessageBox() {
method setStrokeWidth (line 321) | public void setStrokeWidth(float width) {
method drawEllipse (line 332) | public void drawEllipse(int x, int y, int width, int height) {
method drawImage (line 345) | public void drawImage(PImage img, int xPos, int yPos) {
method drawLine (line 354) | public void drawLine(int x1, int y1, int x2, int y2) {
method drawRectangle (line 369) | public void drawRectangle(int x1, int y1, int x2, int y2) {
method drawText (line 396) | public void drawText(int x, int y, String text) {
method pen (line 433) | public void pen(int red, int green, int blue) {
method pen (line 438) | public void pen(int red, int green, int blue, int alpha) {
method textAttributes (line 445) | public void textAttributes(String font, int pixelSize, boolean bold,
method zoomRectangle (line 467) | public void zoomRectangle(int x1, int y1, int x2, int y2) {
method update (line 493) | public void update() {
method addMenuBarItem (line 511) | public void addMenuBarItem(String parent, String name, int id,
method addMenuBarItem (line 517) | public void addMenuBarItem(String parent, String name) {
method addMenuBarItem (line 522) | public void addMenuBarItem(String parent, String name, int id) {
method addMessage (line 531) | public void addMessage(String message) {
method convertIntegerStringToUnicodeString (line 549) | private static String convertIntegerStringToUnicodeString(String input) {
method showInputDialog (line 579) | public void showInputDialog(String msg, String def, int id,
method showInputDialog (line 601) | public void showInputDialog(String msg) {
method showYesNoDialog (line 613) | public void showYesNoDialog(String msg) {
method addPopupMenuItem (line 625) | public void addPopupMenuItem(String parent, String name) {
method addPopupMenuItem (line 633) | public void addPopupMenuItem(String parent, String name, int cmdEvent,
method destroy (line 642) | public void destroy() {
FILE: nsis/find_deps.py
function find_dependencies (line 16) | def find_dependencies(binary, search_path, analyzed_deps):
function main (line 41) | def main():
FILE: nsis/winpath.cpp
function main (line 24) | int main(int argc, char *argv[]) {
FILE: src/api/altorenderer.cpp
type tesseract (line 26) | namespace tesseract {
function AddBoxToAlto (line 31) | static void AddBoxToAlto(const ResultIterator *it, PageIteratorLevel l...
function GetID (line 54) | static std::string GetID(const char *prefix, int page_number, int coun...
FILE: src/api/baseapi.cpp
type tesseract (line 90) | namespace tesseract {
function ExtractFontName (line 128) | static void ExtractFontName(const char* filename, std::string* fontnam...
function addAvailableLanguages (line 147) | static void addAvailableLanguages(const std::string &datadir,
function PageSegMode (line 443) | PageSegMode TessBaseAPI::GetPageSegMode() const {
function Pix (line 555) | Pix *TessBaseAPI::GetThresholdedImage() {
function Boxa (line 570) | Boxa *TessBaseAPI::GetRegions(Pixa **pixa) {
function Boxa (line 582) | Boxa *TessBaseAPI::GetTextlines(const bool raw_image, const int raw_pa...
function Boxa (line 595) | Boxa *TessBaseAPI::GetStrips(Pixa **pixa, int **blockids) {
function Boxa (line 604) | Boxa *TessBaseAPI::GetWords(Pixa **pixa) {
function Boxa (line 614) | Boxa *TessBaseAPI::GetConnectedComponents(Pixa **pixa) {
function Boxa (line 626) | Boxa *TessBaseAPI::GetComponentImages(PageIteratorLevel level, bool te...
function PageIterator (line 736) | PageIterator *TessBaseAPI::AnalyseLayout() {
function PageIterator (line 740) | PageIterator *TessBaseAPI::AnalyseLayout(bool merge_similar_words) {
function Pix (line 848) | Pix *TessBaseAPI::GetInputImage() {
function WriteMemoryCallback (line 1010) | static size_t WriteMemoryCallback(void *contents, size_t size, size_t ...
function LTRResultIterator (line 1259) | LTRResultIterator *TessBaseAPI::GetLTRIterator() {
function ResultIterator (line 1276) | ResultIterator *TessBaseAPI::GetIterator() {
function MutableIterator (line 1293) | MutableIterator *TessBaseAPI::GetMutableIterator() {
function AddBoxToTSV (line 1335) | static void AddBoxToTSV(const PageIterator *it, PageIteratorLevel leve...
function Dawg (line 2310) | const Dawg *TessBaseAPI::GetDawg(int i) const {
function HOcrEscape (line 2323) | std::string HOcrEscape(const char *text) {
FILE: src/api/capi.cpp
function TessDeleteText (line 31) | void TessDeleteText(const char *text) {
function TessDeleteTextArray (line 44) | void TessDeleteTextArray(char **arr) {
function TessDeleteIntArray (line 51) | void TessDeleteIntArray(const int *arr) {
function TessResultRenderer (line 55) | TessResultRenderer *TessTextRendererCreate(const char *outputbase) {
function TessResultRenderer (line 59) | TessResultRenderer *TessHOcrRendererCreate(const char *outputbase) {
function TessResultRenderer (line 63) | TessResultRenderer *TessHOcrRendererCreate2(const char *outputbase, BOOL...
function TessResultRenderer (line 67) | TessResultRenderer *TessAltoRendererCreate(const char *outputbase) {
function TessResultRenderer (line 71) | TessResultRenderer *TessPAGERendererCreate(const char *outputbase) {
function TessResultRenderer (line 75) | TessResultRenderer *TessTsvRendererCreate(const char *outputbase) {
function TessResultRenderer (line 79) | TessResultRenderer *TessPDFRendererCreate(const char *outputbase, const ...
function TessResultRenderer (line 84) | TessResultRenderer *TessUnlvRendererCreate(const char *outputbase) {
function TessResultRenderer (line 88) | TessResultRenderer *TessBoxTextRendererCreate(const char *outputbase) {
function TessResultRenderer (line 92) | TessResultRenderer *TessWordStrBoxRendererCreate(const char *outputbase) {
function TessResultRenderer (line 96) | TessResultRenderer *TessLSTMBoxRendererCreate(const char *outputbase) {
function TessDeleteResultRenderer (line 100) | void TessDeleteResultRenderer(TessResultRenderer *renderer) {
function TessResultRendererInsert (line 104) | void TessResultRendererInsert(TessResultRenderer *renderer, TessResultRe...
function TessResultRenderer (line 108) | TessResultRenderer *TessResultRendererNext(TessResultRenderer *renderer) {
function BOOL (line 112) | BOOL TessResultRendererBeginDocument(TessResultRenderer *renderer, const...
function BOOL (line 116) | BOOL TessResultRendererAddImage(TessResultRenderer *renderer, TessBaseAP...
function BOOL (line 120) | BOOL TessResultRendererEndDocument(TessResultRenderer *renderer) {
function TessResultRendererImageNum (line 132) | int TessResultRendererImageNum(TessResultRenderer *renderer) {
function TessBaseAPI (line 136) | TessBaseAPI *TessBaseAPICreate() {
function TessBaseAPIDelete (line 140) | void TessBaseAPIDelete(TessBaseAPI *handle) {
function TessBaseAPISetInputName (line 144) | void TessBaseAPISetInputName(TessBaseAPI *handle, const char *name) {
function TessBaseAPISetInputImage (line 152) | void TessBaseAPISetInputImage(TessBaseAPI *handle, Pix *pix) {
function Pix (line 156) | Pix *TessBaseAPIGetInputImage(TessBaseAPI *handle) {
function TessBaseAPIGetSourceYResolution (line 160) | int TessBaseAPIGetSourceYResolution(TessBaseAPI *handle) {
function TessBaseAPISetOutputName (line 168) | void TessBaseAPISetOutputName(TessBaseAPI *handle, const char *name) {
function BOOL (line 172) | BOOL TessBaseAPISetVariable(TessBaseAPI *handle, const char *name, const...
function BOOL (line 176) | BOOL TessBaseAPISetDebugVariable(TessBaseAPI *handle, const char *name, ...
function BOOL (line 180) | BOOL TessBaseAPIGetIntVariable(const TessBaseAPI *handle, const char *na...
function BOOL (line 184) | BOOL TessBaseAPIGetBoolVariable(const TessBaseAPI *handle, const char *n...
function BOOL (line 193) | BOOL TessBaseAPIGetDoubleVariable(const TessBaseAPI *handle, const char ...
function TessBaseAPIPrintVariables (line 201) | void TessBaseAPIPrintVariables(const TessBaseAPI *handle, FILE *fp) {
function BOOL (line 205) | BOOL TessBaseAPIPrintVariablesToFile(const TessBaseAPI *handle, const ch...
function TessBaseAPIInit4 (line 215) | int TessBaseAPIInit4(TessBaseAPI *handle, const char *datapath, const ch...
function TessBaseAPIInit1 (line 231) | int TessBaseAPIInit1(TessBaseAPI *handle, const char *datapath, const ch...
function TessBaseAPIInit2 (line 236) | int TessBaseAPIInit2(TessBaseAPI *handle, const char *datapath, const ch...
function TessBaseAPIInit3 (line 241) | int TessBaseAPIInit3(TessBaseAPI *handle, const char *datapath, const ch...
function TessBaseAPIInit5 (line 245) | int TessBaseAPIInit5(TessBaseAPI *handle, const char *data, int data_siz...
function TessBaseAPIInitForAnalysePage (line 277) | void TessBaseAPIInitForAnalysePage(TessBaseAPI *handle) {
function TessBaseAPIReadConfigFile (line 281) | void TessBaseAPIReadConfigFile(TessBaseAPI *handle, const char *filename) {
function TessBaseAPIReadDebugConfigFile (line 285) | void TessBaseAPIReadDebugConfigFile(TessBaseAPI *handle, const char *fil...
function TessBaseAPISetPageSegMode (line 289) | void TessBaseAPISetPageSegMode(TessBaseAPI *handle, TessPageSegMode mode) {
function TessPageSegMode (line 293) | TessPageSegMode TessBaseAPIGetPageSegMode(const TessBaseAPI *handle) {
function TessBaseAPIClearAdaptiveClassifier (line 304) | void TessBaseAPIClearAdaptiveClassifier(TessBaseAPI *handle) {
function TessBaseAPISetImage (line 309) | void TessBaseAPISetImage(TessBaseAPI *handle, const unsigned char *image...
function TessBaseAPISetImage2 (line 314) | void TessBaseAPISetImage2(TessBaseAPI *handle, struct Pix *pix) {
function TessBaseAPISetSourceResolution (line 318) | void TessBaseAPISetSourceResolution(TessBaseAPI *handle, int ppi) {
function TessBaseAPISetRectangle (line 322) | void TessBaseAPISetRectangle(TessBaseAPI *handle, int left, int top, int...
type Pix (line 326) | struct Pix
function TessBaseAPIGetGradient (line 330) | float TessBaseAPIGetGradient(TessBaseAPI *handle) {
function TessBaseAPIClearPersistentCache (line 334) | void TessBaseAPIClearPersistentCache(TessBaseAPI * /*handle*/) {
function BOOL (line 340) | BOOL TessBaseAPIDetectOrientationScript(TessBaseAPI *handle, int *orient...
type Boxa (line 348) | struct Boxa
type Pixa (line 348) | struct Pixa
type Boxa (line 352) | struct Boxa
type Pixa (line 352) | struct Pixa
type Boxa (line 356) | struct Boxa
type Pixa (line 357) | struct Pixa
type Boxa (line 362) | struct Boxa
type Pixa (line 362) | struct Pixa
type Boxa (line 366) | struct Boxa
type Pixa (line 366) | struct Pixa
type Boxa (line 370) | struct Boxa
type Pixa (line 370) | struct Pixa
type Boxa (line 374) | struct Boxa
type Pixa (line 375) | struct Pixa
type Boxa (line 379) | struct Boxa
type Pixa (line 381) | struct Pixa
function TessBaseAPIGetThresholdedImageScaleFactor (line 387) | int TessBaseAPIGetThresholdedImageScaleFactor(const TessBaseAPI *handle) {
function TessPageIterator (line 391) | TessPageIterator *TessBaseAPIAnalyseLayout(TessBaseAPI *handle) {
function TessBaseAPIRecognize (line 395) | int TessBaseAPIRecognize(TessBaseAPI *handle, ETEXT_DESC *monitor) {
function BOOL (line 399) | BOOL TessBaseAPIProcessPages(TessBaseAPI *handle, const char *filename, ...
function BOOL (line 404) | BOOL TessBaseAPIProcessPage(TessBaseAPI *handle, struct Pix *pix, int pa...
function TessResultIterator (line 411) | TessResultIterator *TessBaseAPIGetIterator(TessBaseAPI *handle) {
function TessMutableIterator (line 415) | TessMutableIterator *TessBaseAPIGetMutableIterator(TessBaseAPI *handle) {
function TessBaseAPIMeanTextConf (line 455) | int TessBaseAPIMeanTextConf(TessBaseAPI *handle) {
function BOOL (line 464) | BOOL TessBaseAPIAdaptToWordStr(TessBaseAPI *handle, TessPageSegMode mode...
function TessBaseAPIClear (line 469) | void TessBaseAPIClear(TessBaseAPI *handle) {
function TessBaseAPIEnd (line 473) | void TessBaseAPIEnd(TessBaseAPI *handle) {
function TessBaseAPIIsValidWord (line 477) | int TessBaseAPIIsValidWord(TessBaseAPI *handle, const char *word) {
function BOOL (line 481) | BOOL TessBaseAPIGetTextDirection(TessBaseAPI *handle, int *out_offset, f...
function TessBaseAPISetMinOrientationMargin (line 489) | void TessBaseAPISetMinOrientationMargin(TessBaseAPI *handle, double marg...
function TessBaseAPINumDawgs (line 493) | int TessBaseAPINumDawgs(const TessBaseAPI *handle) {
function TessOcrEngineMode (line 497) | TessOcrEngineMode TessBaseAPIOem(const TessBaseAPI *handle) {
function TessBaseGetBlockTextOrientations (line 501) | void TessBaseGetBlockTextOrientations(TessBaseAPI *handle, int **block_o...
function TessPageIteratorDelete (line 506) | void TessPageIteratorDelete(TessPageIterator *handle) {
function TessPageIterator (line 510) | TessPageIterator *TessPageIteratorCopy(const TessPageIterator *handle) {
function TessPageIteratorBegin (line 514) | void TessPageIteratorBegin(TessPageIterator *handle) {
function BOOL (line 518) | BOOL TessPageIteratorNext(TessPageIterator *handle, TessPageIteratorLeve...
function BOOL (line 522) | BOOL TessPageIteratorIsAtBeginningOf(const TessPageIterator *handle, Tes...
function BOOL (line 526) | BOOL TessPageIteratorIsAtFinalElement(const TessPageIterator *handle, Te...
function BOOL (line 531) | BOOL TessPageIteratorBoundingBox(const TessPageIterator *handle, TessPag...
function TessPolyBlockType (line 536) | TessPolyBlockType TessPageIteratorBlockType(const TessPageIterator *hand...
type Pix (line 540) | struct Pix
type Pix (line 545) | struct Pix
type Pix (line 546) | struct Pix
function BOOL (line 550) | BOOL TessPageIteratorBaseline(const TessPageIterator *handle, TessPageIt...
function TessPageIteratorOrientation (line 555) | void TessPageIteratorOrientation(TessPageIterator *handle, TessOrientati...
function TessPageIteratorParagraphInfo (line 561) | void TessPageIteratorParagraphInfo(TessPageIterator *handle,
function TessResultIteratorDelete (line 575) | void TessResultIteratorDelete(TessResultIterator *handle) {
function TessResultIterator (line 579) | TessResultIterator *TessResultIteratorCopy(const TessResultIterator *han...
function TessPageIterator (line 583) | TessPageIterator *TessResultIteratorGetPageIterator(TessResultIterator *...
function TessPageIterator (line 587) | const TessPageIterator *TessResultIteratorGetPageIteratorConst(const Tes...
function TessChoiceIterator (line 591) | TessChoiceIterator *TessResultIteratorGetChoiceIterator(const TessResult...
function BOOL (line 595) | BOOL TessResultIteratorNext(TessResultIterator *handle, TessPageIterator...
function TessResultIteratorConfidence (line 603) | float TessResultIteratorConfidence(const TessResultIterator *handle, Tes...
function BOOL (line 645) | BOOL TessResultIteratorWordIsFromDictionary(const TessResultIterator *ha...
function BOOL (line 649) | BOOL TessResultIteratorWordIsNumeric(const TessResultIterator *handle) {
function BOOL (line 653) | BOOL TessResultIteratorSymbolIsSuperscript(const TessResultIterator *han...
function BOOL (line 657) | BOOL TessResultIteratorSymbolIsSubscript(const TessResultIterator *handl...
function BOOL (line 661) | BOOL TessResultIteratorSymbolIsDropcap(const TessResultIterator *handle) {
function TessChoiceIteratorDelete (line 665) | void TessChoiceIteratorDelete(TessChoiceIterator *handle) {
function BOOL (line 669) | BOOL TessChoiceIteratorNext(TessChoiceIterator *handle) {
function TessChoiceIteratorConfidence (line 677) | float TessChoiceIteratorConfidence(const TessChoiceIterator *handle) {
function ETEXT_DESC (line 681) | ETEXT_DESC *TessMonitorCreate() {
function TessMonitorDelete (line 685) | void TessMonitorDelete(ETEXT_DESC *monitor) {
function TessMonitorSetCancelFunc (line 689) | void TessMonitorSetCancelFunc(ETEXT_DESC *monitor, TessCancelFunc cancel...
function TessMonitorSetCancelThis (line 693) | void TessMonitorSetCancelThis(ETEXT_DESC *monitor, void *cancelThis) {
function TessMonitorSetProgressFunc (line 701) | void TessMonitorSetProgressFunc(ETEXT_DESC *monitor, TessProgressFunc pr...
function TessMonitorGetProgress (line 705) | int TessMonitorGetProgress(ETEXT_DESC *monitor) {
function TessMonitorSetDeadlineMSecs (line 709) | void TessMonitorSetDeadlineMSecs(ETEXT_DESC *monitor, int deadline) {
FILE: src/api/hocrrenderer.cpp
type tesseract (line 28) | namespace tesseract {
function GetBlockTextOrientation (line 33) | static tesseract::Orientation GetBlockTextOrientation(const PageIterat...
function AddBaselineCoordsTohOCR (line 51) | static void AddBaselineCoordsTohOCR(const PageIterator *it,
function AddBoxTohOCR (line 89) | static void AddBoxTohOCR(const ResultIterator *it, PageIteratorLevel l...
FILE: src/api/lstmboxrenderer.cpp
type tesseract (line 24) | namespace tesseract {
function AddBoxToLSTM (line 31) | static void AddBoxToLSTM(int right, int bottom, int top, int image_hei...
FILE: src/api/pagerenderer.cpp
type tesseract (line 37) | namespace tesseract {
function GetSlopeAndOffset (line 42) | static void GetSlopeAndOffset(float x0, float y0, float x1, float y1, ...
function AddPointsToPAGE (line 54) | static void AddPointsToPAGE(Pta *pts, std::stringstream &str) {
function AddPointToWordPolygon (line 73) | static void AddPointToWordPolygon(
function Pta (line 100) | static Pta *TransposePolygonline(Pta *pts) {
function Pta (line 111) | static Pta *ReversePolygonline(Pta *pts, int type) {
function Pta (line 122) | static Pta *DestroyAndCreatePta(Pta *pts) {
function Pta (line 131) | static Pta *RecalcPolygonline(Pta *pts, bool upper) {
function Pta (line 198) | static Pta *PolygonToBoxCoords(Pta *pts) {
function UpdateBlockPoints (line 215) | static void UpdateBlockPoints(Pta *block_top_pts, Pta *block_bottom_pts,
function SimplifyLinePolygon (line 257) | static void SimplifyLinePolygon(Pta *polyline, int tolerance, bool upp...
function AddBoxToPAGE (line 320) | static void AddBoxToPAGE(const ResultIterator *it, PageIteratorLevel l...
function AppendLinePolygon (line 333) | static void AppendLinePolygon(Pta *pts_ltr, Pta *pts_rtl, Pta *ptss,
function AddBaselineToPTA (line 356) | static void AddBaselineToPTA(const ResultIterator *it, PageIteratorLev...
function AddBaselinePtsToPAGE (line 368) | static void AddBaselinePtsToPAGE(Pta *baseline_pts, std::stringstream ...
function Pta (line 385) | static Pta *SortBaseline(Pta *baseline_pts) {
function Pta (line 413) | static Pta *ClipAndSimplifyBaseline(Pta *bottom_pts, Pta *baseline_pts,
function Pta (line 479) | static Pta *FitBaselineIntoLinePolygon(Pta *bottom_pts, Pta *baseline_...
FILE: src/api/pdfrenderer.cpp
type tesseract (line 181) | namespace tesseract {
function prec (line 214) | static double prec(double x) {
function dist2 (line 223) | static long dist2(int x1, int y1, int x2, int y2) {
function GetWordBaseline (line 235) | static void GetWordBaseline(int writing_direction, int ppi, int height...
function AffineMatrix (line 274) | static void AffineMatrix(int writing_direction, int line_x1, int line_...
function ClipBaseline (line 302) | static void ClipBaseline(int ppi, int x1, int y1, int x2, int y2, int ...
function CodepointToUtf16be (line 315) | static bool CodepointToUtf16be(int code, char utf16[kMaxBytesPerCodepo...
FILE: src/api/renderer.cpp
type tesseract (line 28) | namespace tesseract {
FILE: src/api/wordstrboxrenderer.cpp
type tesseract (line 24) | namespace tesseract {
FILE: src/arch/dotproduct.cpp
type tesseract (line 19) | namespace tesseract {
function TFloat (line 22) | TFloat DotProductNative(const TFloat *u, const TFloat *v, int n) {
FILE: src/arch/dotproduct.h
function namespace (line 22) | namespace tesseract {
FILE: src/arch/dotproductavx.cpp
type tesseract (line 28) | namespace tesseract {
function DotProductAVX (line 33) | float DotProductAVX(const float *u, const float *v, int n) {
function DotProductAVX (line 54) | double DotProductAVX(const double *u, const double *v, int n) {
FILE: src/arch/dotproductavx512.cpp
type tesseract (line 28) | namespace tesseract {
function DotProductAVX512F (line 33) | float DotProductAVX512F(const float *u, const float *v, int n) {
function DotProductAVX512F (line 51) | double DotProductAVX512F(const double *u, const double *v, int n) {
FILE: src/arch/dotproductfma.cpp
type tesseract (line 28) | namespace tesseract {
function DotProductFMA (line 33) | float DotProductFMA(const float *u, const float *v, int n) {
function DotProductFMA (line 60) | double DotProductFMA(const double *u, const double *v, int n) {
FILE: src/arch/dotproductneon.cpp
type tesseract (line 22) | namespace tesseract {
function DotProductNEON (line 29) | float DotProductNEON(const float *u, const float *v, int n) {
function TFloat (line 56) | TFloat DotProductNEON(const TFloat *u, const TFloat *v, int n) {
FILE: src/arch/dotproductsse.cpp
type tesseract (line 29) | namespace tesseract {
function DotProductSSE (line 34) | float DotProductSSE(const float *u, const float *v, int n) {
function DotProductSSE (line 93) | double DotProductSSE(const double *u, const double *v, int n) {
FILE: src/arch/intsimdmatrix.cpp
type tesseract (line 22) | namespace tesseract {
FILE: src/arch/intsimdmatrix.h
function namespace (line 28) | namespace tesseract {
FILE: src/arch/intsimdmatrixavx2.cpp
type tesseract (line 38) | namespace tesseract {
function MultiplyGroup (line 68) | static inline void MultiplyGroup(const __m256i &rep_input, const __m25...
function __m128i (line 91) | static inline __m128i load64_to_128(const int8_t *wi_) {
function ExtractResults8 (line 98) | static inline void ExtractResults8(__m256i result, const int8_t *wi,
function ExtractResults16 (line 112) | static inline void ExtractResults16(__m256i result0, __m256i result1,
function PartialMatrixDotVector64 (line 148) | static void PartialMatrixDotVector64(const int8_t *wi, const float *sc...
function PartialMatrixDotVector32 (line 193) | static void PartialMatrixDotVector32(const int8_t *wi, const float *sc...
function PartialMatrixDotVector16 (line 228) | static void PartialMatrixDotVector16(const int8_t *wi, const float *sc...
function PartialMatrixDotVector8 (line 258) | static inline void PartialMatrixDotVector8(const int8_t *wi, const flo...
function matrixDotVector (line 284) | static void matrixDotVector(int dim1, int dim2, const int8_t *wi, cons...
function ExtractResults8 (line 333) | static inline void ExtractResults8(__m256i result, const int8_t *wi, c...
function ExtractResults16 (line 351) | static inline void ExtractResults16(__m256i result0, __m256i result1, ...
function PartialMatrixDotVector64 (line 393) | static void PartialMatrixDotVector64(const int8_t *wi, const double *s...
function PartialMatrixDotVector32 (line 438) | static void PartialMatrixDotVector32(const int8_t *wi, const double *s...
function PartialMatrixDotVector16 (line 473) | static void PartialMatrixDotVector16(const int8_t *wi, const double *s...
function PartialMatrixDotVector8 (line 503) | static inline void PartialMatrixDotVector8(const int8_t *wi, const dou...
function matrixDotVector (line 529) | static void matrixDotVector(int dim1, int dim2, const int8_t *wi, cons...
FILE: src/arch/intsimdmatrixneon.cpp
type tesseract (line 29) | namespace tesseract {
function PartialMatrixDotVector8 (line 55) | static inline void PartialMatrixDotVector8(const int8_t *__restrict wi,
function matrixDotVector (line 167) | static void matrixDotVector(int dim1, int dim2, const int8_t *wi, cons...
FILE: src/arch/intsimdmatrixrvv.cpp
type tesseract (line 26) | namespace tesseract {
function DotProduct (line 28) | static int DotProduct(const int8_t *u, const int8_t *v, int num) {
function matrixDotVector (line 61) | static void matrixDotVector(int dim1, int dim2, const int8_t *wi, cons...
FILE: src/arch/intsimdmatrixsse.cpp
type tesseract (line 30) | namespace tesseract {
function IntDotProductSSE (line 34) | static int32_t IntDotProductSSE(const int8_t *u, const int8_t *v, int ...
function PartialMatrixDotVector1 (line 72) | static void PartialMatrixDotVector1(const int8_t *wi, const TFloat *sc...
function matrixDotVector (line 79) | static void matrixDotVector(int dim1, int dim2, const int8_t *wi, cons...
FILE: src/arch/simddetect.cpp
type tesseract (line 74) | namespace tesseract {
function TFloat (line 114) | static TFloat DotProductAccelerate(const TFloat* u, const TFloat* v, i...
function TFloat (line 127) | static TFloat DotProductGeneric(const TFloat *u, const TFloat *v, int ...
function TFloat (line 136) | static TFloat DotProductStdInnerProduct(const TFloat *u, const TFloat ...
function SetDotProduct (line 140) | static void SetDotProduct(DotProductFunction f, const IntSimdMatrix *m...
FILE: src/arch/simddetect.h
function namespace (line 23) | namespace tesseract {
FILE: src/ccmain/adaptions.cpp
type tesseract (line 33) | namespace tesseract {
type MODES (line 45) | enum MODES {
FILE: src/ccmain/applybox.cpp
type tesseract (line 75) | namespace tesseract {
function clear_any_old_text (line 78) | static void clear_any_old_text(BLOCK_LIST *block_list) {
function PAGE_RES (line 111) | PAGE_RES *Tesseract::ApplyBoxes(const char *filename, bool find_segmen...
function MedianXHeight (line 161) | static double MedianXHeight(BLOCK_LIST *block_list) {
function PAGE_RES (line 198) | PAGE_RES *Tesseract::SetupApplyBoxes(const std::vector<TBOX> &boxes, B...
function BoxMissMetric (line 293) | static double BoxMissMetric(const TBOX &box1, const TBOX &box2) {
FILE: src/ccmain/control.cpp
type tesseract (line 55) | namespace tesseract {
function WordGap (line 750) | static void WordGap(const PointerVector<WERD_RES> &words, unsigned ind...
function EvaluateWordSpan (line 763) | static void EvaluateWordSpan(const PointerVector<WERD_RES> &words, uns...
function SelectBestWords (line 790) | static int SelectBestWords(double rating_ratio, double certainty_margi...
function WordsAcceptable (line 902) | static bool WordsAcceptable(const PointerVector<WERD_RES> &words) {
function BLOB_CHOICE (line 1630) | static BLOB_CHOICE *FindBestMatchingChoice(UNICHAR_ID char_id, WERD_RE...
function CorrectRepcharChoices (line 1647) | static void CorrectRepcharChoices(BLOB_CHOICE *blob_choice, WERD_RES *...
function ACCEPTABLE_WERD_TYPE (line 1699) | ACCEPTABLE_WERD_TYPE Tesseract::acceptable_word_string(const UNICHARSE...
function find_modal_font (line 1894) | static void find_modal_font( // good chars in word
FILE: src/ccmain/control.h
type ACCEPTABLE_WERD_TYPE (line 28) | enum ACCEPTABLE_WERD_TYPE {
FILE: src/ccmain/docqual.cpp
type tesseract (line 25) | namespace tesseract {
function countMatchingBlobs (line 27) | static void countMatchingBlobs(int16_t &match_count, int /*index*/) {
function countAcceptedBlobs (line 31) | static void countAcceptedBlobs(WERD_RES *word, int16_t &match_count, i...
function acceptIfGoodQuality (line 39) | static void acceptIfGoodQuality(WERD_RES *word, int index) {
function reject_whole_page (line 360) | void reject_whole_page(PAGE_RES_IT &page_res_it) {
function GARBAGE_LEVEL (line 610) | GARBAGE_LEVEL Tesseract::garbage_word(WERD_RES *word, bool ok_dict_wor...
function CRUNCH_MODE (line 819) | CRUNCH_MODE Tesseract::word_deletable(WERD_RES *word, int16_t &delete_...
FILE: src/ccmain/docqual.h
function namespace (line 24) | namespace tesseract {
FILE: src/ccmain/equationdetect.cpp
type tesseract (line 42) | namespace tesseract {
function BOOL_VAR (line 45) | static BOOL_VAR(equationdetect_save_bi_image, false, "Save input bi im...
function ColPartition (line 1349) | ColPartition *EquationDetect::SearchNNVertical(const bool search_bottom,...
FILE: src/ccmain/equationdetect.h
function namespace (line 30) | namespace tesseract {
FILE: src/ccmain/fixspace.cpp
type tesseract (line 43) | namespace tesseract {
class BLOCK (line 45) | class BLOCK
class ROW (line 46) | class ROW
function c_blob_comparator (line 57) | static int c_blob_comparator( // sort blobs
function initialise_search (line 197) | void initialise_search(WERD_RES_LIST &src_list, WERD_RES_LIST &new_lis...
function transform_to_next_perm (line 385) | void transform_to_next_perm(WERD_RES_LIST &words) {
function fixspace_dbg (line 797) | void fixspace_dbg(WERD_RES *word) {
FILE: src/ccmain/fixspace.h
function namespace (line 25) | namespace tesseract {
FILE: src/ccmain/fixxht.cpp
type tesseract (line 29) | namespace tesseract {
FILE: src/ccmain/linerec.cpp
type tesseract (line 30) | namespace tesseract {
function ImageData (line 133) | ImageData *Tesseract::GetLineData(const TBOX &line_box, const std::vec...
function ImageData (line 165) | ImageData *Tesseract::GetRectImage(const TBOX &box, const BLOCK &block...
FILE: src/ccmain/ltrresultiterator.cpp
type tesseract (line 28) | namespace tesseract {
function StrongScriptDirection (line 209) | StrongScriptDirection LTRResultIterator::WordDirection() const {
FILE: src/ccmain/mutableiterator.cpp
type tesseract (line 17) | namespace tesseract {
FILE: src/ccmain/mutableiterator.h
function namespace (line 27) | namespace tesseract {
FILE: src/ccmain/osdetect.cpp
type tesseract (line 39) | namespace tesseract {
function remove_nontext_regions (line 147) | static void remove_nontext_regions(tesseract::Tesseract *tess, BLOCK_L...
function orientation_and_script_detection (line 176) | int orientation_and_script_detection(const char *filename, OSResults *...
function os_detect (line 213) | int os_detect(TO_BLOCK_LIST *port_blocks, OSResults *osr, tesseract::T...
function os_detect_blobs (line 266) | int os_detect_blobs(const std::vector<int> *allowed_scripts, BLOBNBOX_...
function os_detect_blob (line 315) | bool os_detect_blob(BLOBNBOX *bbox, OrientationDetector *o, ScriptDete...
function OrientationIdToValue (line 559) | int OrientationIdToValue(const int &id) {
FILE: src/ccmain/output.cpp
type tesseract (line 38) | namespace tesseract {
function determine_newline_type (line 207) | char determine_newline_type( // test line ends
function UNICHAR_ID (line 247) | UNICHAR_ID Tesseract::get_rep_char(WERD_RES *word) { // what char is r...
FILE: src/ccmain/output.h
function namespace (line 23) | namespace tesseract {
FILE: src/ccmain/pageiterator.cpp
type tesseract (line 28) | namespace tesseract {
function PageIterator (line 80) | const PageIterator &PageIterator::operator=(const PageIterator &src) {
function PolyBlockType (line 388) | PolyBlockType PageIterator::BlockType() const {
function Pta (line 400) | Pta *PageIterator::BlockPolygon() const {
function Pix (line 450) | Pix *PageIterator::GetBinaryImage(PageIteratorLevel level) const {
function Pix (line 488) | Pix *PageIterator::GetImage(PageIteratorLevel level, int padding,
FILE: src/ccmain/pagesegmain.cpp
type tesseract (line 51) | namespace tesseract {
function Image (line 61) | static Image RemoveEnclosingCircle(Image pixs) {
function AddAllScriptsConverted (line 249) | static void AddAllScriptsConverted(const UNICHARSET &sid_set, const UN...
function ColumnFinder (line 272) | ColumnFinder *Tesseract::SetupPageSegAndDetectOrientation(PageSegMode ...
FILE: src/ccmain/pagewalk.cpp
type tesseract (line 23) | namespace tesseract {
FILE: src/ccmain/par_control.cpp
type tesseract (line 24) | namespace tesseract {
type BlobData (line 26) | struct BlobData {
method BlobData (line 27) | BlobData() = default;
method BlobData (line 28) | BlobData(int index, Tesseract *tess, const WERD_RES &word)
FILE: src/ccmain/paragraphs.cpp
type tesseract (line 54) | namespace tesseract {
function Epsilon (line 70) | static int Epsilon(int space_pix) {
function AcceptableRowArgs (line 74) | static bool AcceptableRowArgs(int debug_level, int min_num_rows, const...
function PrintTable (line 95) | static void PrintTable(const std::vector<std::vector<std::string>> &ro...
function RtlEmbed (line 133) | static std::string RtlEmbed(const std::string &word, bool rtlify) {
function PrintDetectorState (line 141) | static void PrintDetectorState(const ParagraphTheory &theory,
function DebugDump (line 180) | static void DebugDump(bool should_print, const char *phase, const Para...
function PrintRowRange (line 190) | static void PrintRowRange(const std::vector<RowScratchRegisters> &rows...
function IsLatinLetter (line 201) | static bool IsLatinLetter(int ch) {
function IsDigitLike (line 205) | static bool IsDigitLike(int ch) {
function IsOpeningPunct (line 209) | static bool IsOpeningPunct(int ch) {
function IsTerminalPunct (line 213) | static bool IsTerminalPunct(int ch) {
function LikelyListNumeral (line 242) | static bool LikelyListNumeral(const std::string &word) {
function LikelyListMark (line 278) | static bool LikelyListMark(const std::string &word) {
function AsciiLikelyListItem (line 283) | bool AsciiLikelyListItem(const std::string &word) {
function UnicodeFor (line 290) | static int UnicodeFor(const UNICHARSET *u, const WERD_CHOICE *werd, un...
class UnicodeSpanSkipper (line 299) | class UnicodeSpanSkipper {
method UnicodeSpanSkipper (line 301) | UnicodeSpanSkipper(const UNICHARSET *unicharset, const WERD_CHOICE *...
function LikelyListMarkUnicode (line 354) | static bool LikelyListMarkUnicode(int ch) {
function UniLikelyListItem (line 383) | static bool UniLikelyListItem(const UNICHARSET *u, const WERD_CHOICE *...
function push_back_new (line 419) | void push_back_new(std::vector<T> &vector, const T &data) {
function LeftWordAttributes (line 432) | void LeftWordAttributes(const UNICHARSET *unicharset, const WERD_CHOIC...
function RightWordAttributes (line 478) | void RightWordAttributes(const UNICHARSET *unicharset, const WERD_CHOI...
function LineType (line 561) | LineType RowScratchRegisters::GetLineType() const {
function LineType (line 586) | LineType RowScratchRegisters::GetLineType(const ParagraphModel *model)...
function ParagraphModel (line 674) | const ParagraphModel *RowScratchRegisters::UniqueStartHypothesis() con...
function ParagraphModel (line 681) | const ParagraphModel *RowScratchRegisters::UniqueBodyHypothesis() const {
type Cluster (line 702) | struct Cluster {
method Cluster (line 703) | Cluster() : center(0), count(0) {}
method Cluster (line 704) | Cluster(int cen, int num) : center(cen), count(num) {}
class SimpleClusterer (line 710) | class SimpleClusterer {
method SimpleClusterer (line 712) | explicit SimpleClusterer(int max_cluster_width) : max_cluster_width_...
method Add (line 713) | void Add(int value) {
method size (line 716) | size_t size() const {
function ClosestCluster (line 727) | static int ClosestCluster(const std::vector<Cluster> &clusters, int va...
function CalculateTabStops (line 753) | static void CalculateTabStops(std::vector<RowScratchRegisters> *rows, ...
function MarkRowsWithModel (line 868) | static void MarkRowsWithModel(std::vector<RowScratchRegisters> *rows, ...
type GeometricClassifierState (line 912) | struct GeometricClassifierState {
method GeometricClassifierState (line 913) | GeometricClassifierState(int dbg_level, std::vector<RowScratchRegist...
method AssumeLeftJustification (line 926) | void AssumeLeftJustification() {
method AssumeRightJustification (line 931) | void AssumeRightJustification() {
method IsFullRow (line 958) | bool IsFullRow(int i) const {
method AlignsideTabIndex (line 963) | int AlignsideTabIndex(int row_idx) const {
method FirstWordWouldHaveFit (line 969) | bool FirstWordWouldHaveFit(int row_a, int row_b) {
method PrintRows (line 973) | void PrintRows() const {
method Fail (line 977) | void Fail(int min_debug_level, const char *why) const {
method ParagraphModel (line 985) | ParagraphModel Model() const {
function GeometricClassifyThreeTabStopTextBlock (line 1047) | static void GeometricClassifyThreeTabStopTextBlock(int debug_level, Ge...
function GeometricClassify (line 1138) | static void GeometricClassify(int debug_level, std::vector<RowScratchR...
function ParagraphModel (line 1271) | const ParagraphModel *ParagraphTheory::AddModel(const ParagraphModel &...
function ParagraphModel (line 1302) | const ParagraphModel *ParagraphTheory::Fits(const std::vector<RowScrat...
function ValidFirstLine (line 1331) | bool ValidFirstLine(const std::vector<RowScratchRegisters> *rows, int ...
function ValidBodyLine (line 1340) | bool ValidBodyLine(const std::vector<RowScratchRegisters> *rows, int row,
function CrownCompatible (line 1349) | bool CrownCompatible(const std::vector<RowScratchRegisters> *rows, int...
function DiscardUnusedModels (line 1511) | static void DiscardUnusedModels(const std::vector<RowScratchRegisters>...
function DowngradeWeakestToCrowns (line 1544) | static void DowngradeWeakestToCrowns(int debug_level, ParagraphTheory ...
function RecomputeMarginsAndClearHypotheses (line 1612) | void RecomputeMarginsAndClearHypotheses(std::vector<RowScratchRegister...
function InterwordSpace (line 1654) | int InterwordSpace(const std::vector<RowScratchRegisters> &rows, int r...
function FirstWordWouldHaveFit (line 1678) | bool FirstWordWouldHaveFit(const RowScratchRegisters &before, const Ro...
function FirstWordWouldHaveFit (line 1704) | bool FirstWordWouldHaveFit(const RowScratchRegisters &before, const Ro...
function TextSupportsBreak (line 1721) | static bool TextSupportsBreak(const RowScratchRegisters &before, const...
function LikelyParagraphStart (line 1729) | static bool LikelyParagraphStart(const RowScratchRegisters &before,
function ParagraphModel (line 1741) | static ParagraphModel InternalParagraphModelByOutline(
function ParagraphModel (line 1845) | static ParagraphModel ParagraphModelByOutline(int debug_level,
function RowsFitModel (line 1859) | bool RowsFitModel(const std::vector<RowScratchRegisters> *rows, int st...
function MarkStrongEvidence (line 1886) | static void MarkStrongEvidence(std::vector<RowScratchRegisters> *rows,...
function ModelStrongEvidence (line 1948) | static void ModelStrongEvidence(int debug_level, std::vector<RowScratc...
function StrongEvidenceClassify (line 2040) | static void StrongEvidenceClassify(int debug_level, std::vector<RowScr...
function SeparateSimpleLeaderLines (line 2069) | static void SeparateSimpleLeaderLines(std::vector<RowScratchRegisters>...
function ConvertHypothesizedModelRunsToParagraphs (line 2083) | static void ConvertHypothesizedModelRunsToParagraphs(int debug_level,
type Interval (line 2164) | struct Interval {
method Interval (line 2165) | Interval() : begin(0), end(0) {}
method Interval (line 2166) | Interval(int b, int e) : begin(b), end(e) {}
function RowIsStranded (line 2181) | static bool RowIsStranded(const std::vector<RowScratchRegisters> &rows...
function LeftoverSegments (line 2237) | static void LeftoverSegments(const std::vector<RowScratchRegisters> &r...
function CanonicalizeDetectionResults (line 2288) | void CanonicalizeDetectionResults(std::vector<PARA *> *row_owners, PAR...
function DetectParagraphs (line 2318) | void DetectParagraphs(int debug_level, std::vector<RowInfo> *row_infos,
function InitializeTextAndBoxesPreRecognition (line 2406) | static void InitializeTextAndBoxesPreRecognition(const MutableIterator...
function InitializeRowInfo (line 2467) | static void InitializeRowInfo(bool after_recognition, const MutableIte...
function DetectParagraphs (line 2562) | void DetectParagraphs(int debug_level, bool after_text_recognition,
FILE: src/ccmain/paragraphs.h
function namespace (line 27) | namespace tesseract {
FILE: src/ccmain/paragraphs_internal.h
function namespace (line 28) | namespace tesseract {
function class (line 95) | class RowScratchRegisters {
function class (line 191) | class ParagraphTheory {
function class (line 239) | class ParagraphModelSmearer {
FILE: src/ccmain/paramsd.cpp
type tesseract (line 44) | namespace tesseract {
function ParamContent (line 91) | ParamContent *ParamContent::GetParamContentById(int id) {
function SVMenuNode (line 201) | SVMenuNode *ParamsEditor::BuildListOfAllLeaves(tesseract::Tesseract *t...
FILE: src/ccmain/paramsd.h
function namespace (line 29) | namespace tesseract {
FILE: src/ccmain/pgedit.cpp
type tesseract (line 44) | namespace tesseract {
type CMD_EVENTS (line 50) | enum CMD_EVENTS {
type ColorationMode (line 83) | enum ColorationMode {
function show_point (line 142) | static void show_point(PAGE_RES *page_res, float x, float y) {
function pgeditor_msg (line 178) | static void pgeditor_msg( // message display
class BlnEventHandler (line 183) | class BlnEventHandler : public SVEventHandler {
method Notify (line 185) | void Notify(const SVEvent *sv_event) override {
function ScrollView (line 199) | static ScrollView *bln_word_window_handle() { // return handle
function build_image_window (line 219) | static void build_image_window(int width, int height) {
function display_bln_lines (line 231) | static void display_bln_lines(ScrollView *window, ScrollView::Color co...
function SVMenuNode (line 275) | SVMenuNode *Tesseract::build_menu_new() {
type tesseract (line 870) | namespace tesseract {
type CMD_EVENTS (line 50) | enum CMD_EVENTS {
type ColorationMode (line 83) | enum ColorationMode {
function show_point (line 142) | static void show_point(PAGE_RES *page_res, float x, float y) {
function pgeditor_msg (line 178) | static void pgeditor_msg( // message display
class BlnEventHandler (line 183) | class BlnEventHandler : public SVEventHandler {
method Notify (line 185) | void Notify(const SVEvent *sv_event) override {
function ScrollView (line 199) | static ScrollView *bln_word_window_handle() { // return handle
function build_image_window (line 219) | static void build_image_window(int width, int height) {
function display_bln_lines (line 231) | static void display_bln_lines(ScrollView *window, ScrollView::Color co...
function SVMenuNode (line 275) | SVMenuNode *Tesseract::build_menu_new() {
FILE: src/ccmain/pgedit.h
function namespace (line 25) | namespace tesseract {
FILE: src/ccmain/recogtraining.cpp
type tesseract (line 30) | namespace tesseract {
function FILE (line 36) | FILE *Tesseract::init_recog_training(const char *filename) {
function read_t (line 59) | static bool read_t(PAGE_RES_IT *page_res_it, TBOX *tbox) {
function PrintPath (line 163) | static void PrintPath(int length, const BLOB_CHOICE **blob_choices, co...
function PrintMatrixPaths (line 180) | static void PrintMatrixPaths(int col, int dim, const MATRIX &ratings, ...
FILE: src/ccmain/reject.cpp
type tesseract (line 28) | namespace tesseract {
function reject_blanks (line 182) | void reject_blanks(WERD_RES *word) {
function reject_poor_matches (line 208) | void reject_poor_matches(WERD_RES *word) {
function compute_reject_threshold (line 227) | float compute_reject_threshold(WERD_CHOICE *word) {
type tesseract (line 54) | namespace tesseract {
function reject_blanks (line 182) | void reject_blanks(WERD_RES *word) {
function reject_poor_matches (line 208) | void reject_poor_matches(WERD_RES *word) {
function compute_reject_threshold (line 227) | float compute_reject_threshold(WERD_CHOICE *word) {
FILE: src/ccmain/reject.h
function namespace (line 23) | namespace tesseract {
FILE: src/ccmain/resultiterator.cpp
type tesseract (line 36) | namespace tesseract {
function ResultIterator (line 53) | ResultIterator *ResultIterator::StartOfParagraph(const LTRResultIterat...
function PrintScriptDirs (line 235) | static void PrintScriptDirs(const std::vector<StrongScriptDirection> &...
FILE: src/ccmain/superscript.cpp
type tesseract (line 22) | namespace tesseract {
function LeadingUnicharsToChopped (line 24) | static int LeadingUnicharsToChopped(WERD_RES *word, int num_unichars) {
function TrailingUnicharsToChopped (line 32) | static int TrailingUnicharsToChopped(WERD_RES *word, int num_unichars) {
function YOutlierPieces (line 46) | static void YOutlierPieces(WERD_RES *word, int rebuilt_blob_index, int...
function WERD_RES (line 369) | WERD_RES *Tesseract::TrySuperscriptSplits(int num_chopped_leading, flo...
FILE: src/ccmain/tessbox.cpp
type tesseract (line 31) | namespace tesseract {
FILE: src/ccmain/tessedit.cpp
type tesseract (line 41) | namespace tesseract {
function IsStrInList (line 230) | static bool IsStrInList(const std::string &str, const std::vector<std:...
function CollectFonts (line 418) | static void CollectFonts(const UnicityTable<FontInfo> &new_fonts,
function AssignIds (line 427) | static void AssignIds(const UnicityTable<FontInfo> &all_fonts, Unicity...
type CMD_EVENTS (line 463) | enum CMD_EVENTS { ACTION_1_CMD_EVENT, RECOG_WERDS, RECOG_PSEUDO, ACTIO...
FILE: src/ccmain/tesseractclass.cpp
type tesseract (line 51) | namespace tesseract {
function Dict (line 484) | Dict &Tesseract::getDict() {
FILE: src/ccmain/tesseractclass.h
function namespace (line 55) | namespace tesseract {
function set_pix_thresholds (line 250) | void set_pix_thresholds(Image thresholds) {
function set_source_resolution (line 257) | void set_source_resolution(int ppi) {
function SetScaledColor (line 272) | void SetScaledColor(int factor, Image color) {
function Textord (line 279) | Textord *mutable_textord() {
function Tesseract (line 289) | Tesseract *get_sub_lang(int index) const {
function init_tesseract (line 503) | int init_tesseract(const std::string &datapath, const std::string &langu...
FILE: src/ccmain/tfacepp.cpp
type tesseract (line 36) | namespace tesseract {
FILE: src/ccmain/thresholder.cpp
type tesseract (line 36) | namespace tesseract {
function Image (line 317) | Image ImageThresholder::GetPixRectThresholds() {
function Image (line 344) | Image ImageThresholder::GetPixRect() {
function Image (line 361) | Image ImageThresholder::GetPixRectGrey() {
FILE: src/ccmain/thresholder.h
type Pix (line 26) | struct Pix
function ThresholdMethod (line 30) | enum class ThresholdMethod {
FILE: src/ccmain/werdit.cpp
type tesseract (line 27) | namespace tesseract {
function PAGE_RES_IT (line 38) | PAGE_RES_IT *make_pseudo_word(PAGE_RES *page_res, const TBOX &selectio...
FILE: src/ccmain/werdit.h
function namespace (line 25) | namespace tesseract {
FILE: src/ccstruct/blamer.cpp
type tesseract (line 35) | namespace tesseract {
FILE: src/ccstruct/blamer.h
function namespace (line 40) | namespace tesseract {
function UpdateBestRating (line 146) | void UpdateBestRating(float rating) {
function MatrixPositionCorrect (line 156) | bool MatrixPositionCorrect(int index, const MATRIX_COORD &coord) {
function set_best_choice_is_dict_and_top_choice (line 160) | void set_best_choice_is_dict_and_top_choice(bool value) {
function set_lattice_data (line 169) | void set_lattice_data(const char *data, int size) {
function AddHypothesis (line 180) | void AddHypothesis(const tesseract::ParamsTrainingHypothesis &hypo) {
function ClearResults (line 198) | void ClearResults() {
function CopyTruth (line 214) | void CopyTruth(const BlamerBundle &other) {
function CopyResults (line 220) | void CopyResults(const BlamerBundle &other) {
function GuidedSegsearchStillGoing (line 280) | bool GuidedSegsearchStillGoing() const;
FILE: src/ccstruct/blobbox.cpp
type tesseract (line 41) | namespace tesseract {
function TBOX (line 337) | TBOX BLOBNBOX::BoundsWithinLimits(int left, int right) {
function find_cblob_limits (line 504) | void find_cblob_limits( // get y limits
function find_cblob_vlimits (line 543) | void find_cblob_vlimits( // get y limits
function find_cblob_hlimits (line 579) | void find_cblob_hlimits( // get x limits
function C_BLOB (line 614) | C_BLOB *crotate_cblob( // rotate it
function TBOX (line 638) | TBOX box_next( // get bounding box
function TBOX (line 667) | TBOX box_next_pre_chopped( // get bounding box
function vertical_cblob_projection (line 871) | void vertical_cblob_projection( // project outlines
function vertical_coutline_projection (line 890) | void vertical_coutline_projection( // project outlines
function SizeFilterBlobs (line 969) | static void SizeFilterBlobs(int min_height, int max_height, BLOBNBOX_L...
function plot_blob_list (line 1071) | void plot_blob_list(ScrollView *win, // window to dra...
FILE: src/ccstruct/blobbox.h
type Pix (line 41) | struct Pix
function namespace (line 43) | namespace tesseract {
function class (line 555) | class TO_ROW : public ELIST2<TO_ROW>::LINK {
function TESS_API (line 698) | TESS_API TO_BLOCK : public ELIST<TO_BLOCK>::LINK {
FILE: src/ccstruct/blobs.cpp
type tesseract (line 44) | namespace tesseract {
function TESSLINE (line 91) | TESSLINE *TESSLINE::BuildFromOutlineList(EDGEPT *outline) {
function TBOX (line 263) | TBOX TESSLINE::bounding_box() const {
function EDGEPT (line 290) | EDGEPT *TESSLINE::FindBestStartPt() const {
function TESSLINE (line 313) | static TESSLINE **ApproximateOutlineList(bool allow_detailed_fx, C_OUT...
function TBLOB (line 335) | TBLOB *TBLOB::PolygonalCopy(bool allow_detailed_fx, C_BLOB *src) {
function TBLOB (line 342) | TBLOB *TBLOB::ShallowCopy(const TBLOB &src) {
function TBLOB (line 353) | TBLOB *TBLOB::ClassifyNormalizeIfNeeded() const {
function TBOX (line 466) | TBOX TBLOB::bounding_box() const {
function SegmentLLSQ (line 577) | static void SegmentLLSQ(const FCOORD &pt1, const FCOORD &pt2, LLSQ *ac...
function SegmentCoords (line 605) | static void SegmentCoords(const FCOORD &pt1, const FCOORD &pt2, int x_...
function SegmentBBox (line 627) | static void SegmentBBox(const FCOORD &pt1, const FCOORD &pt2, TBOX *bb...
function CollectEdgesOfRun (line 658) | static void CollectEdgesOfRun(const EDGEPT *startpt, const EDGEPT *las...
function TWERD (line 778) | TWERD *TWERD::PolygonalCopy(bool allow_detailed_fx, WERD *src) {
function TBOX (line 863) | TBOX TWERD::bounding_box() const {
function divisible_blob (line 923) | bool divisible_blob(TBLOB *blob, bool italic_blob, TPOINT *location) {
function divide_blobs (line 970) | void divide_blobs(TBLOB *blob, TBLOB *other_blob, bool italic_blob, co...
FILE: src/ccstruct/blobs.h
type Pix (line 33) | struct Pix
function namespace (line 35) | namespace tesseract {
function operator (line 61) | bool operator==(const TPOINT &other) const {
function diff (line 69) | void diff(const TPOINT &p1, const TPOINT &p2) {
function cross (line 75) | int cross(const TPOINT &other) const {
function dot (line 80) | int dot(const TPOINT &other) const {
type EDGEPT (line 95) | struct EDGEPT {
function CopyFrom (line 105) | void CopyFrom(const EDGEPT &src) {
function WeightedDistance (line 118) | int WeightedDistance(const EDGEPT &other, int x_factor) const {
function EqualPos (line 124) | bool EqualPos(const EDGEPT &other) const {
function TBOX (line 129) | TBOX SegmentBox(const EDGEPT *end) const {
function SegmentArea (line 151) | int SegmentArea(const EDGEPT *end) const {
function ShortNonCircularSegment (line 164) | bool ShortNonCircularSegment(int min_points, const EDGEPT *end) const {
function Hide (line 178) | void Hide() {
function Reveal (line 181) | void Reveal() {
function MarkChop (line 187) | void MarkChop() {
function TESSLINE (line 209) | CLISTIZEH(EDGEPT)
function TBOX (line 248) | TBOX bounding_box() const;
function Contains (line 267) | bool Contains(const TPOINT &pt) const {
function TBLOB (line 291) | struct TBLOB {
function NumOutlines (line 337) | int NumOutlines() const;
function BBArea (line 376) | int BBArea() const {
FILE: src/ccstruct/blread.cpp
type tesseract (line 26) | namespace tesseract {
function read_unlv_file (line 36) | bool read_unlv_file( // print list of sides
function FullPageBlock (line 68) | void FullPageBlock(int width, int height, BLOCK_LIST *blocks) {
FILE: src/ccstruct/blread.h
function namespace (line 25) | namespace tesseract {
FILE: src/ccstruct/boxread.cpp
type tesseract (line 36) | namespace tesseract {
function BoxFileName (line 42) | static std::string BoxFileName(const char *image_filename) {
function FILE (line 59) | FILE *OpenBoxFile(const char *fname) {
function ReadAllBoxes (line 76) | bool ReadAllBoxes(int target_page, bool skip_blanks, const char *filen...
function ReadMemBoxes (line 97) | bool ReadMemBoxes(int target_page, bool skip_blanks, const char *box_d...
function ReadNextBox (line 153) | bool ReadNextBox(int *line_number, FILE *box_file, std::string &utf8_s...
function ReadNextBox (line 160) | bool ReadNextBox(int target_page, int *line_number, FILE *box_file, st...
function ParseBoxFileStr (line 205) | bool ParseBoxFileStr(const char *boxfile_str, int *page_number, std::s...
function MakeBoxFileStr (line 280) | void MakeBoxFileStr(const char *unichar_str, const TBOX &box, int page...
FILE: src/ccstruct/boxread.h
function namespace (line 28) | namespace tesseract {
FILE: src/ccstruct/boxword.cpp
type tesseract (line 26) | namespace tesseract {
function BoxWord (line 39) | BoxWord &BoxWord::operator=(const BoxWord &src) {
function BoxWord (line 56) | BoxWord *BoxWord::CopyFromNormalized(TWERD *tessword) {
FILE: src/ccstruct/boxword.h
function namespace (line 26) | namespace tesseract {
FILE: src/ccstruct/ccstruct.cpp
type tesseract (line 21) | namespace tesseract {
FILE: src/ccstruct/ccstruct.h
function namespace (line 24) | namespace tesseract {
FILE: src/ccstruct/coutln.cpp
type tesseract (line 43) | namespace tesseract {
function ComputeGradient (line 669) | static void ComputeGradient(const l_uint32 *data, int wpl, int x, int ...
function EvaluateVerticalDiff (line 685) | static bool EvaluateVerticalDiff(const l_uint32 *data, int wpl, int di...
function EvaluateHorizontalDiff (line 707) | static bool EvaluateHorizontalDiff(const l_uint32 *line, int diff_sign...
function C_OUTLINE (line 1017) | C_OUTLINE &C_OUTLINE::operator=(const C_OUTLINE &source) {
function ICOORD (line 1058) | ICOORD C_OUTLINE::chain_step(int chaindir) {
FILE: src/ccstruct/coutln.h
type Pix (line 33) | struct Pix
function namespace (line 35) | namespace tesseract {
FILE: src/ccstruct/crakedge.h
function namespace (line 26) | namespace tesseract {
FILE: src/ccstruct/debugpixa.h
function namespace (line 8) | namespace tesseract {
FILE: src/ccstruct/detlinefit.cpp
type tesseract (line 27) | namespace tesseract {
FILE: src/ccstruct/detlinefit.h
function namespace (line 25) | namespace tesseract {
FILE: src/ccstruct/dppoint.cpp
type tesseract (line 24) | namespace tesseract {
function DPPoint (line 31) | DPPoint *DPPoint::Solve(int min_step, int max_step, bool debug, CostFu...
FILE: src/ccstruct/dppoint.h
function namespace (line 25) | namespace tesseract {
FILE: src/ccstruct/fontinfo.cpp
type tesseract (line 23) | namespace tesseract {
function FontInfoDeleteCallback (line 129) | void FontInfoDeleteCallback(FontInfo f) {
function read_info (line 143) | bool read_info(TFile *f, FontInfo *fi) {
function write_info (line 157) | bool write_info(FILE *f, const FontInfo &fi) {
function read_spacing_info (line 163) | bool read_spacing_info(TFile *f, FontInfo *fi) {
function write_spacing_info (line 194) | bool write_spacing_info(FILE *f, const FontInfo &fi) {
function write_set (line 222) | bool write_set(FILE *f, const FontSet &fs) {
FILE: src/ccstruct/fontinfo.h
function namespace (line 31) | namespace tesseract {
function class (line 160) | class FontInfoTable : public GenericVector<FontInfo> {
FILE: src/ccstruct/image.cpp
type tesseract (line 22) | namespace tesseract {
function Image (line 24) | Image Image::clone() const {
function Image (line 28) | Image Image::copy() const {
function Image (line 42) | Image Image::operator|(Image i) const {
function Image (line 46) | Image &Image::operator|=(Image i) {
function Image (line 51) | Image Image::operator&(Image i) const {
function Image (line 55) | Image &Image::operator&=(Image i) {
FILE: src/ccstruct/image.h
type Pix (line 21) | struct Pix
function namespace (line 23) | namespace tesseract {
FILE: src/ccstruct/imagedata.cpp
type tesseract (line 40) | namespace tesseract {
function ImageData (line 60) | ImageData *ImageData::Build(const char *name, int page_number, const c...
function Image (line 195) | Image ImageData::GetPix() const {
function Image (line 217) | Image ImageData::PreScale(int target_height, int max_height,
function Image (line 351) | Image ImageData::GetPixInternal(const std::vector<char> &image_data) {
function ImageData (line 469) | const ImageData *DocumentData::GetPage(int index) {
function DocumentData (line 676) | DocumentData *DocumentCache::FindDocument(
function ImageData (line 709) | const ImageData *DocumentCache::GetPageRoundRobin(int serial) {
function ImageData (line 724) | const ImageData *DocumentCache::GetPageSequential(int serial) {
FILE: src/ccstruct/imagedata.h
type Pix (line 28) | struct Pix
function namespace (line 30) | namespace tesseract {
FILE: src/ccstruct/linlsq.cpp
type tesseract (line 24) | namespace tesseract {
function FCOORD (line 166) | FCOORD LLSQ::mean_point() const {
function FCOORD (line 250) | FCOORD LLSQ::vector_fit() const {
FILE: src/ccstruct/linlsq.h
function class (line 29) | class TESS_API LLSQ {
FILE: src/ccstruct/matrix.cpp
type tesseract (line 28) | namespace tesseract {
function MATRIX (line 61) | MATRIX *MATRIX::ConsumeAndMakeBigger(int ind) {
function MATRIX (line 97) | MATRIX *MATRIX::DeepCopy() const {
FILE: src/ccstruct/matrix.h
function namespace (line 40) | namespace tesseract {
function virtual (line 78) | virtual ~GENERIC_2D_ARRAY() {
function Resize (line 110) | void Resize(int size1, int size2, const T &empty) {
function ResizeWithCopy (line 117) | void ResizeWithCopy(int size1, int size2) {
function Clear (line 141) | void Clear() {
function Serialize (line 150) | bool Serialize(FILE *fp) const {
function Serialize (line 161) | bool Serialize(TFile *fp) const {
function DeSerialize (line 175) | bool DeSerialize(bool swap, FILE *fp) {
function DeSerialize (line 197) | bool DeSerialize(TFile *fp) {
function SerializeClasses (line 204) | bool SerializeClasses(FILE *fp) const {
function DeSerializeClasses (line 223) | bool DeSerializeClasses(bool swap, FILE *fp) {
function virtual (line 255) | virtual int index(int column, int row) const {
function put (line 260) | void put(ICOORD pos, const T &thing) {
function put (line 263) | void put(int column, int row, const T &thing) {
function T (line 268) | T get(ICOORD pos) const {
function T (line 271) | T get(int column, int row) const {
function T (line 275) | const T &operator()(int column, int row) const {
function T (line 283) | T *operator[](int column) {
function T (line 286) | const T *operator[](int column) const {
function operator (line 323) | void operator+=(const T &addend) {
function operator (line 330) | void operator*=(const T &factor) {
function Clip (line 337) | void Clip(const T &rangemin, const T &rangemax) {
function WithinBounds (line 345) | bool WithinBounds(const T &rangemin, const T &rangemax) const {
function Normalize (line 356) | double Normalize() {
function T (line 385) | T Max() const {
function T (line 402) | T MaxAbs() const {
function SumSquares (line 419) | void SumSquares(const GENERIC_2D_ARRAY<T> &src, const T &decay_factor) {
function AdamUpdate (line 429) | void AdamUpdate(const GENERIC_2D_ARRAY<T> &sum, const GENERIC_2D_ARRAY<T...
function AssertFinite (line 437) | void AssertFinite() const {
function RotatingTranspose (line 468) | void RotatingTranspose(const int *dims, int num_dims, int src_dim, int d...
function delete_matrix_pointers (line 515) | void delete_matrix_pointers() {
function SerializeSize (line 535) | bool SerializeSize(TFile *fp) const {
function DeSerializeSize (line 545) | bool DeSerializeSize(bool swap, FILE *fp) {
function DeSerializeSize (line 567) | bool DeSerializeSize(TFile *fp) {
function index (line 623) | int index(int column, int row) const override {
function AttachOnCorner (line 633) | void AttachOnCorner(BandTriMatrix<T> *array2) {
function class (line 657) | class MATRIX : public BandTriMatrix<BLOB_CHOICE_LIST *> {
function MATRIX_COORD (line 687) | struct MATRIX_COORD {
FILE: src/ccstruct/mod128.cpp
type tesseract (line 21) | namespace tesseract {
FILE: src/ccstruct/mod128.h
function namespace (line 24) | namespace tesseract {
FILE: src/ccstruct/normalis.cpp
type tesseract (line 32) | namespace tesseract {
function DENORM (line 50) | DENORM &DENORM::operator=(const DENORM &src) {
function ComputeRunlengthImage (line 158) | static void ComputeRunlengthImage(const TBOX &box,
function ComputeEdgeDensityProfiles (line 227) | static void ComputeEdgeDensityProfiles(const TBOX &box, const GENERIC_...
FILE: src/ccstruct/normalis.h
type Pix (line 28) | struct Pix
function namespace (line 30) | namespace tesseract {
FILE: src/ccstruct/ocrblock.cpp
type tesseract (line 27) | namespace tesseract {
function decreasing_top_order (line 71) | static int decreasing_top_order(const ROW *row1, const ROW *row2) {
function TBOX (line 88) | TBOX BLOCK::restricted_bounding_box(bool upper_dots, bool lower_dots) ...
function BLOCK (line 222) | BLOCK &BLOCK::operator=( // assignment
function LeftMargin (line 250) | static bool LeftMargin(ICOORDELT_LIST *segments, int x, int *margin) {
function RightMargin (line 281) | static bool RightMargin(ICOORDELT_LIST *segments, int x, int *margin) {
function PrintSegmentationStats (line 407) | void PrintSegmentationStats(BLOCK_LIST *block_list) {
function ExtractBlobsFromSegmentation (line 440) | void ExtractBlobsFromSegmentation(BLOCK_LIST *blocks, C_BLOB_LIST *out...
function RefreshWordBlobsFromNewBlobs (line 474) | void RefreshWordBlobsFromNewBlobs(BLOCK_LIST *block_list, C_BLOB_LIST ...
FILE: src/ccstruct/ocrblock.h
function namespace (line 26) | namespace tesseract {
FILE: src/ccstruct/ocrpara.cpp
type tesseract (line 25) | namespace tesseract {
FILE: src/ccstruct/ocrpara.h
function namespace (line 26) | namespace tesseract {
FILE: src/ccstruct/ocrrow.cpp
type tesseract (line 27) | namespace tesseract {
function TBOX (line 84) | TBOX ROW::restricted_bounding_box(bool upper_dots, bool lower_dots) co...
function ROW (line 225) | ROW &ROW::operator=(const ROW &source) {
FILE: src/ccstruct/ocrrow.h
function namespace (line 32) | namespace tesseract {
FILE: src/ccstruct/otsuthr.cpp
type tesseract (line 25) | namespace tesseract {
function OtsuThreshold (line 35) | int OtsuThreshold(Image src_pix, int left, int top, int width, int hei...
function HistogramRect (line 93) | void HistogramRect(Image src_pix, int channel, int left, int top, int ...
function OtsuStats (line 113) | int OtsuStats(const int *histogram, int *H_out, int *omega0_out) {
FILE: src/ccstruct/otsuthr.h
type Pix (line 26) | struct Pix
function namespace (line 28) | namespace tesseract {
FILE: src/ccstruct/pageres.cpp
type Pix (line 44) | struct Pix
type tesseract (line 46) | namespace tesseract {
function StopperAmbigThreshold (line 67) | static double StopperAmbigThreshold(double f1, double f2) {
function WERD_RES (line 186) | WERD_RES &WERD_RES::operator=(const WERD_RES &source) {
function MovePointerData (line 724) | static void MovePointerData(T **dest, T **src) {
function BLOB_CHOICE (line 768) | BLOB_CHOICE *WERD_RES::GetBlobChoice(unsigned index) const {
function BLOB_CHOICE_LIST (line 779) | BLOB_CHOICE_LIST *WERD_RES::GetBlobChoices(int index) const {
function is_simple_quote (line 1024) | static int is_simple_quote(const char *signed_str, int length) {
function UNICHAR_ID (line 1036) | UNICHAR_ID WERD_RES::BothQuotes(UNICHAR_ID id1, UNICHAR_ID id2) {
function UNICHAR_ID (line 1059) | UNICHAR_ID WERD_RES::BothHyphens(UNICHAR_ID id1, UNICHAR_ID id2) {
function UNICHAR_ID (line 1090) | UNICHAR_ID WERD_RES::BothSpaces(UNICHAR_ID id1, UNICHAR_ID id2) {
function WERD_RES (line 1252) | WERD_RES *PAGE_RES_IT::InsertSimpleCloneWord(const WERD_RES &clone_res,
function ComputeBlobEnds (line 1279) | static void ComputeBlobEnds(const WERD_RES &word, const TBOX &clip_box,
function TBOX (line 1308) | static TBOX ComputeWordBounds(const tesseract::PointerVector<WERD_RES>...
function TBOX (line 1354) | static TBOX MoveAndClipBlob(C_BLOB_IT *src_it, C_BLOB_IT *dest_it,
function WERD_RES (line 1548) | WERD_RES *PAGE_RES_IT::start_page(bool empty_ok) {
function WERD_RES (line 1617) | WERD_RES *PAGE_RES_IT::internal_forward(bool new_block, bool empty_ok) {
function WERD_RES (line 1683) | WERD_RES *PAGE_RES_IT::restart_row() {
function WERD_RES (line 1700) | WERD_RES *PAGE_RES_IT::forward_paragraph() {
function WERD_RES (line 1715) | WERD_RES *PAGE_RES_IT::forward_block() {
FILE: src/ccstruct/pageres.h
type Pix (line 43) | struct Pix
function namespace (line 45) | namespace tesseract {
function class (line 118) | class BLOCK_RES : public ELIST<BLOCK_RES>::LINK {
function class (line 142) | class ROW_RES : public ELIST<ROW_RES>::LINK {
type CRUNCH_MODE (line 160) | enum CRUNCH_MODE { CR_NONE, CR_KEEP_SPACE, CR_LOOSE_SPACE, CR_DELETE }
function LINK (line 348) | WERD_RES(const WERD_RES &source) : ELIST<WERD_RES>::LINK(source) {
function PrintBestChoices (line 556) | void PrintBestChoices() const;
function copy_on (line 667) | void copy_on(WERD_RES *word_res) { // from this word
function class (line 682) | class TESS_API PAGE_RES_IT {
FILE: src/ccstruct/params_training_featdef.cpp
type tesseract (line 24) | namespace tesseract {
function ParamsTrainingFeatureByName (line 26) | int ParamsTrainingFeatureByName(const char *name) {
FILE: src/ccstruct/params_training_featdef.h
function namespace (line 26) | namespace tesseract {
function class (line 131) | class ParamsTrainingBundle {
FILE: src/ccstruct/pdblock.cpp
type tesseract (line 32) | namespace tesseract {
function Image (line 137) | Image PDBLK::render_mask(const FCOORD &rerotation, TBOX *mask_box) {
function PDBLK (line 245) | PDBLK &PDBLK::operator=( // assignment
function TDimension (line 353) | TDimension BLOCK_LINE_IT::get_line( // get a line
FILE: src/ccstruct/pdblock.h
type Pix (line 25) | struct Pix
function namespace (line 27) | namespace tesseract {
FILE: src/ccstruct/points.cpp
type tesseract (line 30) | namespace tesseract {
function sign (line 65) | static int sign(int x) {
function FCOORD (line 148) | FCOORD FCOORD::nearest_pt_on_line(const FCOORD &line_point, const FCOO...
FILE: src/ccstruct/points.h
function namespace (line 31) | namespace tesseract {
function ICOORD (line 171) | ICOORDELT(ICOORD icoord) : ICOORD(icoord) {}
function ICOORDELT (line 180) | static ICOORDELT *deep_copy(const ICOORDELT *src) {
function TESS_API (line 189) | TESS_API FCOORD {
function set_x (line 213) | void set_x(float xin) {
function set_y (line 217) | void set_y(float yin) { // value to set
function length (line 227) | float length() const {
function pt_to_pt_dist (line 241) | float pt_to_pt_dist(const FCOORD &pt) const {
function angle (line 246) | float angle() const {
function operator (line 276) | bool operator!=(const FCOORD &other) const {
function ICOORD (line 450) | inline ICOORD operator*( // scalar multiply
function rotate (line 511) | inline void ICOORD::rotate( // rotate by vector
function FCOORD (line 650) | inline FCOORD operator*( // scalar multiply
function rotate (line 712) | inline void FCOORD::rotate( // rotate by vector
function unrotate (line 721) | inline void FCOORD::unrotate(const FCOORD &vec) {
FILE: src/ccstruct/polyaprx.cpp
type tesseract (line 32) | namespace tesseract {
function cutline (line 51) | static void cutline( // recursive refine
function EDGEPT (line 148) | static EDGEPT *edgesteps_to_edgepts( // convert outline
function fix2 (line 245) | static void fix2( // polygonal approx
function EDGEPT (line 433) | static EDGEPT *poly2( // second poly
function TESSLINE (line 529) | TESSLINE *ApproximateOutline(bool allow_detailed_fx, C_OUTLINE *c_outl...
FILE: src/ccstruct/polyaprx.h
function namespace (line 22) | namespace tesseract {
FILE: src/ccstruct/polyblk.cpp
type tesseract (line 33) | namespace tesseract {
function ICOORDELT_LIST (line 335) | ICOORDELT_LIST *PB_LINE_IT::get_line(TDimension y) {
FILE: src/ccstruct/polyblk.h
function namespace (line 28) | namespace tesseract {
FILE: src/ccstruct/quadlsq.cpp
type tesseract (line 26) | namespace tesseract {
FILE: src/ccstruct/quadlsq.h
function namespace (line 24) | namespace tesseract {
FILE: src/ccstruct/quadratc.h
function namespace (line 25) | namespace tesseract {
FILE: src/ccstruct/quspline.cpp
type tesseract (line 33) | namespace tesseract {
function QSPLINE (line 161) | QSPLINE &QSPLINE::operator=( // assignment
FILE: src/ccstruct/quspline.h
type Pix (line 27) | struct Pix
function namespace (line 29) | namespace tesseract {
FILE: src/ccstruct/ratngs.cpp
type tesseract (line 35) | namespace tesseract {
function BLOB_CHOICE (line 131) | BLOB_CHOICE &BLOB_CHOICE::operator=(const BLOB_CHOICE &other) {
function BLOB_CHOICE (line 177) | BLOB_CHOICE *FindMatchingChoice(UNICHAR_ID char_id, BLOB_CHOICE_LIST *...
type ScriptPos (line 193) | enum ScriptPos
function BLOB_CHOICE_LIST (line 274) | BLOB_CHOICE_LIST *WERD_CHOICE::blob_choices(unsigned index, MATRIX *ra...
function MATRIX_COORD (line 286) | MATRIX_COORD WERD_CHOICE::MatrixCoord(unsigned index) const {
function WERD_CHOICE (line 393) | WERD_CHOICE WERD_CHOICE::shallow_copy(unsigned start, unsigned end) co...
function WERD_CHOICE (line 462) | WERD_CHOICE &WERD_CHOICE::operator+=(const WERD_CHOICE &second) {
function WERD_CHOICE (line 499) | WERD_CHOICE &WERD_CHOICE::operator=(const WERD_CHOICE &source) {
function ScriptPos (line 599) | ScriptPos WERD_CHOICE::ScriptPositionOf(bool print_debug, const UNICHA...
function EqualIgnoringCaseAndTerminalPunct (line 773) | bool EqualIgnoringCaseAndTerminalPunct(const WERD_CHOICE &word1, const...
function print_ratings_list (line 804) | void print_ratings_list(const char *msg, BLOB_CHOICE_LIST *ratings,
FILE: src/ccstruct/ratngs.h
function namespace (line 40) | namespace tesseract {
FILE: src/ccstruct/rect.cpp
type tesseract (line 28) | namespace tesseract {
function TBOX (line 84) | TBOX TBOX::intersection( // shared area box
function TBOX (line 128) | TBOX TBOX::bounding_union( // box enclosing both
function TBOX (line 214) | TBOX &operator+=( // bounding bounding bx
function TBOX (line 242) | TBOX &operator&=(TBOX &op1, const TBOX &op2) {
FILE: src/ccstruct/rect.h
function namespace (line 35) | namespace tesseract {
FILE: src/ccstruct/rejctmap.cpp
type tesseract (line 25) | namespace tesseract {
function REJMAP (line 59) | REJMAP &REJMAP::operator=(const REJMAP &source) {
FILE: src/ccstruct/rejctmap.h
function namespace (line 49) | namespace tesseract {
function class (line 310) | class REJMAP {
FILE: src/ccstruct/seam.cpp
type tesseract (line 26) | namespace tesseract {
function TBOX (line 33) | TBOX SEAM::bounding_box() const {
function start_seam_list (line 262) | void start_seam_list(TWERD *word, std::vector<SEAM *> *seam_array) {
FILE: src/ccstruct/seam.h
function namespace (line 29) | namespace tesseract {
function ContainedByBlob (line 80) | bool ContainedByBlob(const TBLOB &blob) const {
function UsesPoint (line 91) | bool UsesPoint(const EDGEPT *point) const {
function SharesPosition (line 100) | bool SharesPosition(const SEAM &other) const {
function OverlappingSplits (line 111) | bool OverlappingSplits(const SEAM &other) const {
function Finalize (line 126) | void Finalize() {
FILE: src/ccstruct/split.cpp
type tesseract (line 31) | namespace tesseract {
function EDGEPT (line 138) | EDGEPT *make_edgept(TDimension x, TDimension y, EDGEPT *next, EDGEPT *...
function remove_edgept (line 199) | void remove_edgept(EDGEPT *point) {
FILE: src/ccstruct/split.h
function namespace (line 26) | namespace tesseract {
FILE: src/ccstruct/statistc.cpp
type tesseract (line 36) | namespace tesseract {
function GatherPeak (line 457) | static bool GatherPeak(int index, const int *src_buckets, int *used_bu...
FILE: src/ccstruct/statistc.h
function namespace (line 26) | namespace tesseract {
FILE: src/ccstruct/stepblob.cpp
type tesseract (line 31) | namespace tesseract {
class DENORM (line 33) | class DENORM
function position_outline (line 44) | static void position_outline( // put in place
function plot_outline_list (line 100) | static void plot_outline_list( // draw outlines
function plot_normed_outline_list (line 121) | static void plot_normed_outline_list(const DENORM &denorm, C_OUTLINE_L...
function reverse_outline_list (line 141) | static void reverse_outline_list(C_OUTLINE_LIST *list) {
function C_BLOB (line 238) | C_BLOB *C_BLOB::FakeBlob(const TBOX &box) {
function TBOX (line 250) | TBOX C_BLOB::bounding_box() const { // bounding box
function RotateOutlineList (line 350) | static void RotateOutlineList(const FCOORD &rotation, C_OUTLINE_LIST *...
function ComputeEdgeOffsetsOutlineList (line 381) | static void ComputeEdgeOffsetsOutlineList(int threshold, Image pix, C_...
function render_outline_list (line 483) | static void render_outline_list(C_OUTLINE_LIST *list, int left, int to...
function render_outline_list_outline (line 494) | static void render_outline_list_outline(C_OUTLINE_LIST *list, int left...
function Image (line 503) | Image C_BLOB::render() {
function Image (line 512) | Image C_BLOB::render_outline() {
FILE: src/ccstruct/stepblob.h
type Pix (line 31) | struct Pix
function namespace (line 33) | namespace tesseract {
FILE: src/ccstruct/werd.cpp
type tesseract (line 30) | namespace tesseract {
function WERD (line 132) | WERD *WERD::ConstructFromSingleBlob(bool bol, bool eol, C_BLOB *blob) {
function TBOX (line 155) | TBOX WERD::bounding_box() const {
function TBOX (line 161) | TBOX WERD::restricted_bounding_box(bool upper_dots, bool lower_dots) c...
function TBOX (line 177) | TBOX WERD::true_bounding_box() const {
function WERD (line 342) | WERD *WERD::shallow_copy() {
function WERD (line 357) | WERD &WERD::operator=(const WERD &source) {
function word_comparator (line 377) | int word_comparator(const WERD *word1, const WERD *word2) {
function WERD (line 393) | WERD *WERD::ConstructWerdWithNewBlobs(C_BLOB_LIST *all_blobs, C_BLOB_L...
FILE: src/ccstruct/werd.h
function namespace (line 28) | namespace tesseract {
function namespace (line 205) | namespace tesseract {
FILE: src/ccutil/ambigs.cpp
type tesseract (line 31) | namespace tesseract {
FILE: src/ccutil/ambigs.h
function namespace (line 36) | namespace tesseract {
FILE: src/ccutil/bitvector.cpp
type tesseract (line 27) | namespace tesseract {
function BitVector (line 74) | BitVector &BitVector::operator=(const BitVector &src) {
FILE: src/ccutil/bitvector.h
function namespace (line 29) | namespace tesseract {
FILE: src/ccutil/ccutil.cpp
type tesseract (line 20) | namespace tesseract {
FILE: src/ccutil/ccutil.h
function namespace (line 41) | namespace tesseract {
FILE: src/ccutil/clst.h
function namespace (line 28) | namespace tesseract {
function add_sorted (line 926) | bool add_sorted(int comparator(const T *, const T *), bool unique, T *ne...
function set_subtract (line 966) | void set_subtract(int comparator(const T *, const T *), bool unique, Con...
FILE: src/ccutil/elst.h
function namespace (line 28) | namespace tesseract {
function class (line 120) | class Iterator {
function T (line 922) | T *First() { // return first
function clear (line 932) | void clear() {
function internal_clear (line 959) | void internal_clear() {
function shallow_copy (line 983) | void shallow_copy( // dangerous!!
function assign_to_sublist (line 1000) | void assign_to_sublist( // to this list
function length (line 1013) | int32_t length() const {
function sort (line 1031) | void sort( // sort elements
function T (line 1071) | T *add_sorted_and_find(int comparator(const T *, const T *), bool unique,
function add_sorted (line 1105) | bool add_sorted(int comparator(const T *, const T *), bool unique, T *ne...
FILE: src/ccutil/elst2.h
function namespace (line 28) | namespace tesseract {
function internal_clear (line 1030) | void internal_clear() {
function shallow_copy (line 1055) | void shallow_copy( // dangerous!!
function length (line 1077) | int32_t length() const {
function sort (line 1094) | void sort( // sort elements
function add_sorted (line 1128) | void add_sorted(int comparator(const T *, const T *), T *new_link) {
FILE: src/ccutil/errcode.cpp
type tesseract (line 28) | namespace tesseract {
FILE: src/ccutil/errcode.h
function namespace (line 24) | namespace tesseract {
FILE: src/ccutil/fileerr.h
function namespace (line 24) | namespace tesseract {
FILE: src/ccutil/genericheap.h
function namespace (line 28) | namespace tesseract {
FILE: src/ccutil/genericvector.h
function namespace (line 33) | namespace tesseract {
function LoadDataFromFile (line 233) | inline bool LoadDataFromFile(const char *filename, GenericVector<char> *...
function SaveDataToFile (line 254) | inline bool SaveDataToFile(const GenericVector<char> &data, const char *...
function Serialize (line 363) | bool Serialize(FILE *fp) const {
function Serialize (line 379) | bool Serialize(TFile *fp) const {
function DeSerialize (line 402) | bool DeSerialize(bool swap, FILE *fp) {
function sort (line 440) | void sort() {
FILE: src/ccutil/helpers.h
function namespace (line 33) | namespace tesseract {
function else (line 274) | else if (size > 0) {
FILE: src/ccutil/host.h
function namespace (line 47) | namespace tesseract {
FILE: src/ccutil/indexmapbidi.cpp
type tesseract (line 23) | namespace tesseract {
FILE: src/ccutil/indexmapbidi.h
function namespace (line 28) | namespace tesseract {
FILE: src/ccutil/kdpair.h
function namespace (line 28) | namespace tesseract {
function set_key (line 131) | void set_key(const Key &new_key) {
function Data (line 134) | const Data *data() const {
function set_data (line 138) | void set_data(Data *new_data) {
function Data (line 143) | Data *extract_data() {
function class (line 194) | class KDVector : public std::vector<IntKDPair> {
FILE: src/ccutil/lsterr.h
function namespace (line 24) | namespace tesseract {
FILE: src/ccutil/object_cache.h
type ReferenceCount (line 112) | struct ReferenceCount {
FILE: src/ccutil/params.cpp
type tesseract (line 34) | namespace tesseract {
FILE: src/ccutil/params.h
function namespace (line 30) | namespace tesseract {
function RemoveParam (line 92) | void RemoveParam(T *param_ptr, std::vector<T *> *vec) {
function class (line 113) | class Param {
function class (line 148) | class IntParam : public Param {
function set_value (line 166) | void set_value(int32_t value) {
function ResetToDefault (line 169) | void ResetToDefault() {
function contains (line 251) | bool contains(char c) const {
function operator (line 257) | bool operator==(const std::string &other) const {
function set_value (line 263) | void set_value(const std::string &value) {
function ResetToDefault (line 266) | void ResetToDefault() {
function ResetFrom (line 269) | void ResetFrom(const ParamsVectors *vec) {
FILE: src/ccutil/qrsequence.h
function class (line 31) | class QRSequenceGenerator {
FILE: src/ccutil/scanutils.cpp
type Flags (line 31) | enum Flags {
type Ranks (line 38) | enum Ranks {
type Ranks (line 47) | enum Ranks
type Ranks (line 48) | enum Ranks
type Ranks (line 50) | enum Ranks
type Ranks (line 51) | enum Ranks
type Ranks (line 52) | enum Ranks
type Bail (line 54) | enum Bail {
function LongBit (line 61) | inline size_t LongBit() {
function SkipSpace (line 65) | static inline int SkipSpace(FILE *s) {
function SetBit (line 74) | static inline void SetBit(unsigned long *bitmap, unsigned int bit) {
function TestBit (line 78) | static inline int TestBit(unsigned long *bitmap, unsigned int bit) {
function DigitValue (line 82) | static inline int DigitValue(int ch, int base) {
function uintmax_t (line 96) | static uintmax_t streamtoumax(FILE *s, int base) {
function streamtofloat (line 140) | static double streamtofloat(FILE *s) {
function tfscanf (line 189) | int tfscanf(FILE *stream, const char *format, ...) {
function tvfscanf (line 200) | static int tvfscanf(FILE *stream, const char *format, va_list ap) {
FILE: src/ccutil/serialis.cpp
type tesseract (line 28) | namespace tesseract {
function LoadDataFromFile (line 32) | bool LoadDataFromFile(const char *filename, std::vector<char> *data) {
function SaveDataToFile (line 53) | bool SaveDataToFile(const std::vector<char> &data, const char *filenam...
FILE: src/ccutil/serialis.h
function namespace (line 30) | namespace tesseract {
function else (line 165) | else if constexpr (std::is_class<T>::value) {
FILE: src/ccutil/sorthelper.h
function SortPairsByCount (line 46) | static int SortPairsByCount(const void *v1, const void *v2) {
function SortPairsByValue (line 52) | static int SortPairsByValue(const void *v1, const void *v2) {
function explicit (line 65) | explicit SortHelper(int sizehint) {
function Add (line 71) | void Add(T value, int count) {
function MaxCount (line 86) | int MaxCount(T *max_value) const {
FILE: src/ccutil/tessdatamanager.cpp
type tesseract (line 40) | namespace tesseract {
FILE: src/ccutil/tessdatamanager.h
function namespace (line 56) | namespace tesseract {
FILE: src/ccutil/tesserrstream.h
function namespace (line 24) | namespace tesseract {
FILE: src/ccutil/tesstypes.h
function namespace (line 26) | namespace tesseract {
FILE: src/ccutil/tprintf.cpp
type tesseract (line 33) | namespace tesseract {
function FILE (line 53) | FILE *get_debugfp() {
FILE: src/ccutil/tprintf.h
function namespace (line 27) | namespace tesseract {
FILE: src/ccutil/unichar.cpp
type tesseract (line 25) | namespace tesseract {
FILE: src/ccutil/unicharcompress.cpp
type tesseract (line 26) | namespace tesseract {
function RadicalPreHash (line 36) | static int RadicalPreHash(const std::vector<int> &rs) {
function DecodeRadicalLine (line 50) | static bool DecodeRadicalLine(std::string &radical_data_line, RSMap *r...
function DecodeRadicalTable (line 79) | static bool DecodeRadicalTable(std::string &radical_data, RSMap *radic...
function UnicharCompress (line 97) | UnicharCompress &UnicharCompress::operator=(const UnicharCompress &src) {
FILE: src/ccutil/unicharcompress.h
function namespace (line 29) | namespace tesseract {
function class (line 139) | class TESS_API UnicharCompress {
FILE: src/ccutil/unicharmap.cpp
type tesseract (line 25) | namespace tesseract {
function UNICHAR_ID (line 36) | UNICHAR_ID UNICHARMAP::unichar_to_id(const char *const unichar_repr, i...
FILE: src/ccutil/unicharmap.h
function namespace (line 25) | namespace tesseract {
FILE: src/ccutil/unicharset.cpp
type tesseract (line 34) | namespace tesseract {
function UNICHAR_ID (line 185) | UNICHAR_ID
function UNICHAR_ID (line 194) | UNICHAR_ID UNICHARSET::unichar_to_id(const char *const unichar_repr,
class LocalFilePointer (line 756) | class LocalFilePointer {
method LocalFilePointer (line 758) | LocalFilePointer(FILE *stream) : fp_(stream) {}
function CHAR_FRAGMENT (line 1103) | CHAR_FRAGMENT *CHAR_FRAGMENT::parse_from_string(const char *string) {
FILE: src/ccutil/unicharset.h
function namespace (line 31) | namespace tesseract {
FILE: src/ccutil/unicity_table.h
function namespace (line 29) | namespace tesseract {
FILE: src/ccutil/universalambigs.h
function namespace (line 23) | namespace tesseract {
FILE: src/classify/adaptive.cpp
type tesseract (line 25) | namespace tesseract {
function AddAdaptedClass (line 41) | void AddAdaptedClass(ADAPT_TEMPLATES_STRUCT *Templates, ADAPT_CLASS_ST...
function ADAPT_CLASS_STRUCT (line 182) | ADAPT_CLASS_STRUCT *ReadAdaptedClass(TFile *fp) {
function ADAPT_TEMPLATES_STRUCT (line 231) | ADAPT_TEMPLATES_STRUCT *Classify::ReadAdaptedTemplates(TFile *fp) {
function PERM_CONFIG_STRUCT (line 258) | PERM_CONFIG_STRUCT *ReadPermConfig(TFile *fp) {
function TEMP_CONFIG_STRUCT (line 281) | TEMP_CONFIG_STRUCT *ReadTempConfig(TFile *fp) {
function WriteAdaptedClass (line 303) | void WriteAdaptedClass(FILE *File, ADAPT_CLASS_STRUCT *Class, int NumC...
function WritePermConfig (line 364) | void WritePermConfig(FILE *File, PERM_CONFIG_STRUCT *Config) {
function WriteTempConfig (line 387) | void WriteTempConfig(FILE *File, TEMP_CONFIG_STRUCT *Config) {
FILE: src/classify/adaptive.h
function namespace (line 25) | namespace tesseract {
FILE: src/classify/adaptmatch.cpp
type tesseract (line 73) | namespace tesseract {
type ADAPT_RESULTS (line 93) | struct ADAPT_RESULTS {
method Initialize (line 104) | inline void Initialize() {
method ComputeBest (line 110) | void ComputeBest() {
type PROTO_KEY (line 124) | struct PROTO_KEY {
function SortDescendingRating (line 131) | static bool SortDescendingRating(const UnicharRating &a, const Unichar...
function MarginalMatch (line 142) | inline bool MarginalMatch(float confidence, float matcher_great_thresh...
function FindScoredUnichar (line 151) | static unsigned FindScoredUnichar(UNICHAR_ID id, const ADAPT_RESULTS &...
function ScoredUnichar (line 162) | static float ScoredUnichar(UNICHAR_ID id, const ADAPT_RESULTS &results) {
function UNICHAR_ID (line 1224) | UNICHAR_ID *Classify::BaselineClassifier(TBLOB *Blob,
function UNICHAR_ID (line 1532) | UNICHAR_ID *Classify::GetAmbiguities(TBLOB *Blob, CLASS_ID CorrectClas...
function PROTO_ID (line 1758) | PROTO_ID Classify::MakeNewTempProtos(FEATURE_SET Features, int NumBadF...
function MakeTempProtoPerm (line 1896) | int MakeTempProtoPerm(void *item1, void *item2) {
FILE: src/classify/blobclass.cpp
type tesseract (line 25) | namespace tesseract {
FILE: src/classify/classify.cpp
type tesseract (line 25) | namespace tesseract {
type tesseract (line 59) | namespace tesseract {
FILE: src/classify/classify.h
function namespace (line 32) | namespace tesseract {
function namespace (line 69) | namespace tesseract {
FILE: src/classify/cluster.cpp
type tesseract (line 33) | namespace tesseract {
type TEMPCLUSTER (line 1257) | struct TEMPCLUSTER {
type STATISTICS (line 1265) | struct STATISTICS {
method STATISTICS (line 1266) | STATISTICS(size_t n) : CoVariance(n * n), Min(n), Max(n) {
type BUCKETS (line 1274) | struct BUCKETS {
method BUCKETS (line 1275) | BUCKETS(size_t n) : NumberOfBuckets(n), Count(n), ExpectedCount(n) {
type CHISTRUCT (line 1289) | struct CHISTRUCT {
method CHISTRUCT (line 1296) | CHISTRUCT(uint16_t degreesOfFreedom, double alpha) : DegreesOfFreedo...
type ClusteringContext (line 1304) | struct ClusteringContext {
function CLUSTERER (line 1440) | CLUSTERER *MakeClusterer(int16_t SampleSize, const PARAM_DESC ParamDes...
function SAMPLE (line 1491) | SAMPLE *MakeSample(CLUSTERER *Clusterer, const float *Feature, uint32_...
function LIST (line 1543) | LIST ClusterSamples(CLUSTERER *Clusterer, CLUSTERCONFIG *Config) {
function FreeClusterer (line 1575) | void FreeClusterer(CLUSTERER *Clusterer) {
function FreeProtoList (line 1597) | void FreeProtoList(LIST *ProtoList) {
function FreePrototype (line 1608) | void FreePrototype(void *arg) { // PROTOTYPE *Prototype)
function CLUSTER (line 1638) | CLUSTER *NextSample(LIST *SearchState) {
function Mean (line 1662) | float Mean(PROTOTYPE *Proto, uint16_t Dimension) {
function StandardDeviation (line 1673) | float StandardDeviation(PROTOTYPE *Proto, uint16_t Dimension) {
function CreateClusterTree (line 1709) | static void CreateClusterTree(CLUSTERER *Clusterer) {
function MakePotentialClusters (line 1771) | static void MakePotentialClusters(ClusteringContext *context, CLUSTER ...
function CLUSTER (line 1832) | static CLUSTER *MakeNewCluster(CLUSTERER *Clusterer, TEMPCLUSTER *Temp...
function MergeClusters (line 1870) | int32_t MergeClusters(int16_t N, PARAM_DESC ParamDesc[], int32_t n1, i...
function ComputePrototypes (line 1908) | static void ComputePrototypes(CLUSTERER *Clusterer, CLUSTERCONFIG *Con...
function PROTOTYPE (line 1951) | static PROTOTYPE *MakePrototype(CLUSTERER *Clusterer, CLUSTERCONFIG *C...
function PROTOTYPE (line 2036) | static PROTOTYPE *MakeDegenerateProto( // this was MinSample
function PROTOTYPE (line 2075) | static PROTOTYPE *TestEllipticalProto(CLUSTERER *Clusterer, CLUSTERCON...
function PROTOTYPE (line 2179) | static PROTOTYPE *MakeSphericalProto(CLUSTERER *Clusterer, CLUSTER *Cl...
function PROTOTYPE (line 2214) | static PROTOTYPE *MakeEllipticalProto(CLUSTERER *Clusterer, CLUSTER *C...
function PROTOTYPE (line 2253) | static PROTOTYPE *MakeMixedProto(CLUSTERER *Clusterer, CLUSTER *Cluste...
function MakeDimRandom (line 2311) | static void MakeDimRandom(uint16_t i, PROTOTYPE *Proto, PARAM_DESC *Pa...
function MakeDimUniform (line 2332) | static void MakeDimUniform(uint16_t i, PROTOTYPE *Proto, STATISTICS *S...
function STATISTICS (line 2363) | static STATISTICS *ComputeStatistics(int16_t N, PARAM_DESC ParamDesc[]...
method STATISTICS (line 1266) | STATISTICS(size_t n) : CoVariance(n * n), Min(n), Max(n) {
function PROTOTYPE (line 2440) | static PROTOTYPE *NewSphericalProto(uint16_t N, CLUSTER *Cluster, STAT...
function PROTOTYPE (line 2469) | static PROTOTYPE *NewEllipticalProto(int16_t N, CLUSTER *Cluster, STAT...
function PROTOTYPE (line 2508) | static PROTOTYPE *NewMixedProto(int16_t N, CLUSTER *Cluster, STATISTIC...
function PROTOTYPE (line 2524) | static PROTOTYPE *NewSimpleProto(int16_t N, CLUSTER *Cluster) {
function Independent (line 2555) | static bool Independent(PARAM_DESC *ParamDesc, int16_t N, float *CoVar...
function BUCKETS (line 2602) | static BUCKETS *GetBuckets(CLUSTERER *clusterer, DISTRIBUTION Distribu...
method BUCKETS (line 1275) | BUCKETS(size_t n) : NumberOfBuckets(n), Count(n), ExpectedCount(n) {
function BUCKETS (line 2643) | static BUCKETS *MakeBuckets(DISTRIBUTION Distribution, uint32_t Sample...
method BUCKETS (line 1275) | BUCKETS(size_t n) : NumberOfBuckets(n), Count(n), ExpectedCount(n) {
function OptimumNumberOfBuckets (line 2725) | static uint16_t OptimumNumberOfBuckets(uint32_t SampleCount) {
function NormalDensity (line 2806) | static double NormalDensity(int32_t x) {
function UniformDensity (line 2820) | static double UniformDensity(int32_t x) {
function Integral (line 2838) | static double Integral(double f1, double f2, double Dx) {
function FillBuckets (line 2862) | static void FillBuckets(BUCKETS *Buckets, CLUSTER *Cluster, uint16_t D...
function NormalBucket (line 2928) | static uint16_t NormalBucket(PARAM_DESC *ParamDesc, float x, float Mea...
function UniformBucket (line 2961) | static uint16_t UniformBucket(PARAM_DESC *ParamDesc, float x, float Me...
function DistributionOK (line 2993) | static bool DistributionOK(BUCKETS *Buckets) {
function DegreesOfFreedom (line 3025) | static uint16_t DegreesOfFreedom(DISTRIBUTION Distribution, uint16_t H...
function AdjustBuckets (line 3045) | static void AdjustBuckets(BUCKETS *Buckets, uint32_t NewSampleCount) {
function InitBuckets (line 3065) | static void InitBuckets(BUCKETS *Buckets) {
function AlphaMatch (line 3086) | static int AlphaMatch(void *arg1, // CHISTRUCT *ChiStruct,
function ChiArea (line 3172) | static double ChiArea(CHISTRUCT *ChiParams, double x) {
function InvertMatrix (line 3265) | static double InvertMatrix(const float *input, int size, float *inv) {
FILE: src/classify/cluster.h
function namespace (line 24) | namespace tesseract {
type PROTOSTYLE (line 53) | typedef enum { spherical, elliptical, mixed, automatic } PROTOSTYLE;
type CLUSTERCONFIG (line 55) | struct CLUSTERCONFIG { // parameters to control clustering
type DISTRIBUTION (line 65) | typedef enum { normal, uniform, D_random, DISTRIBUTION_COUNT } DISTRIBUT...
type PROTOTYPE (line 72) | struct PROTOTYPE {
type CLUSTERER (line 91) | struct CLUSTERER {
type SAMPLELIST (line 103) | struct SAMPLELIST {
FILE: src/classify/clusttool.cpp
type tesseract (line 26) | namespace tesseract {
function ReadNFloats (line 45) | static bool ReadNFloats(TFile *fp, uint16_t N, float Buffer[]) {
function WriteNFloats (line 75) | static void WriteNFloats(FILE *File, uint16_t N, float Array[]) {
function WriteProtoStyle (line 89) | static void WriteProtoStyle(FILE *File, PROTOSTYLE ProtoStyle) {
function ReadSampleSize (line 114) | uint16_t ReadSampleSize(TFile *fp) {
function PARAM_DESC (line 134) | PARAM_DESC *ReadParamDesc(TFile *fp, uint16_t N) {
function PROTOTYPE (line 168) | PROTOTYPE *ReadPrototype(TFile *fp, uint16_t N) {
function WriteParamDesc (line 244) | void WriteParamDesc(FILE *File, uint16_t N, const PARAM_DESC ParamDesc...
function WritePrototype (line 271) | void WritePrototype(FILE *File, uint16_t N, PROTOTYPE *Proto) {
FILE: src/classify/clusttool.h
function namespace (line 27) | namespace tesseract {
FILE: src/classify/cutoffs.cpp
type tesseract (line 32) | namespace tesseract {
FILE: src/classify/featdefs.cpp
type tesseract (line 26) | namespace tesseract {
function InitFeatureDefs (line 87) | void InitFeatureDefs(FEATURE_DEFS_STRUCT *featuredefs) {
function WriteCharDescription (line 109) | void WriteCharDescription(const FEATURE_DEFS_STRUCT &FeatureDefs, CHAR...
function ValidCharDescription (line 131) | bool ValidCharDescription(const FEATURE_DEFS_STRUCT &FeatureDefs, CHAR...
function CHAR_DESC_STRUCT (line 172) | CHAR_DESC_STRUCT *ReadCharDescription(const FEATURE_DEFS_STRUCT &Featu...
function ShortNameToFeatureType (line 203) | uint32_t ShortNameToFeatureType(const FEATURE_DEFS_STRUCT &FeatureDefs...
FILE: src/classify/featdefs.h
function namespace (line 26) | namespace tesseract {
FILE: src/classify/float2int.cpp
type tesseract (line 30) | namespace tesseract {
FILE: src/classify/fpoint.cpp
function DistanceBetween (line 29) | float DistanceBetween(FPOINT A, FPOINT B) {
function NormalizedAngleFrom (line 44) | float NormalizedAngleFrom(FPOINT *Point1, FPOINT *Point2, float FullScal...
FILE: src/classify/fpoint.h
type FPOINT (line 29) | struct FPOINT {
FILE: src/classify/intfeaturespace.cpp
type tesseract (line 24) | namespace tesseract {
function INT_FEATURE_STRUCT (line 51) | INT_FEATURE_STRUCT IntFeatureSpace::PositionFromIndex(int index) const {
function INT_FEATURE_STRUCT (line 114) | INT_FEATURE_STRUCT IntFeatureSpace::PositionFromBuckets(int x, int y, ...
FILE: src/classify/intfeaturespace.h
function namespace (line 30) | namespace tesseract {
FILE: src/classify/intfx.cpp
type tesseract (line 39) | namespace tesseract {
function InitIntegerFX (line 54) | void InitIntegerFX() {
function FCOORD (line 70) | FCOORD FeatureDirection(uint8_t theta) {
function TrainingSample (line 79) | TrainingSample *BlobToTrainingSample(const TBLOB &blob, bool nonlinear...
function NormalizeDirection (line 164) | static uint8_t NormalizeDirection(uint8_t dir, const FCOORD &unnormed_...
function FCOORD (line 180) | static FCOORD MeanDirectionVector(const LLSQ &point_diffs, const LLSQ ...
function ComputeFeatures (line 231) | static int ComputeFeatures(const FCOORD &start_pt, const FCOORD &end_p...
function GatherPoints (line 271) | static int GatherPoints(const C_OUTLINE *outline, double feature_lengt...
function ExtractFeaturesFromRun (line 325) | static void ExtractFeaturesFromRun(const EDGEPT *startpt, const EDGEPT...
FILE: src/classify/intfx.h
function namespace (line 27) | namespace tesseract {
FILE: src/classify/intmatcher.cpp
type tesseract (line 36) | namespace tesseract {
function HeapSort (line 86) | static void HeapSort(int n, int ra[], int rb[]) {
class ClassPruner (line 132) | class ClassPruner {
method ClassPruner (line 134) | ClassPruner(int max_classes) {
method ComputeScores (line 165) | void ComputeScores(const INT_TEMPLATES_STRUCT *int_templates, int nu...
method AdjustForExpectedNumFeatures (line 235) | void AdjustForExpectedNumFeatures(const uint16_t *expected_num_featu...
method DisableDisabledClasses (line 247) | void DisableDisabledClasses(const UNICHARSET &unicharset) {
method DisableFragments (line 256) | void DisableFragments(const UNICHARSET &unicharset) {
method NormalizeForXheight (line 270) | void NormalizeForXheight(int norm_multiplier, const uint8_t *normali...
method NoNormalization (line 278) | void NoNormalization() {
method PruneAndSort (line 287) | void PruneAndSort(int pruning_factor, int keep_this, bool max_of_non...
method DebugMatch (line 324) | void DebugMatch(const Classify &classify, const INT_TEMPLATES_STRUCT...
method SummarizeResult (line 357) | void SummarizeResult(const Classify &classify, const INT_TEMPLATES_S...
method SetupResults (line 374) | int SetupResults(std::vector<CP_RESULT_STRUCT> *results) const {
function IMDebugConfiguration (line 709) | static void IMDebugConfiguration(int FeatureNum, uint16_t ActualProtoN...
function IMDebugConfigurationSum (line 727) | static void IMDebugConfigurationSum(int FeatureNum, uint8_t *FeatureEv...
FILE: src/classify/intmatcher.h
function namespace (line 23) | namespace tesseract {
FILE: src/classify/intproto.cpp
type tesseract (line 47) | namespace tesseract {
type FILL_SWITCH (line 72) | struct FILL_SWITCH {
type TABLE_FILLER (line 79) | struct TABLE_FILLER {
type FILL_SPEC (line 88) | struct FILL_SPEC {
function TruncateParam (line 180) | static int TruncateParam(float Param, int Min, int Max) {
function AddIntClass (line 220) | void AddIntClass(INT_TEMPLATES_STRUCT *Templates, CLASS_ID ClassId, IN...
function AddIntConfig (line 250) | int AddIntConfig(INT_CLASS_STRUCT *Class) {
function AddIntProto (line 270) | int AddIntProto(INT_CLASS_STRUCT *Class) {
function AddProtoToProtoPruner (line 344) | void AddProtoToProtoPruner(PROTO_STRUCT *Proto, int ProtoId, INT_CLASS...
function Bucket8For (line 385) | uint8_t Bucket8For(float param, float offset, int num_buckets) {
function Bucket16For (line 389) | uint16_t Bucket16For(float param, float offset, int num_buckets) {
function CircBucketFor (line 399) | uint8_t CircBucketFor(float param, float offset, int num_buckets) {
function UpdateMatchDisplay (line 413) | void UpdateMatchDisplay() {
function ConvertConfig (line 430) | void ConvertConfig(BIT_VECTOR Config, int ConfigId, INT_CLASS_STRUCT *...
function INT_TEMPLATES_STRUCT (line 490) | INT_TEMPLATES_STRUCT *Classify::CreateIntTemplates(CLASSES FloatProtos,
function DisplayIntFeature (line 543) | void DisplayIntFeature(const INT_FEATURE_STRUCT *Feature, float Eviden...
function DisplayIntProto (line 561) | void DisplayIntProto(INT_CLASS_STRUCT *Class, PROTO_ID ProtoId, float ...
function INT_TEMPLATES_STRUCT (line 629) | INT_TEMPLATES_STRUCT *Classify::ReadIntTemplates(TFile *fp) {
function ClearFeatureSpaceWindow (line 889) | void ClearFeatureSpaceWindow(NORM_METHOD norm_method, ScrollView *wind...
function BucketStart (line 991) | float BucketStart(int Bucket, float Offset, int NumBuckets) {
function BucketEnd (line 1007) | float BucketEnd(int Bucket, float Offset, int NumBuckets) {
function DoFill (line 1021) | void DoFill(FILL_SPEC *FillSpec, CLASS_PRUNER_STRUCT *Pruner, uint32_t...
function FillerDone (line 1063) | bool FillerDone(TABLE_FILLER *Filler) {
function FillPPCircularBits (line 1085) | void FillPPCircularBits(uint32_t ParamTable[NUM_PP_BUCKETS][WERDS_PER_...
function FillPPLinearBits (line 1130) | void FillPPLinearBits(uint32_t ParamTable[NUM_PP_BUCKETS][WERDS_PER_PP...
function CLASS_ID (line 1165) | CLASS_ID Classify::GetClassToDebug(const char *Prompt, bool *adaptive_...
function GetCPPadsForLevel (line 1235) | void GetCPPadsForLevel(int Level, float *EndPad, float *SidePad, float...
function GetMatchColorFor (line 1272) | ScrollView::Color GetMatchColorFor(float Evidence) {
function GetNextFill (line 1295) | void GetNextFill(TABLE_FILLER *Filler, FILL_SPEC *Fill) {
function RenderIntFeature (line 1500) | void RenderIntFeature(ScrollView *window, const INT_FEATURE_STRUCT *Fe...
function RenderIntProto (line 1534) | void RenderIntProto(ScrollView *window, INT_CLASS_STRUCT *Class, PROTO...
function InitIntMatchWindowIfReqd (line 1587) | void InitIntMatchWindowIfReqd() {
function InitProtoDisplayWindowIfReqd (line 1604) | void InitProtoDisplayWindowIfReqd() {
function InitFeatureDisplayWindowIfReqd (line 1614) | void InitFeatureDisplayWindowIfReqd() {
function ScrollView (line 1622) | ScrollView *CreateFeatureSpaceWindow(const char *name, int xpos, int y...
FILE: src/classify/intproto.h
function namespace (line 30) | namespace tesseract {
type INT_FEATURE_STRUCT (line 137) | typedef INT_FEATURE_STRUCT INT_FEATURE_ARRAY[MAX_NUM_INT_FEATURES];
type IntmatcherDebugAction (line 139) | enum IntmatcherDebugAction { IDA_ADAPTIVE, IDA_STATIC, IDA_SHAPE_INDEX, ...
FILE: src/classify/kdtree.cpp
type tesseract (line 28) | namespace tesseract {
function NextLevel (line 40) | static int NextLevel(KDTREE *tree, int level) {
class MinK (line 53) | class MinK {
type Element (line 58) | struct Element {
method Element (line 59) | Element() = default;
method Element (line 60) | Element(const Key &k, const Value &v) : key(k), value(v) {}
method elements_count (line 69) | int elements_count() {
method Element (line 72) | const Element *elements() {
method Element (line 59) | Element() = default;
method Element (line 60) | Element(const Key &k, const Value &v) : key(k), value(v) {}
function Key (line 96) | const Key &MinK<Key, Value>::max_insertable_key() {
class KDTreeSearch (line 128) | class KDTreeSearch {
function KDTREE (line 186) | KDTREE *MakeKDTree(int16_t KeySize, const PARAM_DESC KeyDesc[]) {
function KDStore (line 215) | void KDStore(KDTREE *Tree, float *Key, CLUSTER *Data) {
function KDDelete (line 252) | void KDDelete(KDTREE *Tree, float Key[], void *Data) {
function KDNearestNeighborSearch (line 305) | void KDNearestNeighborSearch(KDTREE *Tree, float Query[], int QuerySiz...
function KDWalk (line 313) | void KDWalk(KDTREE *Tree, kdwalk_proc action, ClusteringContext *conte...
function DistanceSquared (line 378) | float DistanceSquared(int k, PARAM_DESC *dim, float p1[], float p2[]) {
function ComputeDistance (line 400) | float ComputeDistance(int k, PARAM_DESC *dim, float p1[], float p2[]) {
function Walk (line 466) | void Walk(KDTREE *tree, kdwalk_proc action, ClusteringContext *context...
function InsertNodes (line 477) | void InsertNodes(KDTREE *tree, KDNODE *nodes) {
FILE: src/classify/kdtree.h
function namespace (line 23) | namespace tesseract {
function KDNODE (line 85) | inline KDNODE::KDNODE(KDTREE *tree, float key[], CLUSTER *data, int Inde...
FILE: src/classify/mf.cpp
type tesseract (line 28) | namespace tesseract {
function FEATURE_SET (line 41) | FEATURE_SET ExtractMicros(TBLOB *Blob, const DENORM &cn_denorm) {
FILE: src/classify/mf.h
function namespace (line 24) | namespace tesseract {
FILE: src/classify/mfdefs.h
function MicroFeatureParameter (line 25) | enum class MicroFeatureParameter {
FILE: src/classify/mfoutline.cpp
type tesseract (line 29) | namespace tesseract {
function LIST (line 34) | LIST ConvertBlob(TBLOB *blob) {
function MFOUTLINE (line 41) | MFOUTLINE ConvertOutline(TESSLINE *outline) {
function LIST (line 79) | LIST ConvertOutlines(TESSLINE *outline, LIST mf_outlines, OUTLINETYPE ...
function FindDirectionChanges (line 104) | void FindDirectionChanges(MFOUTLINE Outline, float MinSlope, float Max...
function FreeMFOutline (line 132) | void FreeMFOutline(void *arg) { // MFOUTLINE Outline)
function FreeOutlines (line 151) | void FreeOutlines(LIST Outlines) {
function MarkDirectionChanges (line 166) | void MarkDirectionChanges(MFOUTLINE Outline) {
function MFOUTLINE (line 196) | MFOUTLINE NextExtremity(MFOUTLINE EdgePoint) {
function NormalizeOutline (line 218) | void NormalizeOutline(MFOUTLINE Outline, float XOrigin) {
function ChangeDirection (line 280) | void ChangeDirection(MFOUTLINE Start, MFOUTLINE End, DIRECTION Direction) {
function CharNormalizeOutline (line 298) | void CharNormalizeOutline(MFOUTLINE Outline, const DENORM &cn_denorm) {
function ComputeDirection (line 335) | void ComputeDirection(MFEDGEPT *Start, MFEDGEPT *Finish, float MinSlope,...
function MFOUTLINE (line 402) | MFOUTLINE NextDirectionChange(MFOUTLINE EdgePoint) {
FILE: src/classify/mfoutline.h
function namespace (line 26) | namespace tesseract {
type OUTLINETYPE (line 51) | enum OUTLINETYPE { outer, hole }
type NORM_METHOD (line 53) | enum NORM_METHOD { baseline, character }
function DegenerateOutline (line 65) | static inline bool DegenerateOutline(MFOUTLINE Outline) {
function MFEDGEPT (line 69) | static inline MFEDGEPT *PointAt(MFOUTLINE Outline) {
function MFOUTLINE (line 73) | static inline MFOUTLINE NextPointAfter(MFOUTLINE Outline) {
function MakeOutlineCircular (line 77) | static inline void MakeOutlineCircular(MFOUTLINE Outline) {
FILE: src/classify/mfx.cpp
type tesseract (line 27) | namespace tesseract {
function MICROFEATURES (line 54) | MICROFEATURES BlobMicroFeatures(TBLOB *Blob, const DENORM &cn_denorm) {
function MICROFEATURES (line 91) | MICROFEATURES ConvertToMicroFeatures(MFOUTLINE Outline, MICROFEATURES ...
function MicroFeature (line 127) | MicroFeature ExtractMicroFeature(MFOUTLINE Start, MFOUTLINE End) {
FILE: src/classify/mfx.h
function namespace (line 24) | namespace tesseract {
FILE: src/classify/normfeat.cpp
type tesseract (line 24) | namespace tesseract {
function ActualOutlineLength (line 27) | float ActualOutlineLength(FEATURE Feature) {
function FEATURE_SET (line 56) | FEATURE_SET ExtractCharNormFeatures(const INT_FX_RESULT_STRUCT &fx_inf...
FILE: src/classify/normfeat.h
function namespace (line 24) | namespace tesseract {
FILE: src/classify/normmatch.cpp
type tesseract (line 33) | namespace tesseract {
type NORM_PROTOS (line 35) | struct NORM_PROTOS {
method NORM_PROTOS (line 36) | NORM_PROTOS(size_t n) : NumProtos(n), Protos(n) {
function NormEvidenceOf (line 55) | static float NormEvidenceOf(float NormAdj) {
function iterate (line 119) | iterate(Protos) {
function NORM_PROTOS (line 174) | NORM_PROTOS *Classify::ReadNormProtos(TFile *fp) {
method NORM_PROTOS (line 36) | NORM_PROTOS(size_t n) : NumProtos(n), Protos(n) {
FILE: src/classify/normmatch.h
function namespace (line 25) | namespace tesseract {
FILE: src/classify/ocrfeatures.cpp
type tesseract (line 26) | namespace tesseract {
function AddFeature (line 40) | bool AddFeature(FEATURE_SET FeatureSet, FEATURE Feature) {
function FEATURE (line 61) | static FEATURE ReadFeature(FILE *File, const FEATURE_DESC_STRUCT *Feat...
function FEATURE_SET (line 82) | FEATURE_SET ReadFeatureSet(FILE *File, const FEATURE_DESC_STRUCT *Feat...
function WriteFeature (line 105) | static void WriteFeature(FEATURE Feature, std::string &str) {
function WriteFeatureSet (line 129) | void WriteFeatureSet(FEATURE_SET FeatureSet, std::string &str) {
FILE: src/classify/ocrfeatures.h
function namespace (line 26) | namespace tesseract {
FILE: src/classify/outfeat.cpp
type tesseract (line 27) | namespace tesseract {
function FEATURE_SET (line 40) | FEATURE_SET Classify::ExtractOutlineFeatures(TBLOB *Blob) {
function AddOutlineFeatureToSet (line 78) | void AddOutlineFeatureToSet(FPOINT *Start, FPOINT *End, FEATURE_SET Fe...
function ConvertToOutlineFeatures (line 97) | void ConvertToOutlineFeatures(MFOUTLINE Outline, FEATURE_SET FeatureSe...
function NormalizeOutlineX (line 134) | void NormalizeOutlineX(FEATURE_SET FeatureSet) {
FILE: src/classify/outfeat.h
function namespace (line 25) | namespace tesseract {
FILE: src/classify/picofeat.cpp
type tesseract (line 31) | namespace tesseract {
function FEATURE_SET (line 60) | FEATURE_SET Classify::ExtractPicoFeatures(TBLOB *Blob) {
function ConvertSegmentToPicoFeat (line 95) | void ConvertSegmentToPicoFeat(FPOINT *Start, FPOINT *End, FEATURE_SET ...
function ConvertToPicoFeatures2 (line 144) | void ConvertToPicoFeatures2(MFOUTLINE Outline, FEATURE_SET FeatureSet) {
function NormalizePicoX (line 181) | void NormalizePicoX(FEATURE_SET FeatureSet) {
function FEATURE_SET (line 204) | FEATURE_SET Classify::ExtractIntCNFeatures(const TBLOB &blob, const IN...
function FEATURE_SET (line 234) | FEATURE_SET Classify::ExtractIntGeoFeatures(const TBLOB &blob,
FILE: src/classify/picofeat.h
function namespace (line 25) | namespace tesseract {
FILE: src/classify/protos.cpp
type tesseract (line 32) | namespace tesseract {
function AddConfigToClass (line 48) | int AddConfigToClass(CLASS_TYPE Class) {
function AddProtoToClass (line 81) | int AddProtoToClass(CLASS_TYPE Class) {
function FillABC (line 102) | void FillABC(PROTO_STRUCT *Proto) {
function FreeClass (line 118) | void FreeClass(CLASS_TYPE Class) {
function FreeClassFields (line 130) | void FreeClassFields(CLASS_TYPE Class) {
function CLASS_TYPE (line 144) | CLASS_TYPE NewClass(int NumProtos, int NumConfigs) {
FILE: src/classify/protos.h
function namespace (line 28) | namespace tesseract {
FILE: src/classify/shapeclassifier.cpp
type tesseract (line 36) | namespace tesseract {
function UNICHARSET (line 86) | const UNICHARSET &ShapeClassifier::GetUnicharset() const {
FILE: src/classify/shapeclassifier.h
type Pix (line 29) | struct Pix
function namespace (line 31) | namespace tesseract {
FILE: src/classify/shapetable.cpp
type tesseract (line 32) | namespace tesseract {
FILE: src/classify/shapetable.h
function namespace (line 31) | namespace tesseract {
FILE: src/classify/tessclassifier.cpp
type tesseract (line 24) | namespace tesseract {
function ShapeTable (line 51) | const ShapeTable *TessClassifier::GetShapeTable() const {
function UNICHARSET (line 56) | const UNICHARSET &TessClassifier::GetUnicharset() const {
FILE: src/classify/tessclassifier.h
function namespace (line 26) | namespace tesseract {
FILE: src/classify/trainingsample.cpp
type tesseract (line 33) | namespace tesseract {
function TrainingSample (line 91) | TrainingSample *TrainingSample::DeSerializeCreate(bool swap, FILE *fp) {
function TrainingSample (line 158) | TrainingSample *TrainingSample::CopyFromFeatures(const INT_FX_RESULT_S...
function FEATURE_STRUCT (line 183) | FEATURE_STRUCT *TrainingSample::GetCNFeature() const {
function TrainingSample (line 194) | TrainingSample *TrainingSample::RandomizedCopy(int index) const {
function TrainingSample (line 213) | TrainingSample *TrainingSample::Copy() const {
function Image (line 306) | Image TrainingSample::RenderToPix(const UNICHARSET *unicharset) const {
function Image (line 342) | Image TrainingSample::GetSamplePix(int padding, Image page_pix) const {
FILE: src/classify/trainingsample.h
type Pix (line 30) | struct Pix
function namespace (line 32) | namespace tesseract {
FILE: src/cutil/bitvec.h
function zero_all_bits (line 37) | static inline void zero_all_bits(BIT_VECTOR array, size_t length) {
function set_all_bits (line 43) | static inline void set_all_bits(BIT_VECTOR array, size_t length) {
function copy_all_bits (line 49) | static inline void copy_all_bits(BIT_VECTOR source, BIT_VECTOR dest, siz...
function WordsInVectorOfSize (line 61) | static inline size_t WordsInVectorOfSize(size_t NumBits) {
function FreeBitVector (line 71) | static inline void FreeBitVector(BIT_VECTOR BitVector) {
function BIT_VECTOR (line 84) | static inline BIT_VECTOR NewBitVector(size_t NumBits) {
FILE: src/cutil/oldlist.cpp
type tesseract (line 64) | namespace tesseract {
function is_same (line 76) | static int is_same(void *item1, void *item2) {
function LIST (line 88) | LIST delete_d(LIST list, void *key, int_compare is_equal) {
function LIST (line 121) | LIST destroy(LIST list) {
function destroy_nodes (line 137) | void destroy_nodes(LIST list, void_dest destructor) {
function LIST (line 153) | LIST last(LIST var_list) {
function LIST (line 166) | LIST pop(LIST list) {
function LIST (line 178) | LIST push(LIST list, void *element) {
function LIST (line 192) | LIST push_last(LIST list, void *item) {
function LIST (line 211) | LIST search(LIST list, void *key, int_compare is_equal) {
FILE: src/cutil/oldlist.h
function namespace (line 69) | namespace tesseract {
FILE: src/dict/context.cpp
type tesseract (line 23) | namespace tesseract {
FILE: src/dict/dawg.cpp
type tesseract (line 34) | namespace tesseract {
function CallWithUTF8 (line 112) | static void CallWithUTF8(const std::function<void(const char *)> &cb,
function EDGE_REF (line 198) | EDGE_REF SquishedDawg::edge_char_of(NODE_REF node, UNICHAR_ID unichar_id,
FILE: src/dict/dawg.h
function namespace (line 43) | namespace tesseract {
type DawgPosition (line 355) | struct DawgPosition {
function class (line 378) | class DawgPositionVector : public std::vector<DawgPosition> {
function Load (line 436) | bool Load(TFile *fp) {
function NumEdges (line 444) | int NumEdges() {
function unichar_ids_of (line 454) | void unichar_ids_of(NODE_REF node, NodeChildVector *vec,
function NODE_REF (line 470) | NODE_REF next_node(EDGE_REF edge) const override {
function end_of_word (line 476) | bool end_of_word(EDGE_REF edge_ref) const override {
function UNICHAR_ID (line 481) | UNICHAR_ID edge_letter(EDGE_REF edge_ref) const override {
function write_squished_dawg (line 494) | bool write_squished_dawg(const char *filename) {
function set_empty_edge (line 514) | inline void set_empty_edge(EDGE_REF edge_ref) {
function clear_all_edges (line 518) | inline void clear_all_edges() {
function clear_marker_flag (line 524) | inline void clear_marker_flag(EDGE_REF edge_ref) {
function forward_edge (line 528) | inline bool forward_edge(EDGE_REF edge_ref) const {
function backward_edge (line 533) | inline bool backward_edge(EDGE_REF edge_ref) const {
function edge_occupied (line 538) | inline bool edge_occupied(EDGE_REF edge_ref) const {
function last_edge (line 542) | inline bool last_edge(EDGE_REF edge_ref) const {
function print_all (line 556) | void print_all(const char *msg) {
FILE: src/dict/dawg_cache.cpp
type tesseract (line 25) | namespace tesseract {
type DawgLoader (line 27) | struct DawgLoader {
method DawgLoader (line 28) | DawgLoader(const std::string &lang, TessdataType tessdata_dawg_type,...
function Dawg (line 43) | Dawg *DawgCache::GetSquishedDawg(const std::string &lang, TessdataType...
function Dawg (line 51) | Dawg *DawgLoader::Load() {
FILE: src/dict/dawg_cache.h
function namespace (line 27) | namespace tesseract {
FILE: src/dict/dict.cpp
type tesseract (line 26) | namespace tesseract {
class Image (line 28) | class Image
function DawgCache (line 173) | DawgCache *Dict::GlobalDawgCache() {
FILE: src/dict/dict.h
function namespace (line 39) | namespace tesseract {
FILE: src/dict/hyphen.cpp
type tesseract (line 22) | namespace tesseract {
FILE: src/dict/matchdefs.h
function namespace (line 26) | namespace tesseract {
FILE: src/dict/permdawg.cpp
type tesseract (line 35) | namespace tesseract {
function WERD_CHOICE (line 159) | WERD_CHOICE *Dict::dawg_permute_and_select(const BLOB_CHOICE_LIST_VECT...
FILE: src/dict/stopper.cpp
type tesseract (line 40) | namespace tesseract {
FILE: src/dict/trie.cpp
type tesseract (line 30) | namespace tesseract {
function NODE_REF (line 267) | NODE_REF Trie::new_dawg_node() {
function UNICHAR_ID (line 372) | UNICHAR_ID Trie::character_class_to_pattern(char ch) {
function SquishedDawg (line 508) | SquishedDawg *Trie::trie_to_dawg() {
FILE: src/dict/trie.h
function namespace (line 24) | namespace tesseract {
function EDGE_REF (line 95) | EDGE_REF edge_char_of(NODE_REF node_ref, UNICHAR_ID unichar_id, bool wor...
function unichar_ids_of (line 109) | void unichar_ids_of(NODE_REF node, NodeChildVector *vec, bool word_end) ...
FILE: src/lstm/convolve.cpp
type tesseract (line 29) | namespace tesseract {
FILE: src/lstm/convolve.h
function namespace (line 26) | namespace tesseract {
FILE: src/lstm/fullyconnected.cpp
function StaticShape (line 47) | StaticShape FullyConnected::OutputShape(const StaticShape &input_shape) ...
FILE: src/lstm/fullyconnected.h
function namespace (line 25) | namespace tesseract {
FILE: src/lstm/functions.cpp
type tesseract (line 3) | namespace tesseract {
FILE: src/lstm/functions.h
function namespace (line 32) | namespace tesseract {
type Relu (line 101) | struct Relu {
type ReluPrime (line 109) | struct ReluPrime {
type GFunc (line 114) | struct GFunc {
type GPrime (line 119) | struct GPrime {
function if (line 124) | struct ClipGFunc {
type HFunc (line 140) | struct HFunc {
type HPrime (line 145) | struct HPrime {
type UnityFunc (line 151) | struct UnityFunc {
type IdentityFunc (line 156) | struct IdentityFunc {
function FuncInplace (line 164) | void FuncInplace(int n, TFloat *inout) {
function FuncMultiply (line 173) | void FuncMultiply(const TFloat *u, const TFloat *v, int n, TFloat *out) {
function SoftmaxInPlace (line 181) | void SoftmaxInPlace(int n, T *inout) {
function CopyVector (line 210) | inline void CopyVector(unsigned n, const TFloat *src, TFloat *dest) {
function AccumulateVector (line 215) | inline void AccumulateVector(int n, const TFloat *src, TFloat *dest) {
function MultiplyVectorsInPlace (line 222) | inline void MultiplyVectorsInPlace(int n, const TFloat *src, TFloat *ino...
function MultiplyAccumulate (line 229) | inline void MultiplyAccumulate(int n, const TFloat *u, const TFloat *v, ...
function SumVectors (line 236) | inline void SumVectors(int n, const TFloat *v1, const TFloat *v2, const ...
function ZeroVector (line 245) | void ZeroVector(unsigned n, T *vec) {
function ClipVector (line 251) | void ClipVector(int n, T lower, T upper, T *vec) {
function CodeInBinary (line 259) | inline void CodeInBinary(int n, int nf, TFloat *vec) {
FILE: src/lstm/input.cpp
type tesseract (line 25) | namespace tesseract {
function Image (line 81) | Image Input::PrepareLSTMInputs(const ImageData &image_data, const Netw...
FILE: src/lstm/input.h
function namespace (line 23) | namespace tesseract {
FILE: src/lstm/lstm.cpp
type tesseract (line 67) | namespace tesseract {
function ceil_log2 (line 76) | static inline uint32_t ceil_log2(uint32_t n) {
function StaticShape (line 132) | StaticShape LSTM::OutputShape(const StaticShape &input_shape) const {
FILE: src/lstm/lstm.h
function namespace (line 24) | namespace tesseract {
FILE: src/lstm/lstmrecognizer.cpp
type tesseract (line 43) | namespace tesseract {
function NullIsBest (line 506) | static bool NullIsBest(const NetworkIO& output, float null_thr,
FILE: src/lstm/lstmrecognizer.h
type Pix (line 32) | struct Pix
function namespace (line 38) | namespace tesseract {
function SetLayerLearningRate (line 172) | void SetLayerLearningRate(const std::string &id, float learning_rate)
function ConvertToInt (line 181) | void ConvertToInt() {
function Dict (line 200) | const Dict *GetDict() const {
function Dict (line 203) | Dict *GetDict() {
function SetIteration (line 209) | void SetIteration(int iteration) {
FILE: src/lstm/maxpool.cpp
type tesseract (line 20) | namespace tesseract {
FILE: src/lstm/maxpool.h
function namespace (line 23) | namespace tesseract {
FILE: src/lstm/network.cpp
type tesseract (line 43) | namespace tesseract {
function NetworkType (line 191) | static NetworkType getNetworkType(TFile *fp) {
function Network (line 214) | Network *Network::CreateFromFile(TFile *fp) {
function TFloat (line 317) | TFloat Network::Random(TFloat range) {
FILE: src/lstm/network.h
type Pix (line 30) | struct Pix
function namespace (line 32) | namespace tesseract {
FILE: src/lstm/networkio.cpp
type tesseract (line 27) | namespace tesseract {
function ComputeBlackWhite (line 127) | static void ComputeBlackWhite(Image pix, float *black, float *white) {
function Image (line 300) | Image NetworkIO::ToPix() const {
function TFloat (line 537) | TFloat NetworkIO::ScoreOfLabels(const std::vector<int> &labels, int st...
FILE: src/lstm/networkio.h
type Pix (line 31) | struct Pix
function namespace (line 33) | namespace tesseract {
FILE: src/lstm/networkscratch.h
function namespace (line 26) | namespace tesseract {
FILE: src/lstm/parallel.cpp
type tesseract (line 31) | namespace tesseract {
function StaticShape (line 40) | StaticShape Parallel::OutputShape(const StaticShape &input_shape) const {
FILE: src/lstm/parallel.h
function namespace (line 23) | namespace tesseract {
FILE: src/lstm/plumbing.cpp
type tesseract (line 21) | namespace tesseract {
function Network (line 161) | Network *Plumbing::GetLayer(const char *id) const {
FILE: src/lstm/plumbing.h
function namespace (line 25) | namespace tesseract {
FILE: src/lstm/recodebeam.cpp
type tesseract (line 28) | namespace tesseract {
type greater_than (line 324) | struct greater_than {
function WERD_RES (line 636) | WERD_RES *RecodeBeamSearch::InitializeWord(bool leading_space,
FILE: src/lstm/recodebeam.h
function namespace (line 35) | namespace tesseract {
FILE: src/lstm/reconfig.cpp
type tesseract (line 21) | namespace tesseract {
function StaticShape (line 30) | StaticShape Reconfig::OutputShape(const StaticShape &input_shape) const {
FILE: src/lstm/reconfig.h
function namespace (line 25) | namespace tesseract {
FILE: src/lstm/reversed.cpp
type tesseract (line 24) | namespace tesseract {
function StaticShape (line 32) | StaticShape Reversed::OutputShape(const StaticShape &input_shape) const {
FILE: src/lstm/series.cpp
type tesseract (line 26) | namespace tesseract {
function StaticShape (line 35) | StaticShape Series::OutputShape(const StaticShape &input_shape) const {
FILE: src/lstm/series.h
function namespace (line 23) | namespace tesseract {
FILE: src/lstm/static_shape.h
function namespace (line 25) | namespace tesseract {
FILE: src/lstm/stridemap.cpp
type tesseract (line 21) | namespace tesseract {
FILE: src/lstm/stridemap.h
function namespace (line 23) | namespace tesseract {
FILE: src/lstm/weightmatrix.cpp
type tesseract (line 26) | namespace tesseract {
function TFloat (line 29) | static inline TFloat log2(TFloat n) {
function DoubleToFloat (line 41) | static void DoubleToFloat(const GENERIC_2D_ARRAY<double> &src, GENERIC...
function FloatToDouble (line 55) | static void FloatToDouble(const GENERIC_2D_ARRAY<float> &src, GENERIC_...
function DeSerialize (line 68) | static bool DeSerialize(TFile *fp, GENERIC_2D_ARRAY<TFloat> &tfloat_ar...
function Serialize (line 81) | static bool Serialize(TFile *fp, const GENERIC_2D_ARRAY<TFloat> &tfloa...
function MatrixDotVectorInternal (line 99) | static inline void MatrixDotVectorInternal(const GENERIC_2D_ARRAY<TFlo...
function HistogramWeight (line 518) | static void HistogramWeight(TFloat weight, STATS *histogram) {
FILE: src/lstm/weightmatrix.h
function namespace (line 28) | namespace tesseract {
FILE: src/svpaint.cpp
type tesseract (line 35) | namespace tesseract {
class SVPaint (line 40) | class SVPaint : public SVEventHandler {
function SVMenuNode (line 72) | SVMenuNode *SVPaint::BuildPopupMenu() {
function SVMenuNode (line 85) | SVMenuNode *SVPaint::BuildMenuBar() {
function main (line 241) | int main(int argc, char **argv) {
FILE: src/tesseract.cpp
function Win32ErrorHandler (line 60) | static void Win32ErrorHandler(const char *module, const char *fmt, va_li...
function Win32WarningHandler (line 68) | static void Win32WarningHandler(const char *module, const char *fmt, va_...
class AutoWin32ConsoleOutputCP (line 79) | class AutoWin32ConsoleOutputCP {
method AutoWin32ConsoleOutputCP (line 81) | explicit AutoWin32ConsoleOutputCP(UINT codeCP) :
function PrintVersionInfo (line 99) | static void PrintVersionInfo() {
function PrintHelpForPSM (line 156) | static void PrintHelpForPSM() {
function PrintHelpForOEM (line 184) | static void PrintHelpForOEM() {
function PrintHelpExtra (line 195) | static void PrintHelpExtra(const char *program) {
function PrintHelpMessage (line 256) | static void PrintHelpMessage(const char *program) {
function PrintLangsList (line 276) | static void PrintLangsList(tesseract::TessBaseAPI &api) {
function FixPageSegMode (line 301) | static void FixPageSegMode(tesseract::TessBaseAPI &api, tesseract::PageS...
function checkArgValues (line 307) | static bool checkArgValues(int arg, const char *mode, int count) {
function stringToOEM (line 316) | static int stringToOEM(const std::string arg) {
function stringToPSM (line 331) | static int stringToPSM(const std::string arg) {
function ParseArgs (line 367) | static bool ParseArgs(int argc, char **argv, const char **lang, const ch...
function PreloadRenderers (line 504) | static void PreloadRenderers(tesseract::TessBaseAPI &api,
function main1 (line 651) | static int main1(int argc, char **argv) {
function main (line 856) | int main(int argc, char **argv) {
FILE: src/textord/alignedblob.cpp
type tesseract (line 27) | namespace tesseract {
function ScrollView (line 165) | ScrollView *AlignedBlob::DisplayTabs(const char *window_name, ScrollVi...
function AtLeast2LineCrossings (line 214) | static bool AtLeast2LineCrossings(BLOBNBOX_CLIST *blobs) {
function TabVector (line 234) | TabVector *AlignedBlob::FindVerticalAlignment(AlignedBlobParams align_...
function BLOBNBOX (line 372) | BLOBNBOX *AlignedBlob::FindAlignedBlob(const AlignedBlobParams &p, boo...
FILE: src/textord/alignedblob.h
function namespace (line 27) | namespace tesseract {
FILE: src/textord/baselinedetect.cpp
type tesseract (line 64) | namespace tesseract {
FILE: src/textord/baselinedetect.h
type Pix (line 26) | struct Pix
function namespace (line 28) | namespace tesseract {
FILE: src/textord/bbgrid.cpp
type tesseract (line 24) | namespace tesseract {
function IntGrid (line 131) | IntGrid *IntGrid::NeighbourhoodSum() const {
function Image (line 190) | Image IntGrid::ThresholdToPix(int threshold) const {
function Image (line 207) | static Image GridReducedPix(const TBOX &box, int gridsize, ICOORD blef...
function Image (line 224) | Image TraceOutlineOnReducedPix(C_OUTLINE *outline, int gridsize, ICOOR...
function Image (line 250) | Image TraceBlockOnReducedPix(BLOCK *block, int gridsize, ICOORD bleft,...
FILE: src/textord/bbgrid.h
function namespace (line 34) | namespace tesseract {
function grid_ (line 457) | grid_(nullptr) {}
function grid_ (line 461) | grid_(nullptr) {
function Notify (line 605) | void Notify(const SVEvent *sv_event) override {
FILE: src/textord/blkocc.cpp
type tesseract (line 30) | namespace tesseract {
function test_underline (line 47) | bool test_underline( // look for underlines
function horizontal_cblob_projection (line 113) | static void horizontal_cblob_projection( // project outlines
function horizontal_coutline_projection (line 132) | static void horizontal_coutline_projection( // project outlines
FILE: src/textord/blkocc.h
function namespace (line 26) | namespace tesseract {
function class (line 122) | class BAND {
FILE: src/textord/blobgrid.cpp
type tesseract (line 22) | namespace tesseract {
FILE: src/textord/blobgrid.h
function namespace (line 26) | namespace tesseract {
FILE: src/textord/ccnontextdetect.cpp
type tesseract (line 28) | namespace tesseract {
function Image (line 84) | Image CCNonTextDetect::ComputeNonTextMask(bool debug, Image photo_map,...
function IntGrid (line 151) | IntGrid *CCNonTextDetect::ComputeNoiseDensity(bool debug, Image photo_...
function TBOX (line 193) | static TBOX AttemptBoxExpansion(const TBOX &box, const IntGrid &noise_...
FILE: src/textord/ccnontextdetect.h
function namespace (line 26) | namespace tesseract {
FILE: src/textord/cjkpitch.cpp
type tesseract (line 28) | namespace tesseract {
class SimpleStats (line 42) | class SimpleStats {
method SimpleStats (line 44) | SimpleStats() = default;
method Clear (line 47) | void Clear() {
method Add (line 52) | void Add(float value) {
method Finish (line 57) | void Finish() {
method ile (line 62) | float ile(double frac) {
method median (line 81) | float median() {
method minimum (line 85) | float minimum() {
method empty (line 95) | bool empty() const {
method size (line 99) | int size() const {
class LocalCorrelation (line 111) | class LocalCorrelation {
type float_pair (line 113) | struct float_pair {
method LocalCorrelation (line 118) | LocalCorrelation() : finalized_(false) {}
method Finish (line 121) | void Finish() {
method Clear (line 126) | void Clear() {
method Add (line 130) | void Add(float x, float y, int v) {
method EstimateYFor (line 139) | float EstimateYFor(float x, float r) {
method float_pair_compare (line 170) | static bool float_pair_compare(const float_pair f_a, const float_pai...
type float_pair (line 175) | struct float_pair
class FPChar (line 180) | class FPChar {
type Alignment (line 182) | enum Alignment { ALIGN_UNKNOWN, ALIGN_GOOD, ALIGN_BAD }
method FPChar (line 184) | FPChar()
method Init (line 197) | void Init(BLOBNBOX *blob) {
method Merge (line 206) | void Merge(const FPChar &next) {
method TBOX (line 219) | const TBOX &box() const {
method set_box (line 222) | void set_box(const TBOX &box) {
method TBOX (line 225) | const TBOX &real_body() const {
method is_final (line 229) | bool is_final() const {
method set_final (line 232) | void set_final(bool flag) {
method Alignment (line 236) | const Alignment &alignment() const {
method set_alignment (line 239) | void set_alignment(Alignment alignment) {
method merge_to_prev (line 243) | bool merge_to_prev() const {
method set_merge_to_prev (line 246) | void set_merge_to_prev(bool flag) {
method delete_flag (line 250) | bool delete_flag() const {
method set_delete_flag (line 253) | void set_delete_flag(bool flag) {
method max_gap (line 257) | int max_gap() const {
method num_blobs (line 261) | int num_blobs() const {
class FPRow (line 288) | class FPRow {
method FPRow (line 290) | FPRow() : all_pitches_(), all_gaps_(), good_pitches_(), good_gaps_()...
method good_pitches (line 328) | int good_pitches() {
method pitch (line 332) | float pitch() {
method estimated_pitch (line 336) | float estimated_pitch() {
method set_estimated_pitch (line 340) | void set_estimated_pitch(float v) {
method height (line 344) | float height() {
method height_pitch_ratio (line 348) | float height_pitch_ratio() {
method gap (line 355) | float gap() {
method num_chars (line 359) | size_t num_chars() {
method FPChar (line 362) | FPChar *character(int i) {
method TBOX (line 366) | const TBOX &box(int i) {
method TBOX (line 370) | const TBOX &real_body(int i) {
method is_box_modified (line 374) | bool is_box_modified(int i) {
method center_x (line 378) | float center_x(int i) {
method is_final (line 382) | bool is_final(int i) {
method finalize (line 386) | void finalize(int i) {
method is_good (line 390) | bool is_good(int i) {
method mark_good (line 394) | void mark_good(int i) {
method mark_bad (line 398) | void mark_bad(int i) {
method clear_alignment (line 402) | void clear_alignment(int i) {
method x_overlap_fraction (line 407) | static float x_overlap_fraction(const TBOX &box1, const TBOX &box2) {
method mostly_overlap (line 414) | static bool mostly_overlap(const TBOX &box1, const TBOX &box2) {
method significant_overlap (line 418) | static bool significant_overlap(const TBOX &box1, const TBOX &box2) {
method box_pitch (line 426) | static float box_pitch(const TBOX &ref, const TBOX &box) {
method is_good_pitch (line 431) | static bool is_good_pitch(float pitch, const TBOX &box1, const TBOX ...
method is_interesting_blob (line 455) | static bool is_interesting_blob(const BLOBNBOX *blob) {
method DeleteChars (line 460) | void DeleteChars() {
class FPAnalyzer (line 951) | class FPAnalyzer {
method Pass1Analyze (line 956) | void Pass1Analyze() {
method maybe_fixed_pitch (line 967) | bool maybe_fixed_pitch() {
method MergeFragments (line 974) | void MergeFragments() {
method FinalizeLargeChars (line 980) | void FinalizeLargeChars() {
method Pass2Analyze (line 986) | bool Pass2Analyze() {
method OutputEstimations (line 996) | void OutputEstimations() {
method DebugOutputResult (line 1003) | void DebugOutputResult() {
method num_rows (line 1010) | size_t num_rows() {
method max_iteration (line 1015) | unsigned max_iteration() {
function compute_fixed_pitch_cjk (line 1103) | void compute_fixed_pitch_cjk(ICOORD page_tr, TO_BLOCK_LIST *port_block...
FILE: src/textord/cjkpitch.h
function namespace (line 25) | namespace tesseract {
FILE: src/textord/colfind.cpp
type tesseract (line 44) | namespace tesseract {
function BOOL_VAR (line 66) | static BOOL_VAR(textord_tabfind_find_tables, true, "run table detectio...
function ReleaseAllBlobsAndDeleteUnused (line 951) | static void ReleaseAllBlobsAndDeleteUnused(BLOBNBOX_LIST *blobs) {
function TBOX (line 1225) | static TBOX BoxFromHLine(const TabVector *hline) {
function ReflectBlobList (line 1481) | static void ReflectBlobList(BLOBNBOX_LIST *bblobs) {
function RotateAndExplodeBlobList (line 1509) | static void RotateAndExplodeBlobList(const FCOORD &blob_rotation, BLOB...
function FCOORD (line 1600) | FCOORD ColumnFinder::ComputeBlockAndClassifyRotation(BLOCK *block) {
FILE: src/textord/colfind.h
type Boxa (line 31) | struct Boxa
type Pixa (line 32) | struct Pixa
function namespace (line 38) | namespace tesseract {
FILE: src/textord/colpartition.cpp
type tesseract (line 36) | namespace tesseract {
type SpacingNeighbourhood (line 42) | enum SpacingNeighbourhood {
function ColPartition (line 108) | ColPartition *ColPartition::FakePartition(const TBOX &box,
function ColPartition (line 129) | ColPartition *ColPartition::MakeBigPartition(BLOBNBOX *box,
function ColPartition (line 161) | ColPartition *ColPartition::MakeLinePartition(BlobRegionType blob_type,
function BLOBNBOX (line 229) | BLOBNBOX *ColPartition::BiggestBox() {
function TBOX (line 250) | TBOX ColPartition::BoundsWithoutBox(BLOBNBOX *box) {
function ColPartition (line 664) | ColPartition *ColPartition::SingletonPartner(bool upper) {
function BLOBNBOX (line 808) | BLOBNBOX *ColPartition::OverlapSplitBlob(const TBOX &box) {
function ColPartition (line 828) | ColPartition *ColPartition::SplitAtBlob(BLOBNBOX *split_blob) {
function ColPartition (line 865) | ColPartition *ColPartition::SplitAt(int split_x) {
function PolyBlockType (line 1056) | PolyBlockType ColPartition::PartitionType(ColumnSpanningType flow) con...
function ClipCoord (line 1602) | static void ClipCoord(const ICOORD &bleft, const ICOORD &tright, ICOOR...
function TO_BLOCK (line 1621) | static TO_BLOCK *MoveBlobsToBlock(bool vertical_text, int line_spacing,
function TO_BLOCK (line 1697) | TO_BLOCK *ColPartition::MakeBlock(const ICOORD &bleft, const ICOORD &t...
function TO_BLOCK (line 1757) | TO_BLOCK *ColPartition::MakeVerticalTextBlock(const ICOORD &bleft,
function TO_ROW (line 1784) | TO_ROW *ColPartition::MakeToRow() {
function ColPartition (line 1808) | ColPartition *ColPartition::ShallowCopy() const {
function ColPartition (line 1835) | ColPartition *ColPartition::CopyButDontOwnBlobs() {
function MedianSpacing (line 2252) | static int MedianSpacing(int page_height, ColPartition_IT it) {
function UpdateLeftMargin (line 2508) | static bool UpdateLeftMargin(const ColPartition &part, int *margin_left,
function UpdateRightMargin (line 2597) | static bool UpdateRightMargin(const ColPartition &part, int *margin_left,
FILE: src/textord/colpartition.h
function namespace (line 33) | namespace tesseract {
FILE: src/textord/colpartitiongrid.cpp
type tesseract (line 30) | namespace tesseract {
function OKMergeCandidate (line 181) | static bool OKMergeCandidate(const ColPartition *part,
function IncreaseInOverlap (line 233) | static int IncreaseInOverlap(const ColPartition *merge1,
function TestCompatibleCandidates (line 294) | static bool TestCompatibleCandidates(const ColPartition &part, bool de...
function ColPartition (line 410) | ColPartition *ColPartitionGrid::BestMergeCandidate(
function RemoveBadBox (line 511) | static void RemoveBadBox(BLOBNBOX *box, ColPartition *part,
function ColPartitionSet (line 841) | ColPartitionSet *ColPartitionGrid::MakeSingleColumnSet(WidthCallback c...
function ComputeSearchBoxAndScaling (line 1512) | static void ComputeSearchBoxAndScaling(BlobNeighbourDir direction,
type NeighbourPartitionType (line 1548) | enum NeighbourPartitionType {
function BlobRegionType (line 1565) | BlobRegionType ColPartitionGrid::SmoothInOneDirection(
FILE: src/textord/colpartitiongrid.h
function namespace (line 26) | namespace tesseract {
FILE: src/textord/colpartitionset.cpp
type tesseract (line 28) | namespace tesseract {
function ColPartition (line 59) | ColPartition *ColPartitionSet::GetColumnByIndex(int index) {
function ColPartition (line 72) | ColPartition *ColPartitionSet::ColumnContaining(int x, int y) {
function ColPartitionSet (line 368) | ColPartitionSet *ColPartitionSet::Copy(bool good_only) {
function ColumnSpanningType (line 423) | ColumnSpanningType ColPartitionSet::SpanningType(
FILE: src/textord/devanagari_processing.cpp
type tesseract (line 32) | namespace tesseract {
function Box (line 386) | Box *ShiroRekhaSplitter::GetBoxForTBOX(const TBOX &tbox) const {
FILE: src/textord/devanagari_processing.h
type Pix (line 20) | struct Pix
type Box (line 21) | struct Box
type Boxa (line 22) | struct Boxa
function namespace (line 24) | namespace tesseract {
FILE: src/textord/drawtord.cpp
type tesseract (line 28) | namespace tesseract {
function ScrollView (line 47) | ScrollView *create_to_win(ICOORD page_tr) {
function close_to_win (line 56) | void close_to_win() {
function plot_box_list (line 69) | void plot_box_list( // make gradients win
function plot_to_row (line 89) | void plot_to_row( // draw a row
function plot_parallel_row (line 122) | void plot_parallel_row( // draw a row
function draw_occupation (line 161) | void draw_occupation( // draw projection
function draw_meanlines (line 203) | void draw_meanlines( // draw a block
function plot_word_decisions (line 238) | void plot_word_decisions( // draw words
function plot_fp_cells (line 309) | void plot_fp_cells( // draw words
function plot_fp_cells2 (line 353) | void plot_fp_cells2( // draw words
function plot_row_cells (line 387) | void plot_row_cells( // draw words
FILE: src/textord/drawtord.h
function namespace (line 27) | namespace tesseract {
FILE: src/textord/edgblob.cpp
type tesseract (line 31) | namespace tesseract {
function C_OUTLINE_LIST (line 79) | C_OUTLINE_LIST *OL_BUCKETS::operator()( // array access
function C_OUTLINE_LIST (line 86) | C_OUTLINE_LIST *OL_BUCKETS::start_scan() {
function C_OUTLINE_LIST (line 90) | C_OUTLINE_LIST *OL_BUCKETS::scan_next() {
function C_OUTLINE_LIST (line 94) | C_OUTLINE_LIST *OL_BUCKETS::scan_next(decltype(buckets)::iterator in_i...
function extract_edges (line 347) | void extract_edges(Image pix, // thresholded image
function fill_buckets (line 362) | static void fill_buckets(C_OUTLINE_LIST *outlines, // outlines in block
function capture_children (line 385) | static bool capture_children(OL_BUCKETS *buckets, // bucket sort class
function empty_buckets (line 415) | static void empty_buckets(BLOCK *block, // block to scan
function outlines_to_blobs (line 460) | void outlines_to_blobs( // find blobs
FILE: src/textord/edgblob.h
function namespace (line 28) | namespace tesseract {
FILE: src/textord/edgloop.cpp
type tesseract (line 28) | namespace tesseract {
function complete_edge (line 38) | void complete_edge(CRACKEDGE *start, // start of loop
function check_path_legal (line 67) | ScrollView::Color check_path_legal( // certify outline
function loop_bounding_box (line 117) | int16_t loop_bounding_box( // get bounding box
FILE: src/textord/edgloop.h
function namespace (line 28) | namespace tesseract {
FILE: src/textord/equationdetectbase.cpp
type tesseract (line 30) | namespace tesseract {
FILE: src/textord/equationdetectbase.h
type Pix (line 27) | struct Pix
function namespace (line 29) | namespace tesseract {
FILE: src/textord/fpchop.cpp
type tesseract (line 32) | namespace tesseract {
function ROW (line 65) | ROW *fixed_pitch_words( // find lines
function WERD (line 224) | static WERD *add_repeated_word( // move repeated word
function split_to_blob (line 260) | void split_to_blob( // split the blob
function fixed_chop_cblob (line 287) | static void fixed_chop_cblob( // split the blob
function fixed_split_coutline (line 327) | static void fixed_split_coutline( // chop the outline
function fixed_chop_coutline (line 408) | static bool fixed_chop_coutline( // chop the outline
function save_chop_cfragment (line 512) | static void save_chop_cfragment( // chop the outline
function add_frag_to_list (line 605) | static void add_frag_to_list( // ordered add
function close_chopped_cfragments (line 631) | static void close_chopped_cfragments( // chop the outline
function C_OUTLINE (line 693) | static C_OUTLINE *join_chopped_fragments( // join pieces
function join_segments (line 730) | static void join_segments( // join pieces
function C_OUTLINE (line 766) | C_OUTLINE *C_OUTLINE_FRAG::close() { // join pieces
function C_OUTLINE_FRAG (line 800) | C_OUTLINE_FRAG &C_OUTLINE_FRAG::operator=(const C_OUTLINE_FRAG &src //...
FILE: src/textord/fpchop.h
function namespace (line 25) | namespace tesseract {
FILE: src/textord/gap_map.cpp
type tesseract (line 15) | namespace tesseract {
FILE: src/textord/gap_map.h
function namespace (line 16) | namespace tesseract {
FILE: src/textord/imagefind.cpp
type tesseract (line 35) | namespace tesseract {
function INT_VAR (line 37) | static INT_VAR(textord_tabfind_show_images, false, "Show image blobs");
function VScanForEdge (line 98) | static bool VScanForEdge(uint32_t *data, int wpl, int y_start, int y_e...
function pixNearlyRectangular (line 135) | static bool pixNearlyRectangular(Image pix, double min_fraction, doubl...
function ConnCompAndRectangularize (line 206) | static void ConnCompAndRectangularize(Image pix, DebugPixa *pixa_debug...
function Image (line 252) | Image ImageFind::FindImages(Image pix, DebugPixa *pixa_debug) {
function AttemptToShrinkBox (line 482) | static void AttemptToShrinkBox(const FCOORD &rotation, const FCOORD &r...
function CutChunkFromParts (line 527) | static void CutChunkFromParts(const TBOX &box, const TBOX &im_box, con...
function DivideImageIntoParts (line 605) | static void DivideImageIntoParts(const TBOX &im_box, const FCOORD &rot...
function ExpandImageLeft (line 650) | static int ExpandImageLeft(const TBOX &box, int left_limit, ColPartiti...
function ExpandImageRight (line 686) | static int ExpandImageRight(const TBOX &box, int right_limit, ColParti...
function ExpandImageBottom (line 722) | static int ExpandImageBottom(const TBOX &box, int bottom_limit, ColPar...
function ExpandImageTop (line 758) | static int ExpandImageTop(const TBOX &box, int top_limit, ColPartition...
function ExpandImageDir (line 796) | static int ExpandImageDir(BlobNeighbourDir dir, const TBOX &im_box, co...
function MaximalImageBoundingBox (line 822) | static void MaximalImageBoundingBox(ColPartitionGrid *part_grid, TBOX ...
function DeletePartition (line 855) | static void DeletePartition(ColPartition *part) {
function ExpandImageIntoParts (line 882) | static bool ExpandImageIntoParts(const TBOX &max_image_box, ColPartiti...
function IntersectArea (line 957) | static int IntersectArea(const TBOX &box, ColPartition_LIST *part_list) {
function TestWeakIntersectedPart (line 974) | static bool TestWeakIntersectedPart(const TBOX &im_box, ColPartition_L...
function EliminateWeakParts (line 995) | static void EliminateWeakParts(const TBOX &im_box, ColPartitionGrid *p...
function ScanForOverlappingText (line 1029) | static bool ScanForOverlappingText(ColPartitionGrid *part_grid, TBOX *...
function MarkAndDeleteImageParts (line 1056) | static void MarkAndDeleteImageParts(const FCOORD &rerotate, ColPartiti...
function DeleteSmallImages (line 1110) | static void DeleteSmallImages(ColPartitionGrid *part_grid) {
FILE: src/textord/imagefind.h
function namespace (line 27) | namespace tesseract {
FILE: src/textord/linefind.cpp
type tesseract (line 33) | namespace tesseract {
function RemoveUnusedLineSegments (line 61) | static void RemoveUnusedLineSegments(bool horizontal_lines, BLOBNBOX_L...
function SubtractLinesAndResidue (line 92) | static void SubtractLinesAndResidue(Image line_pix, Image non_line_pix,
function MaxStrokeWidth (line 110) | static int MaxStrokeWidth(Image pix) {
function NumTouchingIntersections (line 132) | static int NumTouchingIntersections(Box *line_box, Image intersection_...
function CountPixelsAdjacentToLine (line 150) | static int CountPixelsAdjacentToLine(int line_width, Box *line_box, Im...
function FilterFalsePositives (line 182) | static int FilterFalsePositives(int resolution, Image nonline_pix, Ima...
function ConvertBoxaToBlobs (line 230) | static void ConvertBoxaToBlobs(int image_width, int image_height, Boxa...
function GetLineBoxes (line 266) | static void GetLineBoxes(bool horizontal_lines, Image pix_lines, Image...
function FindLineVectors (line 324) | static void FindLineVectors(const ICOORD &bleft, const ICOORD &tright,
function Image (line 375) | static Image FilterMusic(int resolution, Image pix_closed, Image pix_v...
function GetLineMasks (line 455) | static void GetLineMasks(int resolution, Image src_pix, Image *pix_vli...
function FindAndRemoveVLines (line 594) | static void FindAndRemoveVLines(Image pix_intersections, int *vertical_x,
function FindAndRemoveHLines (line 629) | static void FindAndRemoveHLines(Image pix_intersections, int vertical_x,
FILE: src/textord/linefind.h
function namespace (line 23) | namespace tesseract {
FILE: src/textord/makerow.cpp
type tesseract (line 44) | namespace tesseract {
function BOOL_VAR (line 61) | static BOOL_VAR(textord_interpolating_skew, true, "Interpolate across ...
function make_rows (line 224) | float make_rows(ICOORD page_tr, TO_BLOCK_LIST *port_blocks) {
function make_initial_textrows (line 249) | void make_initial_textrows( // find lines
function fit_lms_line (line 291) | void fit_lms_line(TO_ROW *row) {
function compute_page_skew (line 310) | void compute_page_skew( // get average gradient
function dot_of_i (line 409) | static bool dot_of_i(BLOBNBOX *dot, BLOBNBOX *i, TO_ROW *row) {
function vigorous_noise_removal (line 503) | void vigorous_noise_removal(TO_BLOCK *block) {
function cleanup_rows_making (line 558) | void cleanup_rows_making( // find lines
function delete_non_dropout_rows (line 607) | void delete_non_dropout_rows( // find lines
function find_best_dropout_row (line 691) | bool find_best_dropout_row( // find neighbours
function TBOX (line 760) | TBOX deskew_block_coords( // block box
function compute_line_occupation (line 794) | void compute_line_occupation( // project blobs
function compute_occupation_threshold (line 847) | void compute_occupation_threshold( // project blobs
function compute_dropout_distances (line 928) | void compute_dropout_distances( // project blobs
function expand_rows (line 971) | void expand_rows( // find lines
function adjust_row_limits (line 1124) | void adjust_row_limits( // tidy limits
function compute_row_stats (line 1158) | void compute_row_stats( // find lines
function fill_heights (line 1413) | void fill_heights(TO_ROW *row, float gradient, int min_height, int max...
function compute_xheight_from_modes (line 1475) | int compute_xheight_from_modes(STATS *heights, STATS *floating_heights...
function compute_row_descdrop (line 1571) | int32_t compute_row_descdrop(TO_ROW *row, float gradient, int xheight_...
function compute_height_modes (line 1624) | int32_t compute_height_modes(STATS *heights, // stats to search
function correct_row_xheight (line 1685) | void correct_row_xheight(TO_ROW *row, float xheight, float ascrise, fl...
function CountOverlaps (line 1757) | static int CountOverlaps(const TBOX &box, int min_height, BLOBNBOX_LIS...
function separate_underlines (line 1776) | void separate_underlines(TO_BLOCK *block, // block to do
function pre_associate_blobs (line 1841) | void pre_associate_blobs( // make rough chars
function fit_parallel_rows (line 1923) | void fit_parallel_rows( // find lines
function fit_parallel_lms (line 1965) | void fit_parallel_lms(float gradient, TO_ROW *row) {
function make_baseline_spline (line 2048) | void make_baseline_spline(TO_ROW *row, // row to fit
function segment_baseline (line 2078) | bool segment_baseline( // split baseline
function assign_blobs_to_rows (line 2267) | void assign_blobs_to_rows( // find lines
function OVERLAP_STATE (line 2446) | OVERLAP_STATE most_overlapping_row( // find best row
function blob_x_order (line 2537) | int blob_x_order( // sort function
function mark_repeated_chars (line 2555) | void mark_repeated_chars(TO_ROW *row) {
FILE: src/textord/makerow.h
function namespace (line 28) | namespace tesseract {
FILE: src/textord/oldbasel.cpp
type tesseract (line 40) | namespace tesseract {
function BOOL_VAR (line 42) | static BOOL_VAR(textord_really_old_xheight, false, "Use original wiseo...
function get_blob_coords (line 416) | int get_blob_coords( // get boxes
function make_first_baseline (line 482) | void make_first_baseline( // initial approximation
function make_holed_baseline (line 619) | void make_holed_baseline( // initial approximation
function partition_line (line 673) | int partition_line( // partition blobs
function merge_oldbl_parts (line 749) | void merge_oldbl_parts( // partition blobs
function get_ydiffs (line 860) | int get_ydiffs( // evaluate differences
function choose_partition (line 910) | int choose_partition( // select partition
function partition_coords (line 977) | int partition_coords( // find relevant coords
function segment_spline (line 1006) | int segment_spline( // make xstarts
function split_stepped_spline (line 1139) | bool split_stepped_spline( // make xstarts
function insert_spline_point (line 1239) | void insert_spline_point( // get descenders
function find_lesser_parts (line 1262) | void find_lesser_parts( // get descenders
function old_first_xheight (line 1340) | void old_first_xheight( // the wiseowl way
function make_first_xheight (line 1421) | void make_first_xheight( // find xheight
function find_top_modes (line 1508) | void find_top_modes( // get modes
function pick_x_height (line 1547) | void pick_x_height(TO_ROW *row, // row to do
FILE: src/textord/oldbasel.h
function namespace (line 25) | namespace tesseract {
FILE: src/textord/pithsync.cpp
type tesseract (line 30) | namespace tesseract {
function check_pitch_sync2 (line 292) | double check_pitch_sync2( // find segmentation
function check_pitch_sync3 (line 482) | double check_pitch_sync3( // find segmentation
FILE: src/textord/pithsync.h
function namespace (line 26) | namespace tesseract {
FILE: src/textord/pitsync1.cpp
type tesseract (line 24) | namespace tesseract {
function check_pitch_sync (line 138) | double check_pitch_sync( // find segmentation
function make_illegal_segment (line 353) | void make_illegal_segment( // find segmentation
FILE: src/textord/pitsync1.h
function namespace (line 30) | namespace tesseract {
FILE: src/textord/scanedg.cpp
type tesseract (line 29) | namespace tesseract {
type CrackPos (line 36) | struct CrackPos {
function block_edges (line 62) | void block_edges(Image t_pix, // thresholded image
function make_margins (line 112) | static void make_margins( // get a line
function line_edges (line 165) | static void line_edges(TDimension x, // coord of line start
function CRACKEDGE (line 247) | static CRACKEDGE *h_edge(int sign, // sign of edge
function CRACKEDGE (line 296) | static CRACKEDGE *v_edge(int sign, // sign of edge
function join_edges (line 345) | static void join_edges(CRACKEDGE *edge1, // edges to join
function free_crackedges (line 376) | static void free_crackedges(CRACKEDGE *start) {
FILE: src/textord/scanedg.h
type Pix (line 25) | struct Pix
function namespace (line 27) | namespace tesseract {
FILE: src/textord/sortflts.cpp
type tesseract (line 21) | namespace tesseract {
FILE: src/textord/sortflts.h
function namespace (line 24) | namespace tesseract {
function SORTED_FLOATS (line 43) | ELISTIZEH(SORTED_FLOAT)
FILE: src/textord/strokewidth.cpp
type tesseract (line 39) | namespace tesseract {
function BOOL_VAR (line 46) | static BOOL_VAR(textord_tabfind_only_strokewidths, false, "Only run st...
function CollectHorizVertBlobs (line 172) | static void CollectHorizVertBlobs(BLOBNBOX_LIST *input_blobs, int *num...
function PrintBoxWidths (line 394) | static void PrintBoxWidths(BLOBNBOX *neighbour) {
function UpperQuartileCJKSize (line 569) | static int UpperQuartileCJKSize(int gridsize, BLOBNBOX_LIST *blobs) {
function AcceptableCJKMerge (line 688) | static bool AcceptableCJKMerge(const TBOX &bbox, const TBOX &nbox, boo...
function ListNeighbours (line 1064) | static void ListNeighbours(const BLOBNBOX *blob, BLOBNBOX_CLIST *neigh...
function List2ndNeighbours (line 1075) | static void List2ndNeighbours(const BLOBNBOX *blob, BLOBNBOX_CLIST *ne...
function List3rdNeighbours (line 1087) | static void List3rdNeighbours(const BLOBNBOX *blob, BLOBNBOX_CLIST *ne...
function CountNeighbourGaps (line 1100) | static void CountNeighbourGaps(bool debug, BLOBNBOX_CLIST *neighbours,...
function CountNeighbourTypes (line 1177) | static void CountNeighbourTypes(BLOBNBOX_CLIST *neighbours, int *pure_...
function PartitionFindResult (line 1274) | PartitionFindResult StrokeWidth::FindInitialPartitions(
function BLOBNBOX (line 1398) | static BLOBNBOX *MutualUnusedVNeighbour(const BLOBNBOX *blob, BlobNeig...
function BLOBNBOX (line 1444) | static BLOBNBOX *MutualUnusedHNeighbour(const BLOBNBOX *blob, BlobNeig...
function ScrollView (line 1953) | ScrollView *StrokeWidth::DisplayGoodBlobs(const char *window_name, int...
function DrawDiacriticJoiner (line 1993) | static void DrawDiacriticJoiner(const BLOBNBOX *blob, ScrollView *wind...
function ScrollView (line 2002) | ScrollView *StrokeWidth::DisplayDiacritics(const char *window_name, in...
FILE: src/textord/strokewidth.h
function namespace (line 31) | namespace tesseract {
FILE: src/textord/tabfind.cpp
type tesseract (line 32) | namespace tesseract {
function BOOL_VAR (line 62) | static BOOL_VAR(textord_tabfind_show_initialtabs, false, "Show tab can...
function TabVector (line 302) | TabVector *TabFind::RightTabForBox(const TBOX &box, bool crossing, boo...
function TabVector (line 347) | TabVector *TabFind::LeftTabForBox(const TBOX &box, bool crossing, bool...
function ScrollView (line 495) | ScrollView *TabFind::DisplayTabVectors(ScrollView *tab_win) {
function ScrollView (line 512) | ScrollView *TabFind::FindInitialTabVectors(BLOBNBOX_LIST *image_blobs,...
function DisplayBoxVector (line 543) | static void DisplayBoxVector(const std::vector<BLOBNBOX *> &boxes, Scr...
function ScrollView (line 561) | ScrollView *TabFind::FindTabBoxes(int min_gutter_width, double tabfind...
function TabVector (line 910) | TabVector *TabFind::FindTabVector(int search_size_multiple, int min_gu...
function BLOBNBOX (line 1131) | BLOBNBOX *TabFind::AdjacentBlob(const BLOBNBOX *bbox, bool look_left, ...
FILE: src/textord/tabfind.h
type Pix (line 31) | struct Pix
function namespace (line 33) | namespace tesseract {
FILE: src/textord/tablefind.cpp
type tesseract (line 33) | namespace tesseract {
function DeleteObject (line 156) | void DeleteObject(T *object) {
function ICOORD (line 388) | const ICOORD &TableFinder::bleft() const {
function ICOORD (line 391) | const ICOORD &TableFinder::tright() const {
function ScrollView (line 519) | ScrollView *TableFinder::MakeWindow(int x, int y, const char *window_n...
FILE: src/textord/tablefind.h
function namespace (line 26) | namespace tesseract {
function class (line 121) | class TESS_API TableFinder {
FILE: src/textord/tablerecog.cpp
type tesseract (line 30) | namespace tesseract {
function IsWeakTableRow (line 69) | static bool IsWeakTableRow(StructuredTable *table, int row) {
function TBOX (line 126) | const TBOX &StructuredTable::bounding_box() const {
function StructuredTable (line 763) | StructuredTable *TableRecognizer::RecognizeTable(const TBOX &guess) {
FILE: src/textord/tablerecog.h
function class (line 70) | class TESS_API StructuredTable {
FILE: src/textord/tabvector.cpp
type tesseract (line 33) | namespace tesseract {
function TabVector (line 176) | TabVector *TabVector::FitVector(TabAlignment alignment, ICOORD vertica...
function TabVector (line 225) | TabVector *TabVector::ShallowCopy() const {
function TabVector (line 872) | TabVector *TabVector::GetSinglePartner() {
function TabVector (line 883) | TabVector *TabVector::VerticalTextlinePartner() {
FILE: src/textord/tabvector.h
function namespace (line 34) | namespace tesseract {
FILE: src/textord/textlineprojection.cpp
type tesseract (line 46) | namespace tesseract {
function TBOX (line 573) | static TBOX BoundsWithinBox(Image pix, const TBOX &box) {
function TruncateBoxToMissNonText (line 596) | static void TruncateBoxToMissNonText(int x_middle, int y_middle, bool ...
FILE: src/textord/textlineprojection.h
type Pix (line 19) | struct Pix
function namespace (line 21) | namespace tesseract {
FILE: src/textord/textord.cpp
type tesseract (line 33) | namespace tesseract {
FILE: src/textord/textord.h
function namespace (line 31) | namespace tesseract {
FILE: src/textord/topitch.cpp
type tesseract (line 39) | namespace tesseract {
function BOOL_VAR (line 41) | static BOOL_VAR(textord_all_prop, false, "All doc is proportial text");
function try_block_fixed (line 499) | bool try_block_fixed( // find line stats
function try_rows_fixed (line 512) | bool try_rows_fixed( // find line stats
function print_block_counts (line 569) | void print_block_counts( // find line stats
function count_block_votes (line 600) | void count_block_votes( // find line stats
function row_pitch_stats (line 642) | bool row_pitch_stats( // find line stats
function find_row_pitch (line 778) | bool find_row_pitch( // find lines
function fixed_pitch_row (line 925) | bool fixed_pitch_row(TO_ROW *row, // row to do
function count_pitch_stats (line 1002) | bool count_pitch_stats( // find lines
function tune_row_pitch (line 1091) | float tune_row_pitch( // find fp cells
function tune_row_pitch2 (line 1190) | float tune_row_pitch2( // find fp cells
function compute_pitch_sd (line 1283) | float compute_pitch_sd( // find fp cells
function compute_pitch_sd2 (line 1440) | float compute_pitch_sd2( // find fp cells
function print_pitch_sd (line 1529) | void print_pitch_sd( // find fp cells
function find_repeated_chars (line 1654) | void find_repeated_chars(TO_BLOCK *block, // Block to search.
function plot_fp_word (line 1724) | void plot_fp_word( // draw block of words
FILE: src/textord/topitch.h
function namespace (line 24) | namespace tesseract {
FILE: src/textord/tordmain.cpp
type tesseract (line 59) | namespace tesseract {
function SetBlobStrokeWidth (line 68) | void SetBlobStrokeWidth(Image pix, BLOBNBOX *blob) {
function assign_blobs_to_blocks2 (line 162) | void assign_blobs_to_blocks2(Image pix,
type BlockGroup (line 693) | struct BlockGroup {
method BlockGroup (line 694) | BlockGroup() : rotation(1.0f, 0.0f), angle(0.0f), min_xheight(1.0f) {}
method BlockGroup (line 695) | explicit BlockGroup(BLOCK *block)
function tweak_row_baseline (line 865) | void tweak_row_baseline(ROW *row, double blshift_maxshift, double blsh...
FILE: src/textord/tordmain.h
type Pix (line 27) | struct Pix
function namespace (line 29) | namespace tesseract {
FILE: src/textord/tospace.cpp
type tesseract (line 44) | namespace tesseract {
function ROW (line 843) | ROW *Textord::make_prop_words(TO_ROW *row, // row to make
function ROW (line 1117) | ROW *Textord::make_blob_words(TO_ROW *row, // row to make
function TBOX (line 1645) | TBOX Textord::reduced_box_next(TO_ROW *row, // current row
function TBOX (line 1716) | TBOX Textord::reduced_box_for_blob(BLOBNBOX *blob, TO_ROW *row, int16_...
FILE: src/textord/tovars.cpp
type tesseract (line 23) | namespace tesseract {
FILE: src/textord/tovars.h
function namespace (line 25) | namespace tesseract {
FILE: src/textord/underlin.cpp
type tesseract (line 21) | namespace tesseract {
function restore_underlined_blobs (line 32) | void restore_underlined_blobs( // get chop points
function TO_ROW (line 103) | TO_ROW *most_overlapping_row( // find best row
function find_underlined_blobs (line 158) | void find_underlined_blobs( // get chop points
function vertical_cunderline_projection (line 202) | void vertical_cunderline_projection( // project outlines
FILE: src/textord/underlin.h
function namespace (line 24) | namespace tesseract {
FILE: src/textord/wordseg.cpp
type tesseract (line 39) | namespace tesseract {
function make_single_word (line 53) | void make_single_word(bool one_blob, TO_ROW_LIST *rows, ROW_LIST *real...
function make_words (line 100) | void make_words(tesseract::Textord *textord,
function set_row_spaces (line 129) | void set_row_spaces( // find space sizes
function row_words (line 169) | int32_t row_words( // compute space size
function row_words2 (line 322) | int32_t row_words2( // compute space size
function make_real_words (line 474) | void make_real_words(tesseract::Textord *textord,
function ROW (line 527) | ROW *make_rep_words( // make a row
function WERD (line 560) | WERD *make_real_word(BLOBNBOX_IT *box_it, // iterator
FILE: src/textord/wordseg.h
function namespace (line 26) | namespace tesseract {
FILE: src/textord/workingpartset.cpp
type tesseract (line 24) | namespace tesseract {
FILE: src/textord/workingpartset.h
function namespace (line 27) | namespace tesseract {
FILE: src/training/ambiguous_words.cpp
function main (line 30) | int main(int argc, char **argv) {
FILE: src/training/classifier_tester.cpp
type ClassifierName (line 34) | enum ClassifierName { CN_PRUNER, CN_FULL, CN_COUNT }
FILE: src/training/cntraining.cpp
function main (line 103) | int main(int argc, char *argv[]) {
function WriteNormProtos (line 196) | static void WriteNormProtos(const char *Directory, LIST LabeledProtoList,
function WriteProtos (line 234) | static void WriteProtos(FILE *File, uint16_t N, LIST ProtoList, bool Wri...
FILE: src/training/combine_tessdata.cpp
function list_components (line 29) | static int list_components(TessdataManager &tm, const char *filename) {
function list_network (line 39) | static int list_network(TessdataManager &tm, const char *filename) {
function main (line 117) | int main(int argc, char **argv) {
FILE: src/training/common/commandlineflags.cpp
type tesseract (line 20) | namespace tesseract {
function IntFlagExists (line 21) | static bool IntFlagExists(const char *flag_name, int32_t *value) {
function DoubleFlagExists (line 34) | static bool DoubleFlagExists(const char *flag_name, double *value) {
function BoolFlagExists (line 47) | static bool BoolFlagExists(const char *flag_name, bool *value) {
function StringFlagExists (line 60) | static bool StringFlagExists(const char *flag_name, const char **value) {
function SetIntFlagValue (line 70) | static void SetIntFlagValue(const char *flag_name, const int32_t new_v...
function SetDoubleFlagValue (line 80) | static void SetDoubleFlagValue(const char *flag_name, const double new...
function SetBoolFlagValue (line 90) | static void SetBoolFlagValue(const char *flag_name, const bool new_val) {
function SetStringFlagValue (line 100) | static void SetStringFlagValue(const char *flag_name, const char *new_...
function SafeAtoi (line 110) | static bool SafeAtoi(const char *str, int *val) {
function SafeAtod (line 116) | static bool SafeAtod(const char *str, double *val) {
function PrintCommandLineFlags (line 130) | static void PrintCommandLineFlags() {
function ParseCommandLineFlags (line 168) | void ParseCommandLineFlags(const char *usage, int *argc, char ***argv,...
FILE: src/training/common/commandlineflags.h
function namespace (line 35) | namespace tesseract {
FILE: src/training/common/commontraining.cpp
type tesseract (line 23) | namespace tesseract {
function ParseArguments (line 51) | void ParseArguments(int *argc, char ***argv) {
type tesseract (line 83) | namespace tesseract {
function ParseArguments (line 51) | void ParseArguments(int *argc, char ***argv) {
function ShapeTable (line 148) | ShapeTable *LoadShapeTable(const std::string &file_prefix) {
function WriteShapeTable (line 170) | void WriteShapeTable(const std::string &file_prefix, const ShapeTable &s...
function LoadTrainingData (line 200) | std::unique_ptr<MasterTrainer> LoadTrainingData(const char *const *filel...
function LABELEDLIST (line 302) | LABELEDLIST FindList(LIST List, const std::string &Label) {
function ReadTrainingSamples (line 330) | void ReadTrainingSamples(const FEATURE_DEFS_STRUCT &feature_definitions,...
function FreeTrainingSamples (line 391) | void FreeTrainingSamples(LIST CharList) {
function FreeLabeledList (line 417) | void FreeLabeledList(LABELEDLIST LabeledList) {
function CLUSTERER (line 434) | CLUSTERER *SetUpForClustering(const FEATURE_DEFS_STRUCT &FeatureDefs, LA...
function MergeInsignificantProtos (line 466) | void MergeInsignificantProtos(LIST ProtoList, const char *label, CLUSTER...
function CleanUpUnusedData (line 529) | void CleanUpUnusedData(LIST ProtoList) {
function LIST (line 544) | LIST RemoveInsignificantProtos(LIST ProtoList, bool KeepSigProtos, bool ...
function MERGE_CLASS (line 597) | MERGE_CLASS FindClass(LIST List, const std::string &Label) {
function FreeLabeledClassList (line 616) | void FreeLabeledClassList(LIST ClassList) {
function CLASS_STRUCT (line 631) | CLASS_STRUCT *SetUpForFloat2Int(const UNICHARSET &unicharset, LIST Label...
function Normalize (line 691) | void Normalize(float *Values) {
function FreeNormProtoList (line 706) | void FreeNormProtoList(LIST CharList)
function AddToNormProtosList (line 722) | void AddToNormProtosList(LIST *NormProtoList, LIST ProtoList, const std:...
function NumberOfProtos (line 732) | int NumberOfProtos(LIST ProtoList, bool CountSigProtos, bool CountInsigP...
FILE: src/training/common/commontraining.h
function namespace (line 29) | namespace tesseract {
function namespace (line 58) | namespace tesseract {
FILE: src/training/common/ctc.cpp
type tesseract (line 30) | namespace tesseract {
function BestLabel (line 212) | static int BestLabel(const GENERIC_2D_ARRAY<float> &outputs, int t) {
function LogSumExp (line 276) | static double LogSumExp(double ln_x, double ln_y) {
FILE: src/training/common/ctc.h
function namespace (line 27) | namespace tesseract {
FILE: src/training/common/errorcounter.cpp
type tesseract (line 34) | namespace tesseract {
FILE: src/training/common/errorcounter.h
type Pix (line 22) | struct Pix
function namespace (line 24) | namespace tesseract {
FILE: src/training/common/intfeaturedist.cpp
type tesseract (line 22) | namespace tesseract {
FILE: src/training/common/intfeaturedist.h
function namespace (line 24) | namespace tesseract {
FILE: src/training/common/intfeaturemap.cpp
type tesseract (line 29) | namespace tesseract {
function INT_FEATURE_STRUCT (line 54) | INT_FEATURE_STRUCT IntFeatureMap::InverseIndexFeature(int index_featur...
function INT_FEATURE_STRUCT (line 57) | INT_FEATURE_STRUCT IntFeatureMap::InverseMapFeature(int map_feature) c...
FILE: src/training/common/intfeaturemap.h
function namespace (line 28) | namespace tesseract {
FILE: src/training/common/mastertrainer.cpp
type tesseract (line 41) | namespace tesseract {
function CLUSTERER (line 585) | CLUSTERER *MasterTrainer::SetupForClustering(
FILE: src/training/common/mastertrainer.h
function namespace (line 43) | namespace tesseract {
FILE: src/training/common/networkbuilder.cpp
type tesseract (line 33) | namespace tesseract {
function SkipWhitespace (line 80) | static void SkipWhitespace(const char **str) {
function Network (line 88) | Network *NetworkBuilder::BuildFromString(const StaticShape &input_shap...
function Network (line 123) | Network *NetworkBuilder::ParseInput(const char **str) {
function Network (line 147) | Network *NetworkBuilder::ParseSeries(const StaticShape &input_shape, I...
function Network (line 171) | Network *NetworkBuilder::ParseParallel(const StaticShape &input_shape,...
function Network (line 189) | Network *NetworkBuilder::ParseR(const StaticShape &input_shape, const ...
function Network (line 227) | Network *NetworkBuilder::ParseS(const StaticShape &input_shape, const ...
function NetworkType (line 249) | static NetworkType NonLinearity(char func) {
function Network (line 271) | Network *NetworkBuilder::ParseC(const StaticShape &input_shape, const ...
function Network (line 299) | Network *NetworkBuilder::ParseM(const StaticShape &input_shape, const ...
function Network (line 312) | Network *NetworkBuilder::ParseLSTM(const StaticShape &input_shape, con...
function Network (line 387) | Network *NetworkBuilder::BuildLSTMXYQuad(int num_inputs, int num_state...
function Network (line 405) | static Network *BuildFullyConnected(const StaticShape &input_shape, Ne...
function Network (line 426) | Network *NetworkBuilder::ParseFullyConnected(const StaticShape &input_...
function Network (line 445) | Network *NetworkBuilder::ParseOutput(const StaticShape &input_shape, c...
FILE: src/training/common/networkbuilder.h
function namespace (line 28) | namespace tesseract {
FILE: src/training/common/sampleiterator.cpp
type tesseract (line 25) | namespace tesseract {
function TrainingSample (line 102) | const TrainingSample &SampleIterator::GetSample() const {
function TrainingSample (line 113) | TrainingSample *SampleIterator::MutableSample() const {
function MapFeatures (line 208) | static void MapFeatures(TrainingSample &s, const IntFeatureMap &featur...
function UnicharAndFonts (line 263) | const UnicharAndFonts *SampleIterator::GetShapeEntry() const {
FILE: src/training/common/sampleiterator.h
function namespace (line 19) | namespace tesseract {
FILE: src/training/common/trainingsampleset.cpp
type tesseract (line 36) | namespace tesseract {
function TrainingSample (line 218) | const TrainingSample *TrainingSampleSet::GetSample(int index) const {
function TrainingSample (line 224) | const TrainingSample *TrainingSampleSet::GetSample(int font_id, int cl...
function TrainingSample (line 236) | TrainingSample *TrainingSampleSet::MutableSample(int font_id, int clas...
function BitVector (line 257) | const BitVector &TrainingSampleSet::GetCloudFeatures(int font_id, int ...
function AddNearFeatures (line 419) | static void AddNearFeatures(const IntFeatureMap &feature_map, int f, i...
function TrainingSample (line 502) | const TrainingSample *TrainingSampleSet::GetCanonicalSample(int font_i...
FILE: src/training/common/trainingsampleset.h
function namespace (line 25) | namespace tesseract {
FILE: src/training/dawg2wordlist.cpp
function LoadSquishedDawg (line 28) | static std::unique_ptr<tesseract::Dawg> LoadSquishedDawg(const UNICHARSE...
class WordOutputter (line 46) | class WordOutputter {
method WordOutputter (line 48) | WordOutputter(FILE *file) : file_(file) {}
method output_word (line 49) | void output_word(const char *word) {
function WriteDawgAsWordlist (line 58) | static int WriteDawgAsWordlist(const UNICHARSET &unicharset, const tesse...
function main (line 71) | int main(int argc, char *argv[]) {
FILE: src/training/degradeimage.cpp
type tesseract (line 27) | namespace tesseract {
type FactorNames (line 39) | enum FactorNames {
function Image (line 89) | Image DegradeImage(Image input, int exposure, TRand *randomizer, float...
function Image (line 179) | Image PrepareDistortedPix(const Image pix, bool perspective, bool inve...
function GeneratePerspectiveDistortion (line 222) | void GeneratePerspectiveDistortion(int width, int height, TRand *rando...
function ProjectiveCoeffs (line 263) | int ProjectiveCoeffs(int width, int height, TRand *randomizer, float *...
FILE: src/training/degradeimage.h
function namespace (line 26) | namespace tesseract {
FILE: src/training/lstmeval.cpp
function main (line 32) | int main(int argc, char **argv) {
FILE: src/training/lstmtraining.cpp
function main (line 76) | int main(int argc, char **argv) {
FILE: src/training/merge_unicharsets.cpp
function main (line 22) | int main(int argc, char **argv) {
FILE: src/training/mergenf.cpp
function MakeNewFromOld (line 194) | void MakeNewFromOld(PROTO_STRUCT *New, PROTOTYPE *Old) {
function SubfeatureEvidence (line 209) | float SubfeatureEvidence(FEATURE Feature, PROTO_STRUCT *Proto) {
function EvidenceOf (line 236) | double EvidenceOf(double Similarity) {
function DummyFastMatch (line 263) | bool DummyFastMatch(FEATURE Feature, PROTO_STRUCT *Proto) {
function ComputePaddedBoundingBox (line 295) | void ComputePaddedBoundingBox(PROTO_STRUCT *Proto, float TangentPad, flo...
function PointInside (line 319) | bool PointInside(FRECT *Rectangle, float X, float Y) {
FILE: src/training/mergenf.h
type FRECT (line 41) | struct FRECT {
FILE: src/training/mftraining.cpp
function DisplayProtoList (line 57) | static void DisplayProtoList(const char *ch, LIST protolist) {
function LIST (line 91) | static LIST ClusterOneConfig(int shape_id, const char *class_label, LIST...
function SetupConfigMap (line 148) | static void SetupConfigMap(ShapeTable *shape_table, IndexMapBiDi *config...
function main (line 194) | int main(int argc, char **argv) {
FILE: src/training/pango/boxchar.cpp
type tesseract (line 38) | namespace tesseract {
FILE: src/training/pango/boxchar.h
function namespace (line 34) | namespace tesseract {
FILE: src/training/pango/ligature_table.cpp
type tesseract (line 34) | namespace tesseract {
function EncodeAsUTF8 (line 36) | static std::string EncodeAsUTF8(const char32 ch32) {
function LigatureTable (line 51) | LigatureTable *LigatureTable::Get() {
FILE: src/training/pango/ligature_table.h
function namespace (line 31) | namespace tesseract {
FILE: src/training/pango/pango_font_info.cpp
type tesseract (line 54) | namespace tesseract {
function PangoGlyph (line 63) | static PangoGlyph get_glyph(PangoFont *font, gunichar wc) {
function ListFontFamilies (line 163) | static void ListFontFamilies(PangoFontFamily ***families, int *n_famil...
function PangoFont (line 201) | PangoFont *PangoFontInfo::ToPangoFont() const {
function ShouldIgnoreFontFamilyName (line 538) | static bool ShouldIgnoreFontFamilyName(const char *query) {
FILE: src/training/pango/pango_font_info.h
function namespace (line 38) | namespace tesseract {
FILE: src/training/pango/stringrenderer.cpp
type tesseract (line 45) | namespace tesseract {
function IsCombiner (line 54) | static bool IsCombiner(int ch) {
function EncodeAsUTF8 (line 60) | static std::string EncodeAsUTF8(const char32 ch32) {
function RandBool (line 66) | static bool RandBool(const double prob, TRand *rand) {
function Image (line 77) | static Image CairoARGB32ToPixFormat(cairo_surface_t *surface) {
function Boxa (line 332) | Boxa *StringRenderer::GetPageBoxes() const {
function MergeBoxCharsToWords (line 411) | static void MergeBoxCharsToWords(std::vector<BoxChar *> *boxchars) {
FILE: src/training/pango/stringrenderer.h
type Boxa (line 43) | struct Boxa
type Pix (line 44) | struct Pix
function namespace (line 46) | namespace tesseract {
FILE: src/training/set_unicharset_properties.cpp
function main (line 25) | int main(int argc, char **argv) {
FILE: src/training/text2image.cpp
type SpacingProperties (line 201) | struct SpacingProperties {
method SpacingProperties (line 202) | SpacingProperties() : x_gap_before(0), x_gap_after(0) {}
method SpacingProperties (line 203) | SpacingProperties(int b, int a) : x_gap_before(b), x_gap_after(a) {}
function main (line 714) | int main(int argc, char **argv) {
FILE: src/training/unicharset/fileio.cpp
type tesseract (line 36) | namespace tesseract {
function FILE (line 41) | FILE *File::Open(const std::string &filename, const std::string &mode) {
function FILE (line 45) | FILE *File::OpenOrDie(const std::string &filename, const std::string &...
FILE: src/training/unicharset/fileio.h
function namespace (line 29) | namespace tesseract {
FILE: src/training/unicharset/icuerrorcode.cpp
type tesseract (line 17) | namespace tesseract {
FILE: src/training/unicharset/icuerrorcode.h
function namespace (line 43) | namespace tesseract {
FILE: src/training/unicharset/lang_model_helpers.cpp
type tesseract (line 33) | namespace tesseract {
function WriteFile (line 40) | bool WriteFile(const std::string &output_dir, const std::string &lang,...
function ReadFile (line 63) | std::string ReadFile(const std::string &filename, FileReader reader) {
function WriteUnicharset (line 82) | bool WriteUnicharset(const UNICHARSET &unicharset, const std::string &...
function WriteRecoder (line 97) | bool WriteRecoder(const UNICHARSET &unicharset, bool pass_through, con...
function WriteDawg (line 137) | static bool WriteDawg(const std::vector<std::string> &words, const UNI...
function WriteDawgs (line 161) | static bool WriteDawgs(const std::vector<std::string> &words, const st...
function CombineLangModel (line 194) | int CombineLangModel(const UNICHARSET &unicharset, const std::string &...
FILE: src/training/unicharset/lang_model_helpers.h
function namespace (line 26) | namespace tesseract {
FILE: src/training/unicharset/lstmtester.cpp
type tesseract (line 23) | namespace tesseract {
FILE: src/training/unicharset/lstmtester.h
function namespace (line 29) | namespace tesseract {
FILE: src/training/unicharset/lstmtrainer.cpp
type tesseract (line 41) | namespace tesseract {
function Trainability (line 216) | Trainability LSTMTrainer::GridSearchDictParams(
function SubTrainerResult (line 613) | SubTrainerResult LSTMTrainer::UpdateSubtrainer(std::stringstream &log_...
type WhichWay (line 676) | enum WhichWay {
function Trainability (line 849) | Trainability LSTMTrainer::TrainOnLine(const ImageData *trainingdata,
function Trainability (line 882) | Trainability LSTMTrainer::PrepareForBackward(const ImageData *training...
FILE: src/training/unicharset/lstmtrainer.h
function namespace (line 30) | namespace tesseract {
FILE: src/training/unicharset/normstrngs.cpp
type tesseract (line 35) | namespace tesseract {
function is_hyphen_punc (line 37) | static bool is_hyphen_punc(const char32 ch) {
function is_single_quote (line 64) | static bool is_single_quote(const char32 ch) {
function is_double_quote (line 84) | static bool is_double_quote(const char32 ch) {
function NormalizeUTF8ToUTF32 (line 107) | static void NormalizeUTF8ToUTF32(UnicodeNormMode u_mode, OCRNorm ocr_n...
function StripJoiners (line 141) | static void StripJoiners(std::vector<char32> *str32) {
function NormalizeUTF8String (line 159) | bool NormalizeUTF8String(UnicodeNormMode u_mode, OCRNorm ocr_normalize,
function NormalizeCleanAndSegmentUTF8 (line 186) | bool NormalizeCleanAndSegmentUTF8(UnicodeNormMode u_mode, OCRNorm ocr_...
function char32 (line 215) | char32 OCRNormalize(char32 ch) {
function IsOCREquivalent (line 226) | bool IsOCREquivalent(char32 ch1, char32 ch2) {
function IsValidCodepoint (line 230) | bool IsValidCodepoint(const char32 ch) {
function IsWhitespace (line 235) | bool IsWhitespace(const char32 ch) {
function IsUTF8Whitespace (line 240) | bool IsUTF8Whitespace(const char *text) {
function SpanUTF8Whitespace (line 244) | unsigned int SpanUTF8Whitespace(const char *text) {
function SpanUTF8NotWhitespace (line 256) | unsigned int SpanUTF8NotWhitespace(const char *text) {
function IsInterchangeValid (line 268) | bool IsInterchangeValid(const char32 ch) {
function IsInterchangeValid7BitAscii (line 283) | bool IsInterchangeValid7BitAscii(const char32 ch) {
function char32 (line 289) | char32 FullwidthToHalfwidth(const char32 ch) {
FILE: src/training/unicharset/normstrngs.h
type class (line 34) | enum class
type class (line 43) | enum class
function GraphemeNorm (line 51) | enum class GraphemeNorm {
FILE: src/training/unicharset/unicharset_training_utils.cpp
type tesseract (line 36) | namespace tesseract {
function SetupBasicProperties (line 40) | void SetupBasicProperties(bool report_errors, bool decompose, UNICHARS...
function SetScriptProperties (line 145) | void SetScriptProperties(const std::string &script_dir, UNICHARSET *un...
function GetXheightString (line 166) | std::string GetXheightString(const std::string &script_dir, const UNIC...
function SetPropertiesForInputFile (line 184) | void SetPropertiesForInputFile(const std::string &script_dir,
FILE: src/training/unicharset/unicharset_training_utils.h
function namespace (line 28) | namespace tesseract {
FILE: src/training/unicharset/validate_grapheme.cpp
type tesseract (line 5) | namespace tesseract {
function IsThaiConsonant (line 129) | static bool IsThaiConsonant(char32 ch) {
function IsThaiBeforeConsonantVowel (line 134) | static bool IsThaiBeforeConsonantVowel(char32 ch) {
function IsThaiToneMark (line 139) | static bool IsThaiToneMark(char32 ch) {
function IsThaiTonableVowel (line 145) | static bool IsThaiTonableVowel(char32 ch) {
FILE: src/training/unicharset/validate_grapheme.h
function namespace (line 6) | namespace tesseract {
FILE: src/training/unicharset/validate_indic.cpp
type tesseract (line 5) | namespace tesseract {
FILE: src/training/unicharset/validate_indic.h
function namespace (line 6) | namespace tesseract {
FILE: src/training/unicharset/validate_javanese.cpp
type tesseract (line 22) | namespace tesseract {
FILE: src/training/unicharset/validate_javanese.h
function namespace (line 24) | namespace tesseract {
FILE: src/training/unicharset/validate_khmer.cpp
type tesseract (line 5) | namespace tesseract {
FILE: src/training/unicharset/validate_khmer.h
function namespace (line 6) | namespace tesseract {
FILE: src/training/unicharset/validate_myanmar.cpp
type tesseract (line 8) | namespace tesseract {
FILE: src/training/unicharset/validate_myanmar.h
function namespace (line 6) | namespace tesseract {
FILE: src/training/unicharset/validator.cpp
type tesseract (line 17) | namespace tesseract {
function CmpPairSecond (line 128) | static bool CmpPairSecond(const std::pair<int, int> &p1, const std::pa...
function ViramaScript (line 135) | ViramaScript Validator::MostFrequentViramaScript(const std::vector<cha...
FILE: src/training/unicharset/validator.h
type class (line 36) | enum class
type class (line 55) | enum class
function class (line 74) | class TESS_UNICHARSET_TRAINING_API Validator {
FILE: src/training/unicharset_extractor.cpp
type tesseract (line 40) | namespace tesseract {
function AddStringsToUnicharset (line 44) | static void AddStringsToUnicharset(const std::vector<std::string> &str...
function Main (line 64) | static int Main(int argc, char **argv) {
function main (line 103) | int main(int argc, char **argv) {
FILE: src/training/wordlist2dawg.cpp
function main (line 33) | int main(int argc, char **argv) {
FILE: src/viewer/scrollview.cpp
type tesseract (line 43) | namespace tesseract {
type SVPolyLineBuffer (line 48) | struct SVPolyLineBuffer {
FILE: src/viewer/scrollview.h
function namespace (line 42) | namespace tesseract {
function class (line 92) | class TESS_API SVEventHandler {
function class (line 109) | class TESS_API ScrollView {
FILE: src/viewer/svmnode.cpp
type tesseract (line 42) | namespace tesseract {
function SVMenuNode (line 59) | SVMenuNode *SVMenuNode::AddChild(const char *txt) {
FILE:
Condensed preview — 725 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (8,529K chars).
[
{
"path": ".clang-format",
"chars": 486,
"preview": "BasedOnStyle: Google\n\n# Modifications for Tesseract.\n\n# Only merge empty functions.\nAllowShortFunctionsOnASingleLine: Em"
},
{
"path": ".gitattributes",
"chars": 12,
"preview": "* text=auto\n"
},
{
"path": ".github/ISSUE_TEMPLATE/issue-bug.yml",
"chars": 3048,
"preview": "name: Bug Report\ndescription: File a bug report\nbody:\n - type: markdown\n attributes:\n value: |\n ### Atte"
},
{
"path": ".github/ISSUE_TEMPLATE/issue-feature-request.yml",
"chars": 290,
"preview": "name: Feature Request\ndescription: File a feature request\nbody:\n - type: textarea\n attributes:\n label: Your Fea"
},
{
"path": ".github/copilot-instructions.md",
"chars": 11449,
"preview": "# Tesseract OCR - GitHub Copilot Instructions\n\n## Repository Overview\n\nTesseract is an open-source **OCR (Optical Charac"
},
{
"path": ".github/dependabot.yml",
"chars": 536,
"preview": "# To get started with Dependabot version updates, you'll need to specify which\n# package ecosystems to update and where "
},
{
"path": ".github/workflows/autotools-macos.yml",
"chars": 7253,
"preview": "name: autotools-macos\n# autotools build of tesseract and training tools on macos homebrew and macports.\n# run command li"
},
{
"path": ".github/workflows/autotools-openmp.yml",
"chars": 2986,
"preview": "name: autotools-openmp\n# autotools on Ubuntu - run benchmark test. '--enable-openmp' no training tools\non:\n #push:\n #s"
},
{
"path": ".github/workflows/autotools.yml",
"chars": 4761,
"preview": "name: autotools\n# autotools build of tesseract and training tools on Ubuntu.\n# run command line tests, basicapitest and "
},
{
"path": ".github/workflows/cifuzz.yml",
"chars": 848,
"preview": "name: CIFuzz\n# OSS-Fuzz CI\n# See https://google.github.io/oss-fuzz/getting-started/continuous-integration/\non:\n pull_re"
},
{
"path": ".github/workflows/cmake-win64.yml",
"chars": 5622,
"preview": "# Based on https://github.com/zdenop/tesserocr/actions/runs/691257659/workflow\n# Build Tesseract on Windows using cmake."
},
{
"path": ".github/workflows/cmake.yml",
"chars": 6275,
"preview": "name: cmake\n# cmake build of tesseract and training tools on ubuntu and macOS homebrew using Ninja.\n# test command line "
},
{
"path": ".github/workflows/codeql-analysis.yml",
"chars": 2582,
"preview": "# For most projects, this workflow file will not need changing; you simply need\n# to commit it to your repository.\n#\n# Y"
},
{
"path": ".github/workflows/installer-for-windows.yml",
"chars": 667,
"preview": "# GitHub actions - Create Tesseract installer for Windows\n\nname: Cross build for Windows\n\non:\n # Trigger workflow in Gi"
},
{
"path": ".github/workflows/msys2.yml",
"chars": 2474,
"preview": "name: msys2\n# msys2 build for tesseract -head from main branch.\non:\n #push:\n schedule:\n - cron: 0 17 * * *\njobs:\n "
},
{
"path": ".github/workflows/sw.yml",
"chars": 3029,
"preview": "name: sw\n\non:\n schedule:\n # every 3rd day\n - cron: 0 0 */3 * *\n\njobs:\n build:\n runs-on: ${{ matrix.os }}\n "
},
{
"path": ".github/workflows/unittest-disablelegacy.yml",
"chars": 2098,
"preview": "name: unittest-disablelegacy\n# autotools build on ubuntu, unittests with disabled legacy engine.\n# currently some unitte"
},
{
"path": ".github/workflows/unittest-macos.yml",
"chars": 2477,
"preview": "name: unittest-macos\n# autotools build on homebrew. unittests with address sanitizers. with openmp.\non:\n #push:\n sched"
},
{
"path": ".github/workflows/unittest.yml",
"chars": 2997,
"preview": "name: unittest\n# autotools build on ubuntu. unittests with address sanitizers. with openmp.\n# ubuntu-20.04-gcc-unittest "
},
{
"path": ".github/workflows/vcpkg.yml",
"chars": 4504,
"preview": "name: vcpkg\n# build and test of tesseract on windows using vcpkg and cmake.\n# vcpkg with -head does not work. https://gi"
},
{
"path": ".gitignore",
"chars": 1581,
"preview": "*~\n# Windows\n*.user.*\n*.idea*\n*.log\n*.tlog\n*.cache\n*.obj\n*.sdf\n*.opensdf\n*.lastbuildstate\n*.unsuccessfulbuild\n*.suo\n*.re"
},
{
"path": ".gitmodules",
"chars": 194,
"preview": "[submodule \"googletest\"]\n\tpath = unittest/third_party/googletest\n\turl = https://github.com/google/googletest.git\n[submod"
},
{
"path": ".mailmap",
"chars": 1262,
"preview": "Amit Dovev <amitdev2222@gmail.com>\n\nEgor Pugin <egor.pugin@gmail.com>\n\nJeff Breidenbach <breidenbach@gmail.com> <jbreide"
},
{
"path": "AUTHORS",
"chars": 785,
"preview": "Ray Smith (lead developer) <theraysmith@gmail.com>\nAhmad Abdulkader\nRika Antonova\nNicholas Beato\nJeff Breidenbach\nSamuel"
},
{
"path": "CITATIONS.bib",
"chars": 2851,
"preview": "@inproceedings{TableDetect,\n author = {Faisal Shafait and Ray Smith},\n booktitle = {Document Analysis Systems},\n edit"
},
{
"path": "CMakeLists.txt",
"chars": 37891,
"preview": "#\n# tesseract\n#\n\n# ##############################################################################\n#\n# cmake settings\n#\n#"
},
{
"path": "CONTRIBUTING.md",
"chars": 6112,
"preview": "# Contributing\n\n**Please follow these rules and advice**.\n\n## Creating an Issue or Using the Forum\n\nIf you think you fou"
},
{
"path": "ChangeLog",
"chars": 285,
"preview": "The ChangeLog for all releases from 1.0 (2006-06-16) up to 5.0.0 (2024-11-10)\nis available here:\n\nhttps://github.com/tes"
},
{
"path": "INSTALL",
"chars": 9307,
"preview": "Copyright 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software\nFoundation, Inc.\n\n This file is free documentation; t"
},
{
"path": "INSTALL.GIT.md",
"chars": 2201,
"preview": "## autotools (LINUX/UNIX , msys...)\n\nIf you have cloned Tesseract from GitHub, you must generate\nthe configure script.\n\n"
},
{
"path": "LICENSE",
"chars": 11358,
"preview": "\n Apache License\n Version 2.0, January 2004\n "
},
{
"path": "Makefile.am",
"chars": 62374,
"preview": "## run autogen.sh to create Makefile.in from this file\nACLOCAL_AMFLAGS = -I m4\n\n.PHONY: doc html install-langs ScrollVie"
},
{
"path": "README.md",
"chars": 8140,
"preview": "# Tesseract OCR\n\n[](https://sca"
},
{
"path": "VERSION",
"chars": 6,
"preview": "5.5.2\n"
},
{
"path": "appveyor.yml",
"chars": 1510,
"preview": "environment:\n matrix:\n - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022\n platform: Win64\n\nconfiguration:\n - R"
},
{
"path": "autogen.sh",
"chars": 4021,
"preview": "#!/bin/sh\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compli"
},
{
"path": "cmake/BuildFunctions.cmake",
"chars": 1041,
"preview": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with "
},
{
"path": "cmake/BuildOptimizations.cmake",
"chars": 5655,
"preview": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with "
},
{
"path": "cmake/CheckFunctions.cmake",
"chars": 2437,
"preview": "# Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n# use this file except in compliance with "
},
{
"path": "cmake/Configure.cmake",
"chars": 4216,
"preview": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with "
},
{
"path": "cmake/SourceGroups.cmake",
"chars": 1429,
"preview": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with "
},
{
"path": "cmake/SourceLists.cmake",
"chars": 15547,
"preview": "# Source file lists for tesseract\n# This file contains all source files organized by module\n\n# API module sources\nset(TE"
},
{
"path": "cmake/templates/TesseractConfig.cmake.in",
"chars": 1710,
"preview": "# ===================================================================================\n# The Tesseract CMake configurati"
},
{
"path": "cmake/templates/cmake_uninstall.cmake.in",
"chars": 1093,
"preview": "# https://gitlab.kitware.com/cmake/community/wikis/FAQ#can-i-do-make-uninstall-with-cmake\nif(NOT EXISTS \"@CMAKE_BINARY_D"
},
{
"path": "configure.ac",
"chars": 20043,
"preview": "# -*-Shell-script-*-\n#\n# Copyright (c) Luc Vincent\n\n# ----------------------------------------\n# Initialization\n# ------"
},
{
"path": "doc/Doxyfile",
"chars": 112410,
"preview": "# Doxyfile 1.8.16\n\n# This file describes the settings to be used by the documentation system\n# doxygen (www.doxygen.org)"
},
{
"path": "doc/ambiguous_words.1.asc",
"chars": 796,
"preview": "AMBIGUOUS_WORDS(1)\n==================\n:doctype: manpage\n\nNAME\n----\nambiguous_words - generate sets of words Tesseract is"
},
{
"path": "doc/classifier_tester.1.asc",
"chars": 1609,
"preview": "CLASSIFIER_TESTER(1)\n====================\n\nNAME\n----\nclassifier_tester - for *legacy tesseract* engine.\n\nSYNOPSIS\n------"
},
{
"path": "doc/cntraining.1.asc",
"chars": 771,
"preview": "CNTRAINING(1)\n=============\n\nNAME\n----\ncntraining - character normalization training for Tesseract\n\nSYNOPSIS\n--------\n*c"
},
{
"path": "doc/combine_lang_model.1.asc",
"chars": 2937,
"preview": "COMBINE_LANG_MODEL(1)\n=====================\n:doctype: manpage\n\nNAME\n----\ncombine_lang_model - generate starter trainedda"
},
{
"path": "doc/combine_tessdata.1.asc",
"chars": 7098,
"preview": "COMBINE_TESSDATA(1)\n===================\n\nNAME\n----\ncombine_tessdata - combine/extract/overwrite/list/compact Tesseract d"
},
{
"path": "doc/dawg2wordlist.1.asc",
"chars": 971,
"preview": "DAWG2WORDLIST(1)\n================\n:doctype: manpage\n\nNAME\n----\ndawg2wordlist - convert a Tesseract DAWG to a wordlist\n\nS"
},
{
"path": "doc/generate_manpages.sh",
"chars": 1298,
"preview": "#!/bin/bash\n#\n# File: generate_manpages.sh\n# Description: Converts .asc files into man pages, etc. for Tesserac"
},
{
"path": "doc/lstmeval.1.asc",
"chars": 1736,
"preview": "LSTMEVAL(1)\n===========\n:doctype: manpage\n\nNAME\n----\nlstmeval - Evaluation program for LSTM-based networks.\n\nSYNOPSIS\n--"
},
{
"path": "doc/lstmtraining.1.asc",
"chars": 3842,
"preview": "LSTMTRAINING(1)\n===============\n:doctype: manpage\n\nNAME\n----\nlstmtraining - Training program for LSTM-based networks.\n\nS"
},
{
"path": "doc/merge_unicharsets.1.asc",
"chars": 1252,
"preview": "MERGE_UNICHARSETS(1)\n====================\n:doctype: manpage\n\nNAME\n----\nmerge_unicharsets - Simple tool to merge two or m"
},
{
"path": "doc/mftraining.1.asc",
"chars": 1647,
"preview": "MFTRAINING(1)\n=============\n:doctype: manpage\n\nNAME\n----\nmftraining - feature training for Tesseract\n\nSYNOPSIS\n--------\n"
},
{
"path": "doc/set_unicharset_properties.1.asc",
"chars": 1428,
"preview": "SET_UNICHARSET_PROPERTIES(1)\n============================\n:doctype: manpage\n\nNAME\n----\nset_unicharset_properties - set "
},
{
"path": "doc/shapeclustering.1.asc",
"chars": 1674,
"preview": "SHAPECLUSTERING(1)\n==================\n:doctype: manpage\n\nNAME\n----\nshapeclustering - shape clustering training for Tesse"
},
{
"path": "doc/tesseract.1.asc",
"chars": 15604,
"preview": "TESSERACT(1)\n============\n:doctype: manpage\n\nNAME\n----\ntesseract - command-line OCR engine\n\nSYNOPSIS\n--------\n*tesseract"
},
{
"path": "doc/tesseract.natvis",
"chars": 896,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<AutoVisualizer xmlns=\"http://schemas.microsoft.com/vstudio/debugger/natvis/2010\""
},
{
"path": "doc/text2image.1.asc",
"chars": 5670,
"preview": "TEXT2IMAGE(1)\n=============\n:doctype: manpage\n\nNAME\n----\ntext2image - generate OCR training pages.\n\nSYNOPSIS\n--------\n*t"
},
{
"path": "doc/unicharambigs.5.asc",
"chars": 2973,
"preview": "UNICHARAMBIGS(5)\n================\n\nNAME\n----\nunicharambigs - Tesseract unicharset ambiguities\n\nDESCRIPTION\n-----------\nT"
},
{
"path": "doc/unicharset.5.asc",
"chars": 5234,
"preview": "UNICHARSET(5)\n=============\n:doctype: manpage\n\nNAME\n----\nunicharset - character properties file used by tesseract(1)\n\nDE"
},
{
"path": "doc/unicharset_extractor.1.asc",
"chars": 1307,
"preview": "UNICHARSET_EXTRACTOR(1)\n=======================\n\nNAME\n----\nunicharset_extractor - Reads box or plain text files to extra"
},
{
"path": "doc/wordlist2dawg.1.asc",
"chars": 1530,
"preview": "WORDLIST2DAWG(1)\n================\n:doctype: manpage\n\nNAME\n----\nwordlist2dawg - convert a wordlist to a DAWG for Tesserac"
},
{
"path": "include/tesseract/baseapi.h",
"chars": 31766,
"preview": "// SPDX-License-Identifier: Apache-2.0\n// File: baseapi.h\n// Description: Simple API for calling tesseract.\n// Au"
},
{
"path": "include/tesseract/capi.h",
"chars": 25425,
"preview": "// SPDX-License-Identifier: Apache-2.0\n// File: capi.h\n// Description: C-API TessBaseAPI\n//\n// (C) Copyright 2012"
},
{
"path": "include/tesseract/export.h",
"chars": 1214,
"preview": "// SPDX-License-Identifier: Apache-2.0\n// File: export.h\n// Description: Place holder\n//\n// (C) Copyright 2006, G"
},
{
"path": "include/tesseract/ltrresultiterator.h",
"chars": 10291,
"preview": "// SPDX-License-Identifier: Apache-2.0\n// File: ltrresultiterator.h\n// Description: Iterator for tesseract result"
},
{
"path": "include/tesseract/ocrclass.h",
"chars": 7176,
"preview": "// SPDX-License-Identifier: Apache-2.0\n/**********************************************************************\n * File: "
},
{
"path": "include/tesseract/osdetect.h",
"chars": 4397,
"preview": "// SPDX-License-Identifier: Apache-2.0\n// File: osdetect.h\n// Description: Orientation and script detection.\n// A"
},
{
"path": "include/tesseract/pageiterator.h",
"chars": 15156,
"preview": "// SPDX-License-Identifier: Apache-2.0\n// File: pageiterator.h\n// Description: Iterator for tesseract page struct"
},
{
"path": "include/tesseract/publictypes.h",
"chars": 12068,
"preview": "// SPDX-License-Identifier: Apache-2.0\n// File: publictypes.h\n// Description: Types used in both the API and inte"
},
{
"path": "include/tesseract/renderer.h",
"chars": 10417,
"preview": "// SPDX-License-Identifier: Apache-2.0\n// File: renderer.h\n// Description: Rendering interface to inject into Tes"
},
{
"path": "include/tesseract/resultiterator.h",
"chars": 9484,
"preview": "// SPDX-License-Identifier: Apache-2.0\n// File: resultiterator.h\n// Description: Iterator for tesseract results t"
},
{
"path": "include/tesseract/unichar.h",
"chars": 6305,
"preview": "// SPDX-License-Identifier: Apache-2.0\n// File: unichar.h\n// Description: Unicode character/ligature class.\n// Au"
},
{
"path": "include/tesseract/version.h.in",
"chars": 1188,
"preview": "// SPDX-License-Identifier: Apache-2.0\n// File: version.h\n// Description: Version information\n//\n// (C) Copyright"
},
{
"path": "java/Makefile.am",
"chars": 2909,
"preview": "SUBDIRS = com\nscrollview_path = @datadir@/tessdata\n\nJAVAC = javac\nJAR = jar\n\nif !GRAPHICS_DISABLED\nSCROLLVIEW_FILES = \\\n"
},
{
"path": "java/Manifest.txt",
"chars": 143,
"preview": "Main-Class: com/google/scrollview/ScrollView\nClass-Path: ScrollView.jar piccolo2d-core-3.0.1.jar piccolo2d-extras-3.0.1."
},
{
"path": "java/com/Makefile.am",
"chars": 17,
"preview": "SUBDIRS = google\n"
},
{
"path": "java/com/google/Makefile.am",
"chars": 21,
"preview": "SUBDIRS = scrollview\n"
},
{
"path": "java/com/google/scrollview/Makefile.am",
"chars": 56,
"preview": "SUBDIRS = events ui\n\nEXTRA_DIST = \\\n ScrollView.java\n"
},
{
"path": "java/com/google/scrollview/ScrollView.java",
"chars": 17167,
"preview": "// Copyright 2007 Google Inc. All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");"
},
{
"path": "java/com/google/scrollview/events/Makefile.am",
"chars": 86,
"preview": "SUBDIRS =\n\nEXTRA_DIST = \\\n SVEvent.java SVEventHandler.java \\\n SVEventType.java\n"
},
{
"path": "java/com/google/scrollview/events/SVEvent.java",
"chars": 2942,
"preview": "// Copyright 2007 Google Inc. All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");"
},
{
"path": "java/com/google/scrollview/events/SVEventHandler.java",
"chars": 9825,
"preview": "// Copyright 2007 Google Inc. All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");"
},
{
"path": "java/com/google/scrollview/events/SVEventType.java",
"chars": 1456,
"preview": "// Copyright 2007 Google Inc. All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");"
},
{
"path": "java/com/google/scrollview/ui/Makefile.am",
"chars": 218,
"preview": "SUBDIRS =\n\nEXTRA_DIST = \\\n SVAbstractMenuItem.java \\\n SVCheckboxMenuItem.java SVEmptyMenuItem.java \\\n SVImageHa"
},
{
"path": "java/com/google/scrollview/ui/SVAbstractMenuItem.java",
"chars": 1935,
"preview": "// Copyright 2007 Google Inc. All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");"
},
{
"path": "java/com/google/scrollview/ui/SVCheckboxMenuItem.java",
"chars": 1939,
"preview": "// Copyright 2007 Google Inc. All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");"
},
{
"path": "java/com/google/scrollview/ui/SVEmptyMenuItem.java",
"chars": 1799,
"preview": "// Copyright 2007 Google Inc. All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");"
},
{
"path": "java/com/google/scrollview/ui/SVImageHandler.java",
"chars": 2659,
"preview": "// Copyright 2007 Google Inc. All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");"
},
{
"path": "java/com/google/scrollview/ui/SVMenuBar.java",
"chars": 4362,
"preview": "// Copyright 2007 Google Inc. All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");"
},
{
"path": "java/com/google/scrollview/ui/SVMenuItem.java",
"chars": 2085,
"preview": "// Copyright 2007 Google Inc. All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");"
},
{
"path": "java/com/google/scrollview/ui/SVPopupMenu.java",
"chars": 4930,
"preview": "// Copyright 2007 Google Inc. All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");"
},
{
"path": "java/com/google/scrollview/ui/SVSubMenuItem.java",
"chars": 1424,
"preview": "// Copyright 2007 Google Inc. All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");"
},
{
"path": "java/com/google/scrollview/ui/SVWindow.java",
"chars": 21613,
"preview": "// Copyright 2007 Google Inc. All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");"
},
{
"path": "nsis/Makefile.am",
"chars": 674,
"preview": "AUTOMAKE_OPTIONS = subdir-objects\n\nall:\n\nif MINGW\n\ngitrev=\"$(shell git --git-dir=${abs_top_srcdir}/.git --work-tree=${ab"
},
{
"path": "nsis/build.sh",
"chars": 3290,
"preview": "#!/bin/bash\n\n# GitHub actions - Create Tesseract installer for Windows\n\n# Author: Stefan Weil (2010-2024)\n\nset -e\nset -x"
},
{
"path": "nsis/find_deps.py",
"chars": 1820,
"preview": "#!/usr/bin/env python3\n#\n# Copyright (C) 2024 Stefan Weil\n#\n# SPDX-License-Identifier: MIT\n#\n# Find the DLL files which "
},
{
"path": "nsis/include/EnvVarUpdate.nsh",
"chars": 10274,
"preview": "/**\n * EnvVarUpdate.nsh\n * : Environmental Variables: append, prepend, and remove entries\n *\n * WARNING: If you "
},
{
"path": "nsis/tesseract.nsi",
"chars": 43285,
"preview": "; (C) Copyright 2010, Sergey Bronnikov\n; (C) Copyright 2010-2012, Zdenko Podobný\n; (C) Copyright 2015-2024 Stefan Weil\n;"
},
{
"path": "nsis/winpath.cpp",
"chars": 860,
"preview": "// Copyright (C) 2024 Stefan Weil\n//\n// SPDX-License-Identifier: Apache-2.0\n//\n// winpath - run a Windows program with e"
},
{
"path": "snap/snapcraft.yaml",
"chars": 1310,
"preview": "name: tesseract\nversion: git\nsummary: open source optical character recognition engine\ndescription: |\n Tesseract has un"
},
{
"path": "src/api/altorenderer.cpp",
"chars": 8692,
"preview": "// File: altorenderer.cpp\n// Description: ALTO rendering interface\n// Author: Jake Sebright\n\n// (C) Copyrigh"
},
{
"path": "src/api/baseapi.cpp",
"chars": 80957,
"preview": "/**********************************************************************\n * File: baseapi.cpp\n * Description: Simp"
},
{
"path": "src/api/capi.cpp",
"chars": 23672,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: capi.cpp\n// Description: C-API T"
},
{
"path": "src/api/hocrrenderer.cpp",
"chars": 19306,
"preview": "/**********************************************************************\n * File: hocrrenderer.cpp\n * Description:"
},
{
"path": "src/api/lstmboxrenderer.cpp",
"chars": 4187,
"preview": "/**********************************************************************\n * File: lstmboxrenderer.cpp\n * Descripti"
},
{
"path": "src/api/pagerenderer.cpp",
"chars": 37361,
"preview": "// File: pagerenderer.cpp\n// Description: PAGE XML rendering interface\n// Author: Jan Kamlah\n\n// (C) Copyrig"
},
{
"path": "src/api/pdf_ttf.h",
"chars": 4580,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: pdf_ttf.h\n// Description: pdf.tt"
},
{
"path": "src/api/pdfrenderer.cpp",
"chars": 33183,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: pdfrenderer.cpp\n// Description: "
},
{
"path": "src/api/renderer.cpp",
"chars": 6615,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: renderer.cpp\n// Description: Ren"
},
{
"path": "src/api/wordstrboxrenderer.cpp",
"chars": 4082,
"preview": "/**********************************************************************\n * File: wordstrboxrenderer.cpp\n * Descri"
},
{
"path": "src/arch/dotproduct.cpp",
"chars": 1203,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: dotproduct.cpp\n// Description: N"
},
{
"path": "src/arch/dotproduct.h",
"chars": 1689,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: dotproduct.h\n// Description: Nat"
},
{
"path": "src/arch/dotproductavx.cpp",
"chars": 2682,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: dotproductavx.cpp\n// Description"
},
{
"path": "src/arch/dotproductavx512.cpp",
"chars": 2202,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: dotproductavx512.cpp\n// Descript"
},
{
"path": "src/arch/dotproductfma.cpp",
"chars": 2808,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: dotproductfma.cpp\n// Description"
},
{
"path": "src/arch/dotproductneon.cpp",
"chars": 2092,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: dotproductneon.cpp\n// Descriptio"
},
{
"path": "src/arch/dotproductsse.cpp",
"chars": 4762,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: dotproductsse.cpp\n// Description"
},
{
"path": "src/arch/intsimdmatrix.cpp",
"chars": 4895,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: intsimdmatrix.cpp\n// Description"
},
{
"path": "src/arch/intsimdmatrix.h",
"chars": 5989,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: intsimdmatrix.h\n// Description: "
},
{
"path": "src/arch/intsimdmatrixavx2.cpp",
"chars": 28226,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: intsimdmatrixavx2.cpp\n// Descrip"
},
{
"path": "src/arch/intsimdmatrixneon.cpp",
"chars": 10754,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: intsimdmatrixneon.cpp\n// Descrip"
},
{
"path": "src/arch/intsimdmatrixrvv.cpp",
"chars": 3125,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: intsimdmatrixrvv.cpp\n// Descript"
},
{
"path": "src/arch/intsimdmatrixsse.cpp",
"chars": 3888,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: intsindmatrixsse.cpp\n// Descript"
},
{
"path": "src/arch/simddetect.cpp",
"chars": 12372,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: simddetect.cpp\n// Description: A"
},
{
"path": "src/arch/simddetect.h",
"chars": 3615,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: simddetect.h\n// Description: Arc"
},
{
"path": "src/ccmain/adaptions.cpp",
"chars": 3439,
"preview": "/**********************************************************************\n * File: adaptions.cpp (Formerly adaptio"
},
{
"path": "src/ccmain/applybox.cpp",
"chars": 32957,
"preview": "/**********************************************************************\n * File: applybox.cpp (Formerly applybox"
},
{
"path": "src/ccmain/control.cpp",
"chars": 78783,
"preview": "/******************************************************************\n * File: control.cpp (Formerly control.c)\n *"
},
{
"path": "src/ccmain/control.h",
"chars": 1295,
"preview": "/**********************************************************************\n * File: control.h (Formerly control.h)\n"
},
{
"path": "src/ccmain/docqual.cpp",
"chars": 32627,
"preview": "/******************************************************************\n * File: docqual.cpp (Formerly docqual.c)\n *"
},
{
"path": "src/ccmain/docqual.h",
"chars": 1200,
"preview": "/******************************************************************\n * File: docqual.h (Formerly docqual.h)\n * D"
},
{
"path": "src/ccmain/equationdetect.cpp",
"chars": 52045,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: equationdetect.cpp\n// Descriptio"
},
{
"path": "src/ccmain/equationdetect.h",
"chars": 10959,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: equationdetect.h\n// Description:"
},
{
"path": "src/ccmain/fixspace.cpp",
"chars": 29936,
"preview": "/******************************************************************\n * File: fixspace.cpp (Formerly fixspace.c)\n"
},
{
"path": "src/ccmain/fixspace.h",
"chars": 1348,
"preview": "/******************************************************************\n * File: fixspace.h (Formerly fixspace.h)\n *"
},
{
"path": "src/ccmain/fixxht.cpp",
"chars": 10202,
"preview": "/**********************************************************************\n * File: fixxht.cpp (Formerly fixxht.c)\n"
},
{
"path": "src/ccmain/linerec.cpp",
"chars": 12441,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: linerec.cpp\n// Description: Top-"
},
{
"path": "src/ccmain/ltrresultiterator.cpp",
"chars": 17580,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: ltrresultiterator.cpp\n// Descrip"
},
{
"path": "src/ccmain/mutableiterator.cpp",
"chars": 958,
"preview": "///////////////////////////////////////////////////////////////////////\n//\n// Licensed under the Apache License, Version"
},
{
"path": "src/ccmain/mutableiterator.h",
"chars": 2623,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: mutableiterator.h\n// Description"
},
{
"path": "src/ccmain/osdetect.cpp",
"chars": 19552,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: osdetect.cpp\n// Description: Ori"
},
{
"path": "src/ccmain/output.cpp",
"chars": 14775,
"preview": "/******************************************************************\n * File: output.cpp (Formerly output.c)\n * D"
},
{
"path": "src/ccmain/output.h",
"chars": 1295,
"preview": "/******************************************************************\n * File: output.h (Formerly output.h)\n * Des"
},
{
"path": "src/ccmain/pageiterator.cpp",
"chars": 25170,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: pageiterator.cpp\n// Description:"
},
{
"path": "src/ccmain/pagesegmain.cpp",
"chars": 16475,
"preview": "/**********************************************************************\n * File: pagesegmain.cpp\n * Description: "
},
{
"path": "src/ccmain/pagewalk.cpp",
"chars": 1642,
"preview": "/**********************************************************************\n * File: pagewalk.cpp (Formerly walkers."
},
{
"path": "src/ccmain/par_control.cpp",
"chars": 2420,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: par_control.cpp\n// Description: "
},
{
"path": "src/ccmain/paragraphs.cpp",
"chars": 96401,
"preview": "/**********************************************************************\n * File: paragraphs.cpp\n * Description: P"
},
{
"path": "src/ccmain/paragraphs.h",
"chars": 4412,
"preview": "/**********************************************************************\n * File: paragraphs.h\n * Description: Par"
},
{
"path": "src/ccmain/paragraphs_internal.h",
"chars": 12295,
"preview": "/**********************************************************************\n * File: paragraphs_internal.h\n * Descrip"
},
{
"path": "src/ccmain/paramsd.cpp",
"chars": 11431,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: paramsd.cpp\n// Description: Tess"
},
{
"path": "src/ccmain/paramsd.h",
"chars": 4587,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: paramsd.h\n// Description: Tesser"
},
{
"path": "src/ccmain/pgedit.cpp",
"chars": 30805,
"preview": "/**********************************************************************\n * File: pgedit.cpp (Formerly pgeditor.c)"
},
{
"path": "src/ccmain/pgedit.h",
"chars": 1902,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: pgedit.h\n// Description: Page st"
},
{
"path": "src/ccmain/recogtraining.cpp",
"chars": 8863,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: recogtraining.cpp\n// Description"
},
{
"path": "src/ccmain/reject.cpp",
"chars": 28647,
"preview": "/**********************************************************************\n * File: reject.cpp (Formerly reject.c)\n"
},
{
"path": "src/ccmain/reject.h",
"chars": 1384,
"preview": "/**********************************************************************\n * File: reject.h\n * Description: Rejecti"
},
{
"path": "src/ccmain/resultiterator.cpp",
"chars": 25626,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: resultiterator.cpp\n// Descriptio"
},
{
"path": "src/ccmain/superscript.cpp",
"chars": 23763,
"preview": "/******************************************************************\n * File: superscript.cpp\n * Description: Corr"
},
{
"path": "src/ccmain/tessbox.cpp",
"chars": 2310,
"preview": "/**********************************************************************\n * File: tessbox.cpp (Formerly tessbox.c"
},
{
"path": "src/ccmain/tessedit.cpp",
"chars": 18553,
"preview": "/**********************************************************************\n * File: tessedit.cpp (Formerly tessedit"
},
{
"path": "src/ccmain/tesseractclass.cpp",
"chars": 36541,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: tesseractclass.cpp\n// Descriptio"
},
{
"path": "src/ccmain/tesseractclass.h",
"chars": 48760,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: tesseractclass.h\n// Description:"
},
{
"path": "src/ccmain/tessvars.cpp",
"chars": 1024,
"preview": "/**********************************************************************\n * File: tessvars.cpp (Formerly tessvars"
},
{
"path": "src/ccmain/tessvars.h",
"chars": 1044,
"preview": "/**********************************************************************\n * File: tessvars.h (Formerly tessvars.h"
},
{
"path": "src/ccmain/tfacepp.cpp",
"chars": 12691,
"preview": "/**********************************************************************\n * File: tfacepp.cpp (Formerly tface++.c"
},
{
"path": "src/ccmain/thresholder.cpp",
"chars": 14796,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: thresholder.cpp\n// Description: "
},
{
"path": "src/ccmain/thresholder.h",
"chars": 8012,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: thresholder.h\n// Description: Ba"
},
{
"path": "src/ccmain/werdit.cpp",
"chars": 2763,
"preview": "/**********************************************************************\n * File: werdit.cpp (Formerly wordit.c)\n"
},
{
"path": "src/ccmain/werdit.h",
"chars": 1157,
"preview": "/**********************************************************************\n * File: wordit.h\n * Description: An iter"
},
{
"path": "src/ccstruct/blamer.cpp",
"chars": 24624,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: blamer.cpp\n// Description: Modul"
},
{
"path": "src/ccstruct/blamer.h",
"chars": 14995,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: blamer.h\n// Description: Module "
},
{
"path": "src/ccstruct/blobbox.cpp",
"chars": 37441,
"preview": "/**********************************************************************\n * File: blobbox.cpp (Formerly blobnbox."
},
{
"path": "src/ccstruct/blobbox.h",
"chars": 29608,
"preview": "/**********************************************************************\n * File: blobbox.h (Formerly blobnbox.h)"
},
{
"path": "src/ccstruct/blobs.cpp",
"chars": 37217,
"preview": "/******************************************************************************\n *\n * File: blobs.cpp (Formerly"
},
{
"path": "src/ccstruct/blobs.h",
"chars": 16444,
"preview": "/******************************************************************************\n *\n * File: blobs.h\n * Descriptio"
},
{
"path": "src/ccstruct/blread.cpp",
"chars": 2618,
"preview": "/**********************************************************************\n * File: blread.cpp (Formerly pdread.c)\n"
},
{
"path": "src/ccstruct/blread.h",
"chars": 1342,
"preview": "/**********************************************************************\n * File: blread.h (Formerly pdread.h)\n *"
},
{
"path": "src/ccstruct/boxread.cpp",
"chars": 10691,
"preview": "/**********************************************************************\n * File: boxread.cpp\n * Description: Read"
},
{
"path": "src/ccstruct/boxread.h",
"chars": 4009,
"preview": "/**********************************************************************\n * File: boxread.h\n * Description: Read d"
},
{
"path": "src/ccstruct/boxword.cpp",
"chars": 6732,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: boxword.cpp\n// Description: Clas"
},
{
"path": "src/ccstruct/boxword.h",
"chars": 3124,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: boxword.h\n// Description: Class "
},
{
"path": "src/ccstruct/ccstruct.cpp",
"chars": 1286,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: ccstruct.cpp\n// Description: ccs"
},
{
"path": "src/ccstruct/ccstruct.h",
"chars": 1521,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: ccstruct.h\n// Description: ccstr"
},
{
"path": "src/ccstruct/coutln.cpp",
"chars": 35128,
"preview": "/**********************************************************************\n * File: coutln.cpp (Formerly coutline.c"
},
{
"path": "src/ccstruct/coutln.h",
"chars": 11404,
"preview": "/**********************************************************************\n * File: coutln.h\n * Description: Code fo"
},
{
"path": "src/ccstruct/crakedge.h",
"chars": 1323,
"preview": "/**********************************************************************\n * File: crakedge.h (Formerly: crked"
},
{
"path": "src/ccstruct/debugpixa.h",
"chars": 1569,
"preview": "#ifndef TESSERACT_CCSTRUCT_DEBUGPIXA_H_\n#define TESSERACT_CCSTRUCT_DEBUGPIXA_H_\n\n#include \"image.h\"\n\n#include <allheader"
},
{
"path": "src/ccstruct/detlinefit.cpp",
"chars": 11434,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: detlinefit.cpp\n// Description: D"
},
{
"path": "src/ccstruct/detlinefit.h",
"chars": 7657,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: detlinefit.h\n// Description: Det"
},
{
"path": "src/ccstruct/dppoint.cpp",
"chars": 3674,
"preview": "/**********************************************************************\n * File: dppoint.cpp\n * Description: Simp"
},
{
"path": "src/ccstruct/dppoint.h",
"chars": 3920,
"preview": "/**********************************************************************\n * File: dppoint.h\n * Description: Simple"
},
{
"path": "src/ccstruct/fontinfo.cpp",
"chars": 7153,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: fontinfo.cpp\n// Description: Fon"
},
{
"path": "src/ccstruct/fontinfo.h",
"chars": 7454,
"preview": "///////////////////////////////////////////////////////////////////////\n// File: fontinfo.h\n// Description: Font "
},
{
"path": "src/ccstruct/image.cpp",
"chars": 1478,
"preview": "///////////////////////////////////////////////////////////////////////\n// Licensed under the Apache License, Version 2."
}
]
// ... and 525 more files (download for full content)
About this extraction
This page contains the full source code of the tesseract-ocr/tesseract GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 725 files (7.8 MB), approximately 2.1M tokens, and a symbol index with 3259 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.